{-# 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.QuickSight.Types.ActiveIAMPolicyAssignment where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ActiveIAMPolicyAssignment = ActiveIAMPolicyAssignment'
{
ActiveIAMPolicyAssignment -> Maybe Text
assignmentName :: Prelude.Maybe Prelude.Text,
ActiveIAMPolicyAssignment -> Maybe Text
policyArn :: Prelude.Maybe Prelude.Text
}
deriving (ActiveIAMPolicyAssignment -> ActiveIAMPolicyAssignment -> Bool
(ActiveIAMPolicyAssignment -> ActiveIAMPolicyAssignment -> Bool)
-> (ActiveIAMPolicyAssignment -> ActiveIAMPolicyAssignment -> Bool)
-> Eq ActiveIAMPolicyAssignment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActiveIAMPolicyAssignment -> ActiveIAMPolicyAssignment -> Bool
$c/= :: ActiveIAMPolicyAssignment -> ActiveIAMPolicyAssignment -> Bool
== :: ActiveIAMPolicyAssignment -> ActiveIAMPolicyAssignment -> Bool
$c== :: ActiveIAMPolicyAssignment -> ActiveIAMPolicyAssignment -> Bool
Prelude.Eq, ReadPrec [ActiveIAMPolicyAssignment]
ReadPrec ActiveIAMPolicyAssignment
Int -> ReadS ActiveIAMPolicyAssignment
ReadS [ActiveIAMPolicyAssignment]
(Int -> ReadS ActiveIAMPolicyAssignment)
-> ReadS [ActiveIAMPolicyAssignment]
-> ReadPrec ActiveIAMPolicyAssignment
-> ReadPrec [ActiveIAMPolicyAssignment]
-> Read ActiveIAMPolicyAssignment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActiveIAMPolicyAssignment]
$creadListPrec :: ReadPrec [ActiveIAMPolicyAssignment]
readPrec :: ReadPrec ActiveIAMPolicyAssignment
$creadPrec :: ReadPrec ActiveIAMPolicyAssignment
readList :: ReadS [ActiveIAMPolicyAssignment]
$creadList :: ReadS [ActiveIAMPolicyAssignment]
readsPrec :: Int -> ReadS ActiveIAMPolicyAssignment
$creadsPrec :: Int -> ReadS ActiveIAMPolicyAssignment
Prelude.Read, Int -> ActiveIAMPolicyAssignment -> ShowS
[ActiveIAMPolicyAssignment] -> ShowS
ActiveIAMPolicyAssignment -> String
(Int -> ActiveIAMPolicyAssignment -> ShowS)
-> (ActiveIAMPolicyAssignment -> String)
-> ([ActiveIAMPolicyAssignment] -> ShowS)
-> Show ActiveIAMPolicyAssignment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActiveIAMPolicyAssignment] -> ShowS
$cshowList :: [ActiveIAMPolicyAssignment] -> ShowS
show :: ActiveIAMPolicyAssignment -> String
$cshow :: ActiveIAMPolicyAssignment -> String
showsPrec :: Int -> ActiveIAMPolicyAssignment -> ShowS
$cshowsPrec :: Int -> ActiveIAMPolicyAssignment -> ShowS
Prelude.Show, (forall x.
ActiveIAMPolicyAssignment -> Rep ActiveIAMPolicyAssignment x)
-> (forall x.
Rep ActiveIAMPolicyAssignment x -> ActiveIAMPolicyAssignment)
-> Generic ActiveIAMPolicyAssignment
forall x.
Rep ActiveIAMPolicyAssignment x -> ActiveIAMPolicyAssignment
forall x.
ActiveIAMPolicyAssignment -> Rep ActiveIAMPolicyAssignment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ActiveIAMPolicyAssignment x -> ActiveIAMPolicyAssignment
$cfrom :: forall x.
ActiveIAMPolicyAssignment -> Rep ActiveIAMPolicyAssignment x
Prelude.Generic)
newActiveIAMPolicyAssignment ::
ActiveIAMPolicyAssignment
newActiveIAMPolicyAssignment :: ActiveIAMPolicyAssignment
newActiveIAMPolicyAssignment =
ActiveIAMPolicyAssignment' :: Maybe Text -> Maybe Text -> ActiveIAMPolicyAssignment
ActiveIAMPolicyAssignment'
{ $sel:assignmentName:ActiveIAMPolicyAssignment' :: Maybe Text
assignmentName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policyArn:ActiveIAMPolicyAssignment' :: Maybe Text
policyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
activeIAMPolicyAssignment_assignmentName :: Lens.Lens' ActiveIAMPolicyAssignment (Prelude.Maybe Prelude.Text)
activeIAMPolicyAssignment_assignmentName :: (Maybe Text -> f (Maybe Text))
-> ActiveIAMPolicyAssignment -> f ActiveIAMPolicyAssignment
activeIAMPolicyAssignment_assignmentName = (ActiveIAMPolicyAssignment -> Maybe Text)
-> (ActiveIAMPolicyAssignment
-> Maybe Text -> ActiveIAMPolicyAssignment)
-> Lens
ActiveIAMPolicyAssignment
ActiveIAMPolicyAssignment
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActiveIAMPolicyAssignment' {Maybe Text
assignmentName :: Maybe Text
$sel:assignmentName:ActiveIAMPolicyAssignment' :: ActiveIAMPolicyAssignment -> Maybe Text
assignmentName} -> Maybe Text
assignmentName) (\s :: ActiveIAMPolicyAssignment
s@ActiveIAMPolicyAssignment' {} Maybe Text
a -> ActiveIAMPolicyAssignment
s {$sel:assignmentName:ActiveIAMPolicyAssignment' :: Maybe Text
assignmentName = Maybe Text
a} :: ActiveIAMPolicyAssignment)
activeIAMPolicyAssignment_policyArn :: Lens.Lens' ActiveIAMPolicyAssignment (Prelude.Maybe Prelude.Text)
activeIAMPolicyAssignment_policyArn :: (Maybe Text -> f (Maybe Text))
-> ActiveIAMPolicyAssignment -> f ActiveIAMPolicyAssignment
activeIAMPolicyAssignment_policyArn = (ActiveIAMPolicyAssignment -> Maybe Text)
-> (ActiveIAMPolicyAssignment
-> Maybe Text -> ActiveIAMPolicyAssignment)
-> Lens
ActiveIAMPolicyAssignment
ActiveIAMPolicyAssignment
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActiveIAMPolicyAssignment' {Maybe Text
policyArn :: Maybe Text
$sel:policyArn:ActiveIAMPolicyAssignment' :: ActiveIAMPolicyAssignment -> Maybe Text
policyArn} -> Maybe Text
policyArn) (\s :: ActiveIAMPolicyAssignment
s@ActiveIAMPolicyAssignment' {} Maybe Text
a -> ActiveIAMPolicyAssignment
s {$sel:policyArn:ActiveIAMPolicyAssignment' :: Maybe Text
policyArn = Maybe Text
a} :: ActiveIAMPolicyAssignment)
instance Core.FromJSON ActiveIAMPolicyAssignment where
parseJSON :: Value -> Parser ActiveIAMPolicyAssignment
parseJSON =
String
-> (Object -> Parser ActiveIAMPolicyAssignment)
-> Value
-> Parser ActiveIAMPolicyAssignment
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ActiveIAMPolicyAssignment"
( \Object
x ->
Maybe Text -> Maybe Text -> ActiveIAMPolicyAssignment
ActiveIAMPolicyAssignment'
(Maybe Text -> Maybe Text -> ActiveIAMPolicyAssignment)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ActiveIAMPolicyAssignment)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AssignmentName")
Parser (Maybe Text -> ActiveIAMPolicyAssignment)
-> Parser (Maybe Text) -> Parser ActiveIAMPolicyAssignment
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PolicyArn")
)
instance Prelude.Hashable ActiveIAMPolicyAssignment
instance Prelude.NFData ActiveIAMPolicyAssignment