{-# 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.Policy where
import qualified Amazonka.Core as Core
import Amazonka.IAM.Types.Tag
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Policy = Policy'
{
Policy -> Maybe Text
policyName :: Prelude.Maybe Prelude.Text,
Policy -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Policy -> Maybe ISO8601
updateDate :: Prelude.Maybe Core.ISO8601,
Policy -> Maybe Text
policyId :: Prelude.Maybe Prelude.Text,
Policy -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
Policy -> Maybe ISO8601
createDate :: Prelude.Maybe Core.ISO8601,
Policy -> Maybe Bool
isAttachable :: Prelude.Maybe Prelude.Bool,
Policy -> Maybe Int
permissionsBoundaryUsageCount :: Prelude.Maybe Prelude.Int,
Policy -> Maybe Text
defaultVersionId :: Prelude.Maybe Prelude.Text,
Policy -> Maybe Int
attachmentCount :: Prelude.Maybe Prelude.Int,
Policy -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Policy -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
}
deriving (Policy -> Policy -> Bool
(Policy -> Policy -> Bool)
-> (Policy -> Policy -> Bool) -> Eq Policy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Policy -> Policy -> Bool
$c/= :: Policy -> Policy -> Bool
== :: Policy -> Policy -> Bool
$c== :: Policy -> Policy -> Bool
Prelude.Eq, ReadPrec [Policy]
ReadPrec Policy
Int -> ReadS Policy
ReadS [Policy]
(Int -> ReadS Policy)
-> ReadS [Policy]
-> ReadPrec Policy
-> ReadPrec [Policy]
-> Read Policy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Policy]
$creadListPrec :: ReadPrec [Policy]
readPrec :: ReadPrec Policy
$creadPrec :: ReadPrec Policy
readList :: ReadS [Policy]
$creadList :: ReadS [Policy]
readsPrec :: Int -> ReadS Policy
$creadsPrec :: Int -> ReadS Policy
Prelude.Read, Int -> Policy -> ShowS
[Policy] -> ShowS
Policy -> String
(Int -> Policy -> ShowS)
-> (Policy -> String) -> ([Policy] -> ShowS) -> Show Policy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Policy] -> ShowS
$cshowList :: [Policy] -> ShowS
show :: Policy -> String
$cshow :: Policy -> String
showsPrec :: Int -> Policy -> ShowS
$cshowsPrec :: Int -> Policy -> ShowS
Prelude.Show, (forall x. Policy -> Rep Policy x)
-> (forall x. Rep Policy x -> Policy) -> Generic Policy
forall x. Rep Policy x -> Policy
forall x. Policy -> Rep Policy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Policy x -> Policy
$cfrom :: forall x. Policy -> Rep Policy x
Prelude.Generic)
newPolicy ::
Policy
newPolicy :: Policy
newPolicy =
Policy' :: Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy
Policy'
{ $sel:policyName:Policy' :: Maybe Text
policyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Policy' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:updateDate:Policy' :: Maybe ISO8601
updateDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:policyId:Policy' :: Maybe Text
policyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:path:Policy' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createDate:Policy' :: Maybe ISO8601
createDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:isAttachable:Policy' :: Maybe Bool
isAttachable = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:permissionsBoundaryUsageCount:Policy' :: Maybe Int
permissionsBoundaryUsageCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:defaultVersionId:Policy' :: Maybe Text
defaultVersionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attachmentCount:Policy' :: Maybe Int
attachmentCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:description:Policy' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:Policy' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
}
policy_policyName :: Lens.Lens' Policy (Prelude.Maybe Prelude.Text)
policy_policyName :: (Maybe Text -> f (Maybe Text)) -> Policy -> f Policy
policy_policyName = (Policy -> Maybe Text)
-> (Policy -> Maybe Text -> Policy)
-> Lens Policy Policy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Policy' {Maybe Text
policyName :: Maybe Text
$sel:policyName:Policy' :: Policy -> Maybe Text
policyName} -> Maybe Text
policyName) (\s :: Policy
s@Policy' {} Maybe Text
a -> Policy
s {$sel:policyName:Policy' :: Maybe Text
policyName = Maybe Text
a} :: Policy)
policy_arn :: Lens.Lens' Policy (Prelude.Maybe Prelude.Text)
policy_arn :: (Maybe Text -> f (Maybe Text)) -> Policy -> f Policy
policy_arn = (Policy -> Maybe Text)
-> (Policy -> Maybe Text -> Policy)
-> Lens Policy Policy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Policy' {Maybe Text
arn :: Maybe Text
$sel:arn:Policy' :: Policy -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Policy
s@Policy' {} Maybe Text
a -> Policy
s {$sel:arn:Policy' :: Maybe Text
arn = Maybe Text
a} :: Policy)
policy_updateDate :: Lens.Lens' Policy (Prelude.Maybe Prelude.UTCTime)
policy_updateDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Policy -> f Policy
policy_updateDate = (Policy -> Maybe ISO8601)
-> (Policy -> Maybe ISO8601 -> Policy)
-> Lens Policy Policy (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Policy' {Maybe ISO8601
updateDate :: Maybe ISO8601
$sel:updateDate:Policy' :: Policy -> Maybe ISO8601
updateDate} -> Maybe ISO8601
updateDate) (\s :: Policy
s@Policy' {} Maybe ISO8601
a -> Policy
s {$sel:updateDate:Policy' :: Maybe ISO8601
updateDate = Maybe ISO8601
a} :: Policy) ((Maybe ISO8601 -> f (Maybe ISO8601)) -> Policy -> f Policy)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Policy
-> f Policy
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
(Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
policy_policyId :: Lens.Lens' Policy (Prelude.Maybe Prelude.Text)
policy_policyId :: (Maybe Text -> f (Maybe Text)) -> Policy -> f Policy
policy_policyId = (Policy -> Maybe Text)
-> (Policy -> Maybe Text -> Policy)
-> Lens Policy Policy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Policy' {Maybe Text
policyId :: Maybe Text
$sel:policyId:Policy' :: Policy -> Maybe Text
policyId} -> Maybe Text
policyId) (\s :: Policy
s@Policy' {} Maybe Text
a -> Policy
s {$sel:policyId:Policy' :: Maybe Text
policyId = Maybe Text
a} :: Policy)
policy_path :: Lens.Lens' Policy (Prelude.Maybe Prelude.Text)
policy_path :: (Maybe Text -> f (Maybe Text)) -> Policy -> f Policy
policy_path = (Policy -> Maybe Text)
-> (Policy -> Maybe Text -> Policy)
-> Lens Policy Policy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Policy' {Maybe Text
path :: Maybe Text
$sel:path:Policy' :: Policy -> Maybe Text
path} -> Maybe Text
path) (\s :: Policy
s@Policy' {} Maybe Text
a -> Policy
s {$sel:path:Policy' :: Maybe Text
path = Maybe Text
a} :: Policy)
policy_createDate :: Lens.Lens' Policy (Prelude.Maybe Prelude.UTCTime)
policy_createDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Policy -> f Policy
policy_createDate = (Policy -> Maybe ISO8601)
-> (Policy -> Maybe ISO8601 -> Policy)
-> Lens Policy Policy (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Policy' {Maybe ISO8601
createDate :: Maybe ISO8601
$sel:createDate:Policy' :: Policy -> Maybe ISO8601
createDate} -> Maybe ISO8601
createDate) (\s :: Policy
s@Policy' {} Maybe ISO8601
a -> Policy
s {$sel:createDate:Policy' :: Maybe ISO8601
createDate = Maybe ISO8601
a} :: Policy) ((Maybe ISO8601 -> f (Maybe ISO8601)) -> Policy -> f Policy)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Policy
-> f Policy
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
(Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
policy_isAttachable :: Lens.Lens' Policy (Prelude.Maybe Prelude.Bool)
policy_isAttachable :: (Maybe Bool -> f (Maybe Bool)) -> Policy -> f Policy
policy_isAttachable = (Policy -> Maybe Bool)
-> (Policy -> Maybe Bool -> Policy)
-> Lens Policy Policy (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Policy' {Maybe Bool
isAttachable :: Maybe Bool
$sel:isAttachable:Policy' :: Policy -> Maybe Bool
isAttachable} -> Maybe Bool
isAttachable) (\s :: Policy
s@Policy' {} Maybe Bool
a -> Policy
s {$sel:isAttachable:Policy' :: Maybe Bool
isAttachable = Maybe Bool
a} :: Policy)
policy_permissionsBoundaryUsageCount :: Lens.Lens' Policy (Prelude.Maybe Prelude.Int)
policy_permissionsBoundaryUsageCount :: (Maybe Int -> f (Maybe Int)) -> Policy -> f Policy
policy_permissionsBoundaryUsageCount = (Policy -> Maybe Int)
-> (Policy -> Maybe Int -> Policy)
-> Lens Policy Policy (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Policy' {Maybe Int
permissionsBoundaryUsageCount :: Maybe Int
$sel:permissionsBoundaryUsageCount:Policy' :: Policy -> Maybe Int
permissionsBoundaryUsageCount} -> Maybe Int
permissionsBoundaryUsageCount) (\s :: Policy
s@Policy' {} Maybe Int
a -> Policy
s {$sel:permissionsBoundaryUsageCount:Policy' :: Maybe Int
permissionsBoundaryUsageCount = Maybe Int
a} :: Policy)
policy_defaultVersionId :: Lens.Lens' Policy (Prelude.Maybe Prelude.Text)
policy_defaultVersionId :: (Maybe Text -> f (Maybe Text)) -> Policy -> f Policy
policy_defaultVersionId = (Policy -> Maybe Text)
-> (Policy -> Maybe Text -> Policy)
-> Lens Policy Policy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Policy' {Maybe Text
defaultVersionId :: Maybe Text
$sel:defaultVersionId:Policy' :: Policy -> Maybe Text
defaultVersionId} -> Maybe Text
defaultVersionId) (\s :: Policy
s@Policy' {} Maybe Text
a -> Policy
s {$sel:defaultVersionId:Policy' :: Maybe Text
defaultVersionId = Maybe Text
a} :: Policy)
policy_attachmentCount :: Lens.Lens' Policy (Prelude.Maybe Prelude.Int)
policy_attachmentCount :: (Maybe Int -> f (Maybe Int)) -> Policy -> f Policy
policy_attachmentCount = (Policy -> Maybe Int)
-> (Policy -> Maybe Int -> Policy)
-> Lens Policy Policy (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Policy' {Maybe Int
attachmentCount :: Maybe Int
$sel:attachmentCount:Policy' :: Policy -> Maybe Int
attachmentCount} -> Maybe Int
attachmentCount) (\s :: Policy
s@Policy' {} Maybe Int
a -> Policy
s {$sel:attachmentCount:Policy' :: Maybe Int
attachmentCount = Maybe Int
a} :: Policy)
policy_description :: Lens.Lens' Policy (Prelude.Maybe Prelude.Text)
policy_description :: (Maybe Text -> f (Maybe Text)) -> Policy -> f Policy
policy_description = (Policy -> Maybe Text)
-> (Policy -> Maybe Text -> Policy)
-> Lens Policy Policy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Policy' {Maybe Text
description :: Maybe Text
$sel:description:Policy' :: Policy -> Maybe Text
description} -> Maybe Text
description) (\s :: Policy
s@Policy' {} Maybe Text
a -> Policy
s {$sel:description:Policy' :: Maybe Text
description = Maybe Text
a} :: Policy)
policy_tags :: Lens.Lens' Policy (Prelude.Maybe [Tag])
policy_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> Policy -> f Policy
policy_tags = (Policy -> Maybe [Tag])
-> (Policy -> Maybe [Tag] -> Policy)
-> Lens Policy Policy (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Policy' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:Policy' :: Policy -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: Policy
s@Policy' {} Maybe [Tag]
a -> Policy
s {$sel:tags:Policy' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: Policy) ((Maybe [Tag] -> f (Maybe [Tag])) -> Policy -> f Policy)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> Policy
-> f Policy
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromXML Policy where
parseXML :: [Node] -> Either String Policy
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy
Policy'
(Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy)
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
"PolicyName")
Either
String
(Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy)
-> Either String (Maybe Text)
-> Either
String
(Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy)
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
"Arn")
Either
String
(Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy)
-> Either String (Maybe ISO8601)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"UpdateDate")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy)
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
"PolicyId")
Either
String
(Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy)
-> Either String (Maybe Text)
-> Either
String
(Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy)
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
"Path")
Either
String
(Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy)
-> Either String (Maybe ISO8601)
-> Either
String
(Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CreateDate")
Either
String
(Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Tag]
-> Policy)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Int
-> Maybe Text -> Maybe Int -> Maybe Text -> Maybe [Tag] -> Policy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IsAttachable")
Either
String
(Maybe Int
-> Maybe Text -> Maybe Int -> Maybe Text -> Maybe [Tag] -> Policy)
-> Either String (Maybe Int)
-> Either
String
(Maybe Text -> Maybe Int -> Maybe Text -> Maybe [Tag] -> Policy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PermissionsBoundaryUsageCount")
Either
String
(Maybe Text -> Maybe Int -> Maybe Text -> Maybe [Tag] -> Policy)
-> Either String (Maybe Text)
-> Either String (Maybe Int -> Maybe Text -> Maybe [Tag] -> Policy)
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
"DefaultVersionId")
Either String (Maybe Int -> Maybe Text -> Maybe [Tag] -> Policy)
-> Either String (Maybe Int)
-> Either String (Maybe Text -> Maybe [Tag] -> Policy)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AttachmentCount")
Either String (Maybe Text -> Maybe [Tag] -> Policy)
-> Either String (Maybe Text)
-> Either String (Maybe [Tag] -> Policy)
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
"Description")
Either String (Maybe [Tag] -> Policy)
-> Either String (Maybe [Tag]) -> Either String Policy
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
"Tags" 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 [Tag]))
-> Either String (Maybe [Tag])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Tag])
-> [Node] -> Either String (Maybe [Tag])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Tag]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
instance Prelude.Hashable Policy
instance Prelude.NFData Policy