{-# 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.AccessAnalyzer.Types.PolicyGenerationDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PolicyGenerationDetails = PolicyGenerationDetails'
{
PolicyGenerationDetails -> Text
principalArn :: Prelude.Text
}
deriving (PolicyGenerationDetails -> PolicyGenerationDetails -> Bool
(PolicyGenerationDetails -> PolicyGenerationDetails -> Bool)
-> (PolicyGenerationDetails -> PolicyGenerationDetails -> Bool)
-> Eq PolicyGenerationDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PolicyGenerationDetails -> PolicyGenerationDetails -> Bool
$c/= :: PolicyGenerationDetails -> PolicyGenerationDetails -> Bool
== :: PolicyGenerationDetails -> PolicyGenerationDetails -> Bool
$c== :: PolicyGenerationDetails -> PolicyGenerationDetails -> Bool
Prelude.Eq, ReadPrec [PolicyGenerationDetails]
ReadPrec PolicyGenerationDetails
Int -> ReadS PolicyGenerationDetails
ReadS [PolicyGenerationDetails]
(Int -> ReadS PolicyGenerationDetails)
-> ReadS [PolicyGenerationDetails]
-> ReadPrec PolicyGenerationDetails
-> ReadPrec [PolicyGenerationDetails]
-> Read PolicyGenerationDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PolicyGenerationDetails]
$creadListPrec :: ReadPrec [PolicyGenerationDetails]
readPrec :: ReadPrec PolicyGenerationDetails
$creadPrec :: ReadPrec PolicyGenerationDetails
readList :: ReadS [PolicyGenerationDetails]
$creadList :: ReadS [PolicyGenerationDetails]
readsPrec :: Int -> ReadS PolicyGenerationDetails
$creadsPrec :: Int -> ReadS PolicyGenerationDetails
Prelude.Read, Int -> PolicyGenerationDetails -> ShowS
[PolicyGenerationDetails] -> ShowS
PolicyGenerationDetails -> String
(Int -> PolicyGenerationDetails -> ShowS)
-> (PolicyGenerationDetails -> String)
-> ([PolicyGenerationDetails] -> ShowS)
-> Show PolicyGenerationDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PolicyGenerationDetails] -> ShowS
$cshowList :: [PolicyGenerationDetails] -> ShowS
show :: PolicyGenerationDetails -> String
$cshow :: PolicyGenerationDetails -> String
showsPrec :: Int -> PolicyGenerationDetails -> ShowS
$cshowsPrec :: Int -> PolicyGenerationDetails -> ShowS
Prelude.Show, (forall x.
PolicyGenerationDetails -> Rep PolicyGenerationDetails x)
-> (forall x.
Rep PolicyGenerationDetails x -> PolicyGenerationDetails)
-> Generic PolicyGenerationDetails
forall x. Rep PolicyGenerationDetails x -> PolicyGenerationDetails
forall x. PolicyGenerationDetails -> Rep PolicyGenerationDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PolicyGenerationDetails x -> PolicyGenerationDetails
$cfrom :: forall x. PolicyGenerationDetails -> Rep PolicyGenerationDetails x
Prelude.Generic)
newPolicyGenerationDetails ::
Prelude.Text ->
PolicyGenerationDetails
newPolicyGenerationDetails :: Text -> PolicyGenerationDetails
newPolicyGenerationDetails Text
pPrincipalArn_ =
PolicyGenerationDetails' :: Text -> PolicyGenerationDetails
PolicyGenerationDetails'
{ $sel:principalArn:PolicyGenerationDetails' :: Text
principalArn =
Text
pPrincipalArn_
}
policyGenerationDetails_principalArn :: Lens.Lens' PolicyGenerationDetails Prelude.Text
policyGenerationDetails_principalArn :: (Text -> f Text)
-> PolicyGenerationDetails -> f PolicyGenerationDetails
policyGenerationDetails_principalArn = (PolicyGenerationDetails -> Text)
-> (PolicyGenerationDetails -> Text -> PolicyGenerationDetails)
-> Lens PolicyGenerationDetails PolicyGenerationDetails Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyGenerationDetails' {Text
principalArn :: Text
$sel:principalArn:PolicyGenerationDetails' :: PolicyGenerationDetails -> Text
principalArn} -> Text
principalArn) (\s :: PolicyGenerationDetails
s@PolicyGenerationDetails' {} Text
a -> PolicyGenerationDetails
s {$sel:principalArn:PolicyGenerationDetails' :: Text
principalArn = Text
a} :: PolicyGenerationDetails)
instance Prelude.Hashable PolicyGenerationDetails
instance Prelude.NFData PolicyGenerationDetails
instance Core.ToJSON PolicyGenerationDetails where
toJSON :: PolicyGenerationDetails -> Value
toJSON PolicyGenerationDetails' {Text
principalArn :: Text
$sel:principalArn:PolicyGenerationDetails' :: PolicyGenerationDetails -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"principalArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
principalArn)]
)