{-# 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.ManagedPolicyDetail where
import qualified Amazonka.Core as Core
import Amazonka.IAM.Types.PolicyVersion
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ManagedPolicyDetail = ManagedPolicyDetail'
{
ManagedPolicyDetail -> Maybe Text
policyName :: Prelude.Maybe Prelude.Text,
ManagedPolicyDetail -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ManagedPolicyDetail -> Maybe ISO8601
updateDate :: Prelude.Maybe Core.ISO8601,
ManagedPolicyDetail -> Maybe Text
policyId :: Prelude.Maybe Prelude.Text,
ManagedPolicyDetail -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
ManagedPolicyDetail -> Maybe [PolicyVersion]
policyVersionList :: Prelude.Maybe [PolicyVersion],
ManagedPolicyDetail -> Maybe ISO8601
createDate :: Prelude.Maybe Core.ISO8601,
ManagedPolicyDetail -> Maybe Bool
isAttachable :: Prelude.Maybe Prelude.Bool,
ManagedPolicyDetail -> Maybe Int
permissionsBoundaryUsageCount :: Prelude.Maybe Prelude.Int,
ManagedPolicyDetail -> Maybe Text
defaultVersionId :: Prelude.Maybe Prelude.Text,
ManagedPolicyDetail -> Maybe Int
attachmentCount :: Prelude.Maybe Prelude.Int,
ManagedPolicyDetail -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (ManagedPolicyDetail -> ManagedPolicyDetail -> Bool
(ManagedPolicyDetail -> ManagedPolicyDetail -> Bool)
-> (ManagedPolicyDetail -> ManagedPolicyDetail -> Bool)
-> Eq ManagedPolicyDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ManagedPolicyDetail -> ManagedPolicyDetail -> Bool
$c/= :: ManagedPolicyDetail -> ManagedPolicyDetail -> Bool
== :: ManagedPolicyDetail -> ManagedPolicyDetail -> Bool
$c== :: ManagedPolicyDetail -> ManagedPolicyDetail -> Bool
Prelude.Eq, ReadPrec [ManagedPolicyDetail]
ReadPrec ManagedPolicyDetail
Int -> ReadS ManagedPolicyDetail
ReadS [ManagedPolicyDetail]
(Int -> ReadS ManagedPolicyDetail)
-> ReadS [ManagedPolicyDetail]
-> ReadPrec ManagedPolicyDetail
-> ReadPrec [ManagedPolicyDetail]
-> Read ManagedPolicyDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ManagedPolicyDetail]
$creadListPrec :: ReadPrec [ManagedPolicyDetail]
readPrec :: ReadPrec ManagedPolicyDetail
$creadPrec :: ReadPrec ManagedPolicyDetail
readList :: ReadS [ManagedPolicyDetail]
$creadList :: ReadS [ManagedPolicyDetail]
readsPrec :: Int -> ReadS ManagedPolicyDetail
$creadsPrec :: Int -> ReadS ManagedPolicyDetail
Prelude.Read, Int -> ManagedPolicyDetail -> ShowS
[ManagedPolicyDetail] -> ShowS
ManagedPolicyDetail -> String
(Int -> ManagedPolicyDetail -> ShowS)
-> (ManagedPolicyDetail -> String)
-> ([ManagedPolicyDetail] -> ShowS)
-> Show ManagedPolicyDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ManagedPolicyDetail] -> ShowS
$cshowList :: [ManagedPolicyDetail] -> ShowS
show :: ManagedPolicyDetail -> String
$cshow :: ManagedPolicyDetail -> String
showsPrec :: Int -> ManagedPolicyDetail -> ShowS
$cshowsPrec :: Int -> ManagedPolicyDetail -> ShowS
Prelude.Show, (forall x. ManagedPolicyDetail -> Rep ManagedPolicyDetail x)
-> (forall x. Rep ManagedPolicyDetail x -> ManagedPolicyDetail)
-> Generic ManagedPolicyDetail
forall x. Rep ManagedPolicyDetail x -> ManagedPolicyDetail
forall x. ManagedPolicyDetail -> Rep ManagedPolicyDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ManagedPolicyDetail x -> ManagedPolicyDetail
$cfrom :: forall x. ManagedPolicyDetail -> Rep ManagedPolicyDetail x
Prelude.Generic)
newManagedPolicyDetail ::
ManagedPolicyDetail
newManagedPolicyDetail :: ManagedPolicyDetail
newManagedPolicyDetail =
ManagedPolicyDetail' :: Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe [PolicyVersion]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail
ManagedPolicyDetail'
{ $sel:policyName:ManagedPolicyDetail' :: Maybe Text
policyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:ManagedPolicyDetail' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:updateDate:ManagedPolicyDetail' :: Maybe ISO8601
updateDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:policyId:ManagedPolicyDetail' :: Maybe Text
policyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:path:ManagedPolicyDetail' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policyVersionList:ManagedPolicyDetail' :: Maybe [PolicyVersion]
policyVersionList = Maybe [PolicyVersion]
forall a. Maybe a
Prelude.Nothing,
$sel:createDate:ManagedPolicyDetail' :: Maybe ISO8601
createDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:isAttachable:ManagedPolicyDetail' :: Maybe Bool
isAttachable = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:permissionsBoundaryUsageCount:ManagedPolicyDetail' :: Maybe Int
permissionsBoundaryUsageCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:defaultVersionId:ManagedPolicyDetail' :: Maybe Text
defaultVersionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attachmentCount:ManagedPolicyDetail' :: Maybe Int
attachmentCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:description:ManagedPolicyDetail' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
managedPolicyDetail_policyName :: Lens.Lens' ManagedPolicyDetail (Prelude.Maybe Prelude.Text)
managedPolicyDetail_policyName :: (Maybe Text -> f (Maybe Text))
-> ManagedPolicyDetail -> f ManagedPolicyDetail
managedPolicyDetail_policyName = (ManagedPolicyDetail -> Maybe Text)
-> (ManagedPolicyDetail -> Maybe Text -> ManagedPolicyDetail)
-> Lens
ManagedPolicyDetail ManagedPolicyDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedPolicyDetail' {Maybe Text
policyName :: Maybe Text
$sel:policyName:ManagedPolicyDetail' :: ManagedPolicyDetail -> Maybe Text
policyName} -> Maybe Text
policyName) (\s :: ManagedPolicyDetail
s@ManagedPolicyDetail' {} Maybe Text
a -> ManagedPolicyDetail
s {$sel:policyName:ManagedPolicyDetail' :: Maybe Text
policyName = Maybe Text
a} :: ManagedPolicyDetail)
managedPolicyDetail_arn :: Lens.Lens' ManagedPolicyDetail (Prelude.Maybe Prelude.Text)
managedPolicyDetail_arn :: (Maybe Text -> f (Maybe Text))
-> ManagedPolicyDetail -> f ManagedPolicyDetail
managedPolicyDetail_arn = (ManagedPolicyDetail -> Maybe Text)
-> (ManagedPolicyDetail -> Maybe Text -> ManagedPolicyDetail)
-> Lens
ManagedPolicyDetail ManagedPolicyDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedPolicyDetail' {Maybe Text
arn :: Maybe Text
$sel:arn:ManagedPolicyDetail' :: ManagedPolicyDetail -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ManagedPolicyDetail
s@ManagedPolicyDetail' {} Maybe Text
a -> ManagedPolicyDetail
s {$sel:arn:ManagedPolicyDetail' :: Maybe Text
arn = Maybe Text
a} :: ManagedPolicyDetail)
managedPolicyDetail_updateDate :: Lens.Lens' ManagedPolicyDetail (Prelude.Maybe Prelude.UTCTime)
managedPolicyDetail_updateDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ManagedPolicyDetail -> f ManagedPolicyDetail
managedPolicyDetail_updateDate = (ManagedPolicyDetail -> Maybe ISO8601)
-> (ManagedPolicyDetail -> Maybe ISO8601 -> ManagedPolicyDetail)
-> Lens
ManagedPolicyDetail
ManagedPolicyDetail
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedPolicyDetail' {Maybe ISO8601
updateDate :: Maybe ISO8601
$sel:updateDate:ManagedPolicyDetail' :: ManagedPolicyDetail -> Maybe ISO8601
updateDate} -> Maybe ISO8601
updateDate) (\s :: ManagedPolicyDetail
s@ManagedPolicyDetail' {} Maybe ISO8601
a -> ManagedPolicyDetail
s {$sel:updateDate:ManagedPolicyDetail' :: Maybe ISO8601
updateDate = Maybe ISO8601
a} :: ManagedPolicyDetail) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> ManagedPolicyDetail -> f ManagedPolicyDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ManagedPolicyDetail
-> f ManagedPolicyDetail
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
managedPolicyDetail_policyId :: Lens.Lens' ManagedPolicyDetail (Prelude.Maybe Prelude.Text)
managedPolicyDetail_policyId :: (Maybe Text -> f (Maybe Text))
-> ManagedPolicyDetail -> f ManagedPolicyDetail
managedPolicyDetail_policyId = (ManagedPolicyDetail -> Maybe Text)
-> (ManagedPolicyDetail -> Maybe Text -> ManagedPolicyDetail)
-> Lens
ManagedPolicyDetail ManagedPolicyDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedPolicyDetail' {Maybe Text
policyId :: Maybe Text
$sel:policyId:ManagedPolicyDetail' :: ManagedPolicyDetail -> Maybe Text
policyId} -> Maybe Text
policyId) (\s :: ManagedPolicyDetail
s@ManagedPolicyDetail' {} Maybe Text
a -> ManagedPolicyDetail
s {$sel:policyId:ManagedPolicyDetail' :: Maybe Text
policyId = Maybe Text
a} :: ManagedPolicyDetail)
managedPolicyDetail_path :: Lens.Lens' ManagedPolicyDetail (Prelude.Maybe Prelude.Text)
managedPolicyDetail_path :: (Maybe Text -> f (Maybe Text))
-> ManagedPolicyDetail -> f ManagedPolicyDetail
managedPolicyDetail_path = (ManagedPolicyDetail -> Maybe Text)
-> (ManagedPolicyDetail -> Maybe Text -> ManagedPolicyDetail)
-> Lens
ManagedPolicyDetail ManagedPolicyDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedPolicyDetail' {Maybe Text
path :: Maybe Text
$sel:path:ManagedPolicyDetail' :: ManagedPolicyDetail -> Maybe Text
path} -> Maybe Text
path) (\s :: ManagedPolicyDetail
s@ManagedPolicyDetail' {} Maybe Text
a -> ManagedPolicyDetail
s {$sel:path:ManagedPolicyDetail' :: Maybe Text
path = Maybe Text
a} :: ManagedPolicyDetail)
managedPolicyDetail_policyVersionList :: Lens.Lens' ManagedPolicyDetail (Prelude.Maybe [PolicyVersion])
managedPolicyDetail_policyVersionList :: (Maybe [PolicyVersion] -> f (Maybe [PolicyVersion]))
-> ManagedPolicyDetail -> f ManagedPolicyDetail
managedPolicyDetail_policyVersionList = (ManagedPolicyDetail -> Maybe [PolicyVersion])
-> (ManagedPolicyDetail
-> Maybe [PolicyVersion] -> ManagedPolicyDetail)
-> Lens
ManagedPolicyDetail
ManagedPolicyDetail
(Maybe [PolicyVersion])
(Maybe [PolicyVersion])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedPolicyDetail' {Maybe [PolicyVersion]
policyVersionList :: Maybe [PolicyVersion]
$sel:policyVersionList:ManagedPolicyDetail' :: ManagedPolicyDetail -> Maybe [PolicyVersion]
policyVersionList} -> Maybe [PolicyVersion]
policyVersionList) (\s :: ManagedPolicyDetail
s@ManagedPolicyDetail' {} Maybe [PolicyVersion]
a -> ManagedPolicyDetail
s {$sel:policyVersionList:ManagedPolicyDetail' :: Maybe [PolicyVersion]
policyVersionList = Maybe [PolicyVersion]
a} :: ManagedPolicyDetail) ((Maybe [PolicyVersion] -> f (Maybe [PolicyVersion]))
-> ManagedPolicyDetail -> f ManagedPolicyDetail)
-> ((Maybe [PolicyVersion] -> f (Maybe [PolicyVersion]))
-> Maybe [PolicyVersion] -> f (Maybe [PolicyVersion]))
-> (Maybe [PolicyVersion] -> f (Maybe [PolicyVersion]))
-> ManagedPolicyDetail
-> f ManagedPolicyDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[PolicyVersion] [PolicyVersion] [PolicyVersion] [PolicyVersion]
-> Iso
(Maybe [PolicyVersion])
(Maybe [PolicyVersion])
(Maybe [PolicyVersion])
(Maybe [PolicyVersion])
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
[PolicyVersion] [PolicyVersion] [PolicyVersion] [PolicyVersion]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
managedPolicyDetail_createDate :: Lens.Lens' ManagedPolicyDetail (Prelude.Maybe Prelude.UTCTime)
managedPolicyDetail_createDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ManagedPolicyDetail -> f ManagedPolicyDetail
managedPolicyDetail_createDate = (ManagedPolicyDetail -> Maybe ISO8601)
-> (ManagedPolicyDetail -> Maybe ISO8601 -> ManagedPolicyDetail)
-> Lens
ManagedPolicyDetail
ManagedPolicyDetail
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedPolicyDetail' {Maybe ISO8601
createDate :: Maybe ISO8601
$sel:createDate:ManagedPolicyDetail' :: ManagedPolicyDetail -> Maybe ISO8601
createDate} -> Maybe ISO8601
createDate) (\s :: ManagedPolicyDetail
s@ManagedPolicyDetail' {} Maybe ISO8601
a -> ManagedPolicyDetail
s {$sel:createDate:ManagedPolicyDetail' :: Maybe ISO8601
createDate = Maybe ISO8601
a} :: ManagedPolicyDetail) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> ManagedPolicyDetail -> f ManagedPolicyDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ManagedPolicyDetail
-> f ManagedPolicyDetail
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
managedPolicyDetail_isAttachable :: Lens.Lens' ManagedPolicyDetail (Prelude.Maybe Prelude.Bool)
managedPolicyDetail_isAttachable :: (Maybe Bool -> f (Maybe Bool))
-> ManagedPolicyDetail -> f ManagedPolicyDetail
managedPolicyDetail_isAttachable = (ManagedPolicyDetail -> Maybe Bool)
-> (ManagedPolicyDetail -> Maybe Bool -> ManagedPolicyDetail)
-> Lens
ManagedPolicyDetail ManagedPolicyDetail (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedPolicyDetail' {Maybe Bool
isAttachable :: Maybe Bool
$sel:isAttachable:ManagedPolicyDetail' :: ManagedPolicyDetail -> Maybe Bool
isAttachable} -> Maybe Bool
isAttachable) (\s :: ManagedPolicyDetail
s@ManagedPolicyDetail' {} Maybe Bool
a -> ManagedPolicyDetail
s {$sel:isAttachable:ManagedPolicyDetail' :: Maybe Bool
isAttachable = Maybe Bool
a} :: ManagedPolicyDetail)
managedPolicyDetail_permissionsBoundaryUsageCount :: Lens.Lens' ManagedPolicyDetail (Prelude.Maybe Prelude.Int)
managedPolicyDetail_permissionsBoundaryUsageCount :: (Maybe Int -> f (Maybe Int))
-> ManagedPolicyDetail -> f ManagedPolicyDetail
managedPolicyDetail_permissionsBoundaryUsageCount = (ManagedPolicyDetail -> Maybe Int)
-> (ManagedPolicyDetail -> Maybe Int -> ManagedPolicyDetail)
-> Lens
ManagedPolicyDetail ManagedPolicyDetail (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedPolicyDetail' {Maybe Int
permissionsBoundaryUsageCount :: Maybe Int
$sel:permissionsBoundaryUsageCount:ManagedPolicyDetail' :: ManagedPolicyDetail -> Maybe Int
permissionsBoundaryUsageCount} -> Maybe Int
permissionsBoundaryUsageCount) (\s :: ManagedPolicyDetail
s@ManagedPolicyDetail' {} Maybe Int
a -> ManagedPolicyDetail
s {$sel:permissionsBoundaryUsageCount:ManagedPolicyDetail' :: Maybe Int
permissionsBoundaryUsageCount = Maybe Int
a} :: ManagedPolicyDetail)
managedPolicyDetail_defaultVersionId :: Lens.Lens' ManagedPolicyDetail (Prelude.Maybe Prelude.Text)
managedPolicyDetail_defaultVersionId :: (Maybe Text -> f (Maybe Text))
-> ManagedPolicyDetail -> f ManagedPolicyDetail
managedPolicyDetail_defaultVersionId = (ManagedPolicyDetail -> Maybe Text)
-> (ManagedPolicyDetail -> Maybe Text -> ManagedPolicyDetail)
-> Lens
ManagedPolicyDetail ManagedPolicyDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedPolicyDetail' {Maybe Text
defaultVersionId :: Maybe Text
$sel:defaultVersionId:ManagedPolicyDetail' :: ManagedPolicyDetail -> Maybe Text
defaultVersionId} -> Maybe Text
defaultVersionId) (\s :: ManagedPolicyDetail
s@ManagedPolicyDetail' {} Maybe Text
a -> ManagedPolicyDetail
s {$sel:defaultVersionId:ManagedPolicyDetail' :: Maybe Text
defaultVersionId = Maybe Text
a} :: ManagedPolicyDetail)
managedPolicyDetail_attachmentCount :: Lens.Lens' ManagedPolicyDetail (Prelude.Maybe Prelude.Int)
managedPolicyDetail_attachmentCount :: (Maybe Int -> f (Maybe Int))
-> ManagedPolicyDetail -> f ManagedPolicyDetail
managedPolicyDetail_attachmentCount = (ManagedPolicyDetail -> Maybe Int)
-> (ManagedPolicyDetail -> Maybe Int -> ManagedPolicyDetail)
-> Lens
ManagedPolicyDetail ManagedPolicyDetail (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedPolicyDetail' {Maybe Int
attachmentCount :: Maybe Int
$sel:attachmentCount:ManagedPolicyDetail' :: ManagedPolicyDetail -> Maybe Int
attachmentCount} -> Maybe Int
attachmentCount) (\s :: ManagedPolicyDetail
s@ManagedPolicyDetail' {} Maybe Int
a -> ManagedPolicyDetail
s {$sel:attachmentCount:ManagedPolicyDetail' :: Maybe Int
attachmentCount = Maybe Int
a} :: ManagedPolicyDetail)
managedPolicyDetail_description :: Lens.Lens' ManagedPolicyDetail (Prelude.Maybe Prelude.Text)
managedPolicyDetail_description :: (Maybe Text -> f (Maybe Text))
-> ManagedPolicyDetail -> f ManagedPolicyDetail
managedPolicyDetail_description = (ManagedPolicyDetail -> Maybe Text)
-> (ManagedPolicyDetail -> Maybe Text -> ManagedPolicyDetail)
-> Lens
ManagedPolicyDetail ManagedPolicyDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedPolicyDetail' {Maybe Text
description :: Maybe Text
$sel:description:ManagedPolicyDetail' :: ManagedPolicyDetail -> Maybe Text
description} -> Maybe Text
description) (\s :: ManagedPolicyDetail
s@ManagedPolicyDetail' {} Maybe Text
a -> ManagedPolicyDetail
s {$sel:description:ManagedPolicyDetail' :: Maybe Text
description = Maybe Text
a} :: ManagedPolicyDetail)
instance Core.FromXML ManagedPolicyDetail where
parseXML :: [Node] -> Either String ManagedPolicyDetail
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe [PolicyVersion]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail
ManagedPolicyDetail'
(Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe [PolicyVersion]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe [PolicyVersion]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail)
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 [PolicyVersion]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail)
-> Either String (Maybe Text)
-> Either
String
(Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe [PolicyVersion]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail)
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 [PolicyVersion]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail)
-> Either String (Maybe ISO8601)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe [PolicyVersion]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail)
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 [PolicyVersion]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe [PolicyVersion]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail)
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 [PolicyVersion]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail)
-> Either String (Maybe Text)
-> Either
String
(Maybe [PolicyVersion]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail)
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 [PolicyVersion]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail)
-> Either String (Maybe [PolicyVersion])
-> Either
String
(Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail)
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
"PolicyVersionList"
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 [PolicyVersion]))
-> Either String (Maybe [PolicyVersion])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [PolicyVersion])
-> [Node] -> Either String (Maybe [PolicyVersion])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [PolicyVersion]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either
String
(Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail)
-> Either String (Maybe ISO8601)
-> Either
String
(Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> ManagedPolicyDetail)
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
-> ManagedPolicyDetail)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Int
-> Maybe Text -> Maybe Int -> Maybe Text -> ManagedPolicyDetail)
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 -> ManagedPolicyDetail)
-> Either String (Maybe Int)
-> Either
String
(Maybe Text -> Maybe Int -> Maybe Text -> ManagedPolicyDetail)
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 -> ManagedPolicyDetail)
-> Either String (Maybe Text)
-> Either String (Maybe Int -> Maybe Text -> ManagedPolicyDetail)
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 -> ManagedPolicyDetail)
-> Either String (Maybe Int)
-> Either String (Maybe Text -> ManagedPolicyDetail)
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 -> ManagedPolicyDetail)
-> Either String (Maybe Text) -> Either String ManagedPolicyDetail
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")
instance Prelude.Hashable ManagedPolicyDetail
instance Prelude.NFData ManagedPolicyDetail