{-# 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.EvaluationResult where
import qualified Amazonka.Core as Core
import Amazonka.IAM.Types.OrganizationsDecisionDetail
import Amazonka.IAM.Types.PermissionsBoundaryDecisionDetail
import Amazonka.IAM.Types.PolicyEvaluationDecisionType
import Amazonka.IAM.Types.ResourceSpecificResult
import Amazonka.IAM.Types.Statement
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EvaluationResult = EvaluationResult'
{
EvaluationResult -> Maybe [Statement]
matchedStatements :: Prelude.Maybe [Statement],
EvaluationResult
-> Maybe (HashMap Text PolicyEvaluationDecisionType)
evalDecisionDetails :: Prelude.Maybe (Prelude.HashMap Prelude.Text PolicyEvaluationDecisionType),
EvaluationResult -> Maybe [ResourceSpecificResult]
resourceSpecificResults :: Prelude.Maybe [ResourceSpecificResult],
EvaluationResult -> Maybe Text
evalResourceName :: Prelude.Maybe Prelude.Text,
EvaluationResult -> Maybe [Text]
missingContextValues :: Prelude.Maybe [Prelude.Text],
EvaluationResult -> Maybe PermissionsBoundaryDecisionDetail
permissionsBoundaryDecisionDetail :: Prelude.Maybe PermissionsBoundaryDecisionDetail,
EvaluationResult -> Maybe OrganizationsDecisionDetail
organizationsDecisionDetail :: Prelude.Maybe OrganizationsDecisionDetail,
EvaluationResult -> Text
evalActionName :: Prelude.Text,
EvaluationResult -> PolicyEvaluationDecisionType
evalDecision :: PolicyEvaluationDecisionType
}
deriving (EvaluationResult -> EvaluationResult -> Bool
(EvaluationResult -> EvaluationResult -> Bool)
-> (EvaluationResult -> EvaluationResult -> Bool)
-> Eq EvaluationResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EvaluationResult -> EvaluationResult -> Bool
$c/= :: EvaluationResult -> EvaluationResult -> Bool
== :: EvaluationResult -> EvaluationResult -> Bool
$c== :: EvaluationResult -> EvaluationResult -> Bool
Prelude.Eq, ReadPrec [EvaluationResult]
ReadPrec EvaluationResult
Int -> ReadS EvaluationResult
ReadS [EvaluationResult]
(Int -> ReadS EvaluationResult)
-> ReadS [EvaluationResult]
-> ReadPrec EvaluationResult
-> ReadPrec [EvaluationResult]
-> Read EvaluationResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EvaluationResult]
$creadListPrec :: ReadPrec [EvaluationResult]
readPrec :: ReadPrec EvaluationResult
$creadPrec :: ReadPrec EvaluationResult
readList :: ReadS [EvaluationResult]
$creadList :: ReadS [EvaluationResult]
readsPrec :: Int -> ReadS EvaluationResult
$creadsPrec :: Int -> ReadS EvaluationResult
Prelude.Read, Int -> EvaluationResult -> ShowS
[EvaluationResult] -> ShowS
EvaluationResult -> String
(Int -> EvaluationResult -> ShowS)
-> (EvaluationResult -> String)
-> ([EvaluationResult] -> ShowS)
-> Show EvaluationResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EvaluationResult] -> ShowS
$cshowList :: [EvaluationResult] -> ShowS
show :: EvaluationResult -> String
$cshow :: EvaluationResult -> String
showsPrec :: Int -> EvaluationResult -> ShowS
$cshowsPrec :: Int -> EvaluationResult -> ShowS
Prelude.Show, (forall x. EvaluationResult -> Rep EvaluationResult x)
-> (forall x. Rep EvaluationResult x -> EvaluationResult)
-> Generic EvaluationResult
forall x. Rep EvaluationResult x -> EvaluationResult
forall x. EvaluationResult -> Rep EvaluationResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EvaluationResult x -> EvaluationResult
$cfrom :: forall x. EvaluationResult -> Rep EvaluationResult x
Prelude.Generic)
newEvaluationResult ::
Prelude.Text ->
PolicyEvaluationDecisionType ->
EvaluationResult
newEvaluationResult :: Text -> PolicyEvaluationDecisionType -> EvaluationResult
newEvaluationResult Text
pEvalActionName_ PolicyEvaluationDecisionType
pEvalDecision_ =
EvaluationResult' :: Maybe [Statement]
-> Maybe (HashMap Text PolicyEvaluationDecisionType)
-> Maybe [ResourceSpecificResult]
-> Maybe Text
-> Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Maybe OrganizationsDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> EvaluationResult
EvaluationResult'
{ $sel:matchedStatements:EvaluationResult' :: Maybe [Statement]
matchedStatements =
Maybe [Statement]
forall a. Maybe a
Prelude.Nothing,
$sel:evalDecisionDetails:EvaluationResult' :: Maybe (HashMap Text PolicyEvaluationDecisionType)
evalDecisionDetails = Maybe (HashMap Text PolicyEvaluationDecisionType)
forall a. Maybe a
Prelude.Nothing,
$sel:resourceSpecificResults:EvaluationResult' :: Maybe [ResourceSpecificResult]
resourceSpecificResults = Maybe [ResourceSpecificResult]
forall a. Maybe a
Prelude.Nothing,
$sel:evalResourceName:EvaluationResult' :: Maybe Text
evalResourceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:missingContextValues:EvaluationResult' :: Maybe [Text]
missingContextValues = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:permissionsBoundaryDecisionDetail:EvaluationResult' :: Maybe PermissionsBoundaryDecisionDetail
permissionsBoundaryDecisionDetail = Maybe PermissionsBoundaryDecisionDetail
forall a. Maybe a
Prelude.Nothing,
$sel:organizationsDecisionDetail:EvaluationResult' :: Maybe OrganizationsDecisionDetail
organizationsDecisionDetail = Maybe OrganizationsDecisionDetail
forall a. Maybe a
Prelude.Nothing,
$sel:evalActionName:EvaluationResult' :: Text
evalActionName = Text
pEvalActionName_,
$sel:evalDecision:EvaluationResult' :: PolicyEvaluationDecisionType
evalDecision = PolicyEvaluationDecisionType
pEvalDecision_
}
evaluationResult_matchedStatements :: Lens.Lens' EvaluationResult (Prelude.Maybe [Statement])
evaluationResult_matchedStatements :: (Maybe [Statement] -> f (Maybe [Statement]))
-> EvaluationResult -> f EvaluationResult
evaluationResult_matchedStatements = (EvaluationResult -> Maybe [Statement])
-> (EvaluationResult -> Maybe [Statement] -> EvaluationResult)
-> Lens
EvaluationResult
EvaluationResult
(Maybe [Statement])
(Maybe [Statement])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EvaluationResult' {Maybe [Statement]
matchedStatements :: Maybe [Statement]
$sel:matchedStatements:EvaluationResult' :: EvaluationResult -> Maybe [Statement]
matchedStatements} -> Maybe [Statement]
matchedStatements) (\s :: EvaluationResult
s@EvaluationResult' {} Maybe [Statement]
a -> EvaluationResult
s {$sel:matchedStatements:EvaluationResult' :: Maybe [Statement]
matchedStatements = Maybe [Statement]
a} :: EvaluationResult) ((Maybe [Statement] -> f (Maybe [Statement]))
-> EvaluationResult -> f EvaluationResult)
-> ((Maybe [Statement] -> f (Maybe [Statement]))
-> Maybe [Statement] -> f (Maybe [Statement]))
-> (Maybe [Statement] -> f (Maybe [Statement]))
-> EvaluationResult
-> f EvaluationResult
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
evaluationResult_evalDecisionDetails :: Lens.Lens' EvaluationResult (Prelude.Maybe (Prelude.HashMap Prelude.Text PolicyEvaluationDecisionType))
evaluationResult_evalDecisionDetails :: (Maybe (HashMap Text PolicyEvaluationDecisionType)
-> f (Maybe (HashMap Text PolicyEvaluationDecisionType)))
-> EvaluationResult -> f EvaluationResult
evaluationResult_evalDecisionDetails = (EvaluationResult
-> Maybe (HashMap Text PolicyEvaluationDecisionType))
-> (EvaluationResult
-> Maybe (HashMap Text PolicyEvaluationDecisionType)
-> EvaluationResult)
-> Lens
EvaluationResult
EvaluationResult
(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 (\EvaluationResult' {Maybe (HashMap Text PolicyEvaluationDecisionType)
evalDecisionDetails :: Maybe (HashMap Text PolicyEvaluationDecisionType)
$sel:evalDecisionDetails:EvaluationResult' :: EvaluationResult
-> Maybe (HashMap Text PolicyEvaluationDecisionType)
evalDecisionDetails} -> Maybe (HashMap Text PolicyEvaluationDecisionType)
evalDecisionDetails) (\s :: EvaluationResult
s@EvaluationResult' {} Maybe (HashMap Text PolicyEvaluationDecisionType)
a -> EvaluationResult
s {$sel:evalDecisionDetails:EvaluationResult' :: Maybe (HashMap Text PolicyEvaluationDecisionType)
evalDecisionDetails = Maybe (HashMap Text PolicyEvaluationDecisionType)
a} :: EvaluationResult) ((Maybe (HashMap Text PolicyEvaluationDecisionType)
-> f (Maybe (HashMap Text PolicyEvaluationDecisionType)))
-> EvaluationResult -> f EvaluationResult)
-> ((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)))
-> EvaluationResult
-> f EvaluationResult
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
evaluationResult_resourceSpecificResults :: Lens.Lens' EvaluationResult (Prelude.Maybe [ResourceSpecificResult])
evaluationResult_resourceSpecificResults :: (Maybe [ResourceSpecificResult]
-> f (Maybe [ResourceSpecificResult]))
-> EvaluationResult -> f EvaluationResult
evaluationResult_resourceSpecificResults = (EvaluationResult -> Maybe [ResourceSpecificResult])
-> (EvaluationResult
-> Maybe [ResourceSpecificResult] -> EvaluationResult)
-> Lens
EvaluationResult
EvaluationResult
(Maybe [ResourceSpecificResult])
(Maybe [ResourceSpecificResult])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EvaluationResult' {Maybe [ResourceSpecificResult]
resourceSpecificResults :: Maybe [ResourceSpecificResult]
$sel:resourceSpecificResults:EvaluationResult' :: EvaluationResult -> Maybe [ResourceSpecificResult]
resourceSpecificResults} -> Maybe [ResourceSpecificResult]
resourceSpecificResults) (\s :: EvaluationResult
s@EvaluationResult' {} Maybe [ResourceSpecificResult]
a -> EvaluationResult
s {$sel:resourceSpecificResults:EvaluationResult' :: Maybe [ResourceSpecificResult]
resourceSpecificResults = Maybe [ResourceSpecificResult]
a} :: EvaluationResult) ((Maybe [ResourceSpecificResult]
-> f (Maybe [ResourceSpecificResult]))
-> EvaluationResult -> f EvaluationResult)
-> ((Maybe [ResourceSpecificResult]
-> f (Maybe [ResourceSpecificResult]))
-> Maybe [ResourceSpecificResult]
-> f (Maybe [ResourceSpecificResult]))
-> (Maybe [ResourceSpecificResult]
-> f (Maybe [ResourceSpecificResult]))
-> EvaluationResult
-> f EvaluationResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ResourceSpecificResult]
[ResourceSpecificResult]
[ResourceSpecificResult]
[ResourceSpecificResult]
-> Iso
(Maybe [ResourceSpecificResult])
(Maybe [ResourceSpecificResult])
(Maybe [ResourceSpecificResult])
(Maybe [ResourceSpecificResult])
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
[ResourceSpecificResult]
[ResourceSpecificResult]
[ResourceSpecificResult]
[ResourceSpecificResult]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
evaluationResult_evalResourceName :: Lens.Lens' EvaluationResult (Prelude.Maybe Prelude.Text)
evaluationResult_evalResourceName :: (Maybe Text -> f (Maybe Text))
-> EvaluationResult -> f EvaluationResult
evaluationResult_evalResourceName = (EvaluationResult -> Maybe Text)
-> (EvaluationResult -> Maybe Text -> EvaluationResult)
-> Lens EvaluationResult EvaluationResult (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EvaluationResult' {Maybe Text
evalResourceName :: Maybe Text
$sel:evalResourceName:EvaluationResult' :: EvaluationResult -> Maybe Text
evalResourceName} -> Maybe Text
evalResourceName) (\s :: EvaluationResult
s@EvaluationResult' {} Maybe Text
a -> EvaluationResult
s {$sel:evalResourceName:EvaluationResult' :: Maybe Text
evalResourceName = Maybe Text
a} :: EvaluationResult)
evaluationResult_missingContextValues :: Lens.Lens' EvaluationResult (Prelude.Maybe [Prelude.Text])
evaluationResult_missingContextValues :: (Maybe [Text] -> f (Maybe [Text]))
-> EvaluationResult -> f EvaluationResult
evaluationResult_missingContextValues = (EvaluationResult -> Maybe [Text])
-> (EvaluationResult -> Maybe [Text] -> EvaluationResult)
-> Lens
EvaluationResult EvaluationResult (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EvaluationResult' {Maybe [Text]
missingContextValues :: Maybe [Text]
$sel:missingContextValues:EvaluationResult' :: EvaluationResult -> Maybe [Text]
missingContextValues} -> Maybe [Text]
missingContextValues) (\s :: EvaluationResult
s@EvaluationResult' {} Maybe [Text]
a -> EvaluationResult
s {$sel:missingContextValues:EvaluationResult' :: Maybe [Text]
missingContextValues = Maybe [Text]
a} :: EvaluationResult) ((Maybe [Text] -> f (Maybe [Text]))
-> EvaluationResult -> f EvaluationResult)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> EvaluationResult
-> f EvaluationResult
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
evaluationResult_permissionsBoundaryDecisionDetail :: Lens.Lens' EvaluationResult (Prelude.Maybe PermissionsBoundaryDecisionDetail)
evaluationResult_permissionsBoundaryDecisionDetail :: (Maybe PermissionsBoundaryDecisionDetail
-> f (Maybe PermissionsBoundaryDecisionDetail))
-> EvaluationResult -> f EvaluationResult
evaluationResult_permissionsBoundaryDecisionDetail = (EvaluationResult -> Maybe PermissionsBoundaryDecisionDetail)
-> (EvaluationResult
-> Maybe PermissionsBoundaryDecisionDetail -> EvaluationResult)
-> Lens
EvaluationResult
EvaluationResult
(Maybe PermissionsBoundaryDecisionDetail)
(Maybe PermissionsBoundaryDecisionDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EvaluationResult' {Maybe PermissionsBoundaryDecisionDetail
permissionsBoundaryDecisionDetail :: Maybe PermissionsBoundaryDecisionDetail
$sel:permissionsBoundaryDecisionDetail:EvaluationResult' :: EvaluationResult -> Maybe PermissionsBoundaryDecisionDetail
permissionsBoundaryDecisionDetail} -> Maybe PermissionsBoundaryDecisionDetail
permissionsBoundaryDecisionDetail) (\s :: EvaluationResult
s@EvaluationResult' {} Maybe PermissionsBoundaryDecisionDetail
a -> EvaluationResult
s {$sel:permissionsBoundaryDecisionDetail:EvaluationResult' :: Maybe PermissionsBoundaryDecisionDetail
permissionsBoundaryDecisionDetail = Maybe PermissionsBoundaryDecisionDetail
a} :: EvaluationResult)
evaluationResult_organizationsDecisionDetail :: Lens.Lens' EvaluationResult (Prelude.Maybe OrganizationsDecisionDetail)
evaluationResult_organizationsDecisionDetail :: (Maybe OrganizationsDecisionDetail
-> f (Maybe OrganizationsDecisionDetail))
-> EvaluationResult -> f EvaluationResult
evaluationResult_organizationsDecisionDetail = (EvaluationResult -> Maybe OrganizationsDecisionDetail)
-> (EvaluationResult
-> Maybe OrganizationsDecisionDetail -> EvaluationResult)
-> Lens
EvaluationResult
EvaluationResult
(Maybe OrganizationsDecisionDetail)
(Maybe OrganizationsDecisionDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EvaluationResult' {Maybe OrganizationsDecisionDetail
organizationsDecisionDetail :: Maybe OrganizationsDecisionDetail
$sel:organizationsDecisionDetail:EvaluationResult' :: EvaluationResult -> Maybe OrganizationsDecisionDetail
organizationsDecisionDetail} -> Maybe OrganizationsDecisionDetail
organizationsDecisionDetail) (\s :: EvaluationResult
s@EvaluationResult' {} Maybe OrganizationsDecisionDetail
a -> EvaluationResult
s {$sel:organizationsDecisionDetail:EvaluationResult' :: Maybe OrganizationsDecisionDetail
organizationsDecisionDetail = Maybe OrganizationsDecisionDetail
a} :: EvaluationResult)
evaluationResult_evalActionName :: Lens.Lens' EvaluationResult Prelude.Text
evaluationResult_evalActionName :: (Text -> f Text) -> EvaluationResult -> f EvaluationResult
evaluationResult_evalActionName = (EvaluationResult -> Text)
-> (EvaluationResult -> Text -> EvaluationResult)
-> Lens EvaluationResult EvaluationResult Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EvaluationResult' {Text
evalActionName :: Text
$sel:evalActionName:EvaluationResult' :: EvaluationResult -> Text
evalActionName} -> Text
evalActionName) (\s :: EvaluationResult
s@EvaluationResult' {} Text
a -> EvaluationResult
s {$sel:evalActionName:EvaluationResult' :: Text
evalActionName = Text
a} :: EvaluationResult)
evaluationResult_evalDecision :: Lens.Lens' EvaluationResult PolicyEvaluationDecisionType
evaluationResult_evalDecision :: (PolicyEvaluationDecisionType -> f PolicyEvaluationDecisionType)
-> EvaluationResult -> f EvaluationResult
evaluationResult_evalDecision = (EvaluationResult -> PolicyEvaluationDecisionType)
-> (EvaluationResult
-> PolicyEvaluationDecisionType -> EvaluationResult)
-> Lens
EvaluationResult
EvaluationResult
PolicyEvaluationDecisionType
PolicyEvaluationDecisionType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EvaluationResult' {PolicyEvaluationDecisionType
evalDecision :: PolicyEvaluationDecisionType
$sel:evalDecision:EvaluationResult' :: EvaluationResult -> PolicyEvaluationDecisionType
evalDecision} -> PolicyEvaluationDecisionType
evalDecision) (\s :: EvaluationResult
s@EvaluationResult' {} PolicyEvaluationDecisionType
a -> EvaluationResult
s {$sel:evalDecision:EvaluationResult' :: PolicyEvaluationDecisionType
evalDecision = PolicyEvaluationDecisionType
a} :: EvaluationResult)
instance Core.FromXML EvaluationResult where
parseXML :: [Node] -> Either String EvaluationResult
parseXML [Node]
x =
Maybe [Statement]
-> Maybe (HashMap Text PolicyEvaluationDecisionType)
-> Maybe [ResourceSpecificResult]
-> Maybe Text
-> Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Maybe OrganizationsDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> EvaluationResult
EvaluationResult'
(Maybe [Statement]
-> Maybe (HashMap Text PolicyEvaluationDecisionType)
-> Maybe [ResourceSpecificResult]
-> Maybe Text
-> Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Maybe OrganizationsDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> EvaluationResult)
-> Either String (Maybe [Statement])
-> Either
String
(Maybe (HashMap Text PolicyEvaluationDecisionType)
-> Maybe [ResourceSpecificResult]
-> Maybe Text
-> Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Maybe OrganizationsDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> EvaluationResult)
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 [ResourceSpecificResult]
-> Maybe Text
-> Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Maybe OrganizationsDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> EvaluationResult)
-> Either
String (Maybe (HashMap Text PolicyEvaluationDecisionType))
-> Either
String
(Maybe [ResourceSpecificResult]
-> Maybe Text
-> Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Maybe OrganizationsDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> EvaluationResult)
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 [ResourceSpecificResult]
-> Maybe Text
-> Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Maybe OrganizationsDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> EvaluationResult)
-> Either String (Maybe [ResourceSpecificResult])
-> Either
String
(Maybe Text
-> Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Maybe OrganizationsDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> EvaluationResult)
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
"ResourceSpecificResults"
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 [ResourceSpecificResult]))
-> Either String (Maybe [ResourceSpecificResult])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ResourceSpecificResult])
-> [Node] -> Either String (Maybe [ResourceSpecificResult])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [ResourceSpecificResult]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either
String
(Maybe Text
-> Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Maybe OrganizationsDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> EvaluationResult)
-> Either String (Maybe Text)
-> Either
String
(Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Maybe OrganizationsDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> EvaluationResult)
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
"EvalResourceName")
Either
String
(Maybe [Text]
-> Maybe PermissionsBoundaryDecisionDetail
-> Maybe OrganizationsDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> EvaluationResult)
-> Either String (Maybe [Text])
-> Either
String
(Maybe PermissionsBoundaryDecisionDetail
-> Maybe OrganizationsDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> EvaluationResult)
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
-> Maybe OrganizationsDecisionDetail
-> Text
-> PolicyEvaluationDecisionType
-> EvaluationResult)
-> Either String (Maybe PermissionsBoundaryDecisionDetail)
-> Either
String
(Maybe OrganizationsDecisionDetail
-> Text -> PolicyEvaluationDecisionType -> EvaluationResult)
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
(Maybe OrganizationsDecisionDetail
-> Text -> PolicyEvaluationDecisionType -> EvaluationResult)
-> Either String (Maybe OrganizationsDecisionDetail)
-> Either
String (Text -> PolicyEvaluationDecisionType -> EvaluationResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe OrganizationsDecisionDetail)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"OrganizationsDecisionDetail")
Either
String (Text -> PolicyEvaluationDecisionType -> EvaluationResult)
-> Either String Text
-> Either String (PolicyEvaluationDecisionType -> EvaluationResult)
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
"EvalActionName")
Either String (PolicyEvaluationDecisionType -> EvaluationResult)
-> Either String PolicyEvaluationDecisionType
-> Either String EvaluationResult
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
"EvalDecision")
instance Prelude.Hashable EvaluationResult
instance Prelude.NFData EvaluationResult