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