{-# 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.RowLevelPermissionDataSet where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types.RowLevelPermissionFormatVersion
import Amazonka.QuickSight.Types.RowLevelPermissionPolicy
import Amazonka.QuickSight.Types.Status
data RowLevelPermissionDataSet = RowLevelPermissionDataSet'
{
RowLevelPermissionDataSet -> Maybe RowLevelPermissionFormatVersion
formatVersion :: Prelude.Maybe RowLevelPermissionFormatVersion,
RowLevelPermissionDataSet -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
RowLevelPermissionDataSet -> Maybe Status
status :: Prelude.Maybe Status,
RowLevelPermissionDataSet -> Text
arn :: Prelude.Text,
RowLevelPermissionDataSet -> RowLevelPermissionPolicy
permissionPolicy :: RowLevelPermissionPolicy
}
deriving (RowLevelPermissionDataSet -> RowLevelPermissionDataSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RowLevelPermissionDataSet -> RowLevelPermissionDataSet -> Bool
$c/= :: RowLevelPermissionDataSet -> RowLevelPermissionDataSet -> Bool
== :: RowLevelPermissionDataSet -> RowLevelPermissionDataSet -> Bool
$c== :: RowLevelPermissionDataSet -> RowLevelPermissionDataSet -> Bool
Prelude.Eq, ReadPrec [RowLevelPermissionDataSet]
ReadPrec RowLevelPermissionDataSet
Int -> ReadS RowLevelPermissionDataSet
ReadS [RowLevelPermissionDataSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RowLevelPermissionDataSet]
$creadListPrec :: ReadPrec [RowLevelPermissionDataSet]
readPrec :: ReadPrec RowLevelPermissionDataSet
$creadPrec :: ReadPrec RowLevelPermissionDataSet
readList :: ReadS [RowLevelPermissionDataSet]
$creadList :: ReadS [RowLevelPermissionDataSet]
readsPrec :: Int -> ReadS RowLevelPermissionDataSet
$creadsPrec :: Int -> ReadS RowLevelPermissionDataSet
Prelude.Read, Int -> RowLevelPermissionDataSet -> ShowS
[RowLevelPermissionDataSet] -> ShowS
RowLevelPermissionDataSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RowLevelPermissionDataSet] -> ShowS
$cshowList :: [RowLevelPermissionDataSet] -> ShowS
show :: RowLevelPermissionDataSet -> String
$cshow :: RowLevelPermissionDataSet -> String
showsPrec :: Int -> RowLevelPermissionDataSet -> ShowS
$cshowsPrec :: Int -> RowLevelPermissionDataSet -> ShowS
Prelude.Show, forall x.
Rep RowLevelPermissionDataSet x -> RowLevelPermissionDataSet
forall x.
RowLevelPermissionDataSet -> Rep RowLevelPermissionDataSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RowLevelPermissionDataSet x -> RowLevelPermissionDataSet
$cfrom :: forall x.
RowLevelPermissionDataSet -> Rep RowLevelPermissionDataSet x
Prelude.Generic)
newRowLevelPermissionDataSet ::
Prelude.Text ->
RowLevelPermissionPolicy ->
RowLevelPermissionDataSet
newRowLevelPermissionDataSet :: Text -> RowLevelPermissionPolicy -> RowLevelPermissionDataSet
newRowLevelPermissionDataSet Text
pArn_ RowLevelPermissionPolicy
pPermissionPolicy_ =
RowLevelPermissionDataSet'
{ $sel:formatVersion:RowLevelPermissionDataSet' :: Maybe RowLevelPermissionFormatVersion
formatVersion =
forall a. Maybe a
Prelude.Nothing,
$sel:namespace:RowLevelPermissionDataSet' :: Maybe Text
namespace = forall a. Maybe a
Prelude.Nothing,
$sel:status:RowLevelPermissionDataSet' :: Maybe Status
status = forall a. Maybe a
Prelude.Nothing,
$sel:arn:RowLevelPermissionDataSet' :: Text
arn = Text
pArn_,
$sel:permissionPolicy:RowLevelPermissionDataSet' :: RowLevelPermissionPolicy
permissionPolicy = RowLevelPermissionPolicy
pPermissionPolicy_
}
rowLevelPermissionDataSet_formatVersion :: Lens.Lens' RowLevelPermissionDataSet (Prelude.Maybe RowLevelPermissionFormatVersion)
rowLevelPermissionDataSet_formatVersion :: Lens'
RowLevelPermissionDataSet (Maybe RowLevelPermissionFormatVersion)
rowLevelPermissionDataSet_formatVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RowLevelPermissionDataSet' {Maybe RowLevelPermissionFormatVersion
formatVersion :: Maybe RowLevelPermissionFormatVersion
$sel:formatVersion:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Maybe RowLevelPermissionFormatVersion
formatVersion} -> Maybe RowLevelPermissionFormatVersion
formatVersion) (\s :: RowLevelPermissionDataSet
s@RowLevelPermissionDataSet' {} Maybe RowLevelPermissionFormatVersion
a -> RowLevelPermissionDataSet
s {$sel:formatVersion:RowLevelPermissionDataSet' :: Maybe RowLevelPermissionFormatVersion
formatVersion = Maybe RowLevelPermissionFormatVersion
a} :: RowLevelPermissionDataSet)
rowLevelPermissionDataSet_namespace :: Lens.Lens' RowLevelPermissionDataSet (Prelude.Maybe Prelude.Text)
rowLevelPermissionDataSet_namespace :: Lens' RowLevelPermissionDataSet (Maybe Text)
rowLevelPermissionDataSet_namespace = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RowLevelPermissionDataSet' {Maybe Text
namespace :: Maybe Text
$sel:namespace:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: RowLevelPermissionDataSet
s@RowLevelPermissionDataSet' {} Maybe Text
a -> RowLevelPermissionDataSet
s {$sel:namespace:RowLevelPermissionDataSet' :: Maybe Text
namespace = Maybe Text
a} :: RowLevelPermissionDataSet)
rowLevelPermissionDataSet_status :: Lens.Lens' RowLevelPermissionDataSet (Prelude.Maybe Status)
rowLevelPermissionDataSet_status :: Lens' RowLevelPermissionDataSet (Maybe Status)
rowLevelPermissionDataSet_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RowLevelPermissionDataSet' {Maybe Status
status :: Maybe Status
$sel:status:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Maybe Status
status} -> Maybe Status
status) (\s :: RowLevelPermissionDataSet
s@RowLevelPermissionDataSet' {} Maybe Status
a -> RowLevelPermissionDataSet
s {$sel:status:RowLevelPermissionDataSet' :: Maybe Status
status = Maybe Status
a} :: RowLevelPermissionDataSet)
rowLevelPermissionDataSet_arn :: Lens.Lens' RowLevelPermissionDataSet Prelude.Text
rowLevelPermissionDataSet_arn :: Lens' RowLevelPermissionDataSet Text
rowLevelPermissionDataSet_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RowLevelPermissionDataSet' {Text
arn :: Text
$sel:arn:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Text
arn} -> Text
arn) (\s :: RowLevelPermissionDataSet
s@RowLevelPermissionDataSet' {} Text
a -> RowLevelPermissionDataSet
s {$sel:arn:RowLevelPermissionDataSet' :: Text
arn = Text
a} :: RowLevelPermissionDataSet)
rowLevelPermissionDataSet_permissionPolicy :: Lens.Lens' RowLevelPermissionDataSet RowLevelPermissionPolicy
rowLevelPermissionDataSet_permissionPolicy :: Lens' RowLevelPermissionDataSet RowLevelPermissionPolicy
rowLevelPermissionDataSet_permissionPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RowLevelPermissionDataSet' {RowLevelPermissionPolicy
permissionPolicy :: RowLevelPermissionPolicy
$sel:permissionPolicy:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> RowLevelPermissionPolicy
permissionPolicy} -> RowLevelPermissionPolicy
permissionPolicy) (\s :: RowLevelPermissionDataSet
s@RowLevelPermissionDataSet' {} RowLevelPermissionPolicy
a -> RowLevelPermissionDataSet
s {$sel:permissionPolicy:RowLevelPermissionDataSet' :: RowLevelPermissionPolicy
permissionPolicy = RowLevelPermissionPolicy
a} :: RowLevelPermissionDataSet)
instance Data.FromJSON RowLevelPermissionDataSet where
parseJSON :: Value -> Parser RowLevelPermissionDataSet
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RowLevelPermissionDataSet"
( \Object
x ->
Maybe RowLevelPermissionFormatVersion
-> Maybe Text
-> Maybe Status
-> Text
-> RowLevelPermissionPolicy
-> RowLevelPermissionDataSet
RowLevelPermissionDataSet'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FormatVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Namespace")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Status")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"PermissionPolicy")
)
instance Prelude.Hashable RowLevelPermissionDataSet where
hashWithSalt :: Int -> RowLevelPermissionDataSet -> Int
hashWithSalt Int
_salt RowLevelPermissionDataSet' {Maybe Text
Maybe RowLevelPermissionFormatVersion
Maybe Status
Text
RowLevelPermissionPolicy
permissionPolicy :: RowLevelPermissionPolicy
arn :: Text
status :: Maybe Status
namespace :: Maybe Text
formatVersion :: Maybe RowLevelPermissionFormatVersion
$sel:permissionPolicy:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> RowLevelPermissionPolicy
$sel:arn:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Text
$sel:status:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Maybe Status
$sel:namespace:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Maybe Text
$sel:formatVersion:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Maybe RowLevelPermissionFormatVersion
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RowLevelPermissionFormatVersion
formatVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
namespace
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Status
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` RowLevelPermissionPolicy
permissionPolicy
instance Prelude.NFData RowLevelPermissionDataSet where
rnf :: RowLevelPermissionDataSet -> ()
rnf RowLevelPermissionDataSet' {Maybe Text
Maybe RowLevelPermissionFormatVersion
Maybe Status
Text
RowLevelPermissionPolicy
permissionPolicy :: RowLevelPermissionPolicy
arn :: Text
status :: Maybe Status
namespace :: Maybe Text
formatVersion :: Maybe RowLevelPermissionFormatVersion
$sel:permissionPolicy:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> RowLevelPermissionPolicy
$sel:arn:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Text
$sel:status:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Maybe Status
$sel:namespace:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Maybe Text
$sel:formatVersion:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Maybe RowLevelPermissionFormatVersion
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe RowLevelPermissionFormatVersion
formatVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
namespace
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Status
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf RowLevelPermissionPolicy
permissionPolicy
instance Data.ToJSON RowLevelPermissionDataSet where
toJSON :: RowLevelPermissionDataSet -> Value
toJSON RowLevelPermissionDataSet' {Maybe Text
Maybe RowLevelPermissionFormatVersion
Maybe Status
Text
RowLevelPermissionPolicy
permissionPolicy :: RowLevelPermissionPolicy
arn :: Text
status :: Maybe Status
namespace :: Maybe Text
formatVersion :: Maybe RowLevelPermissionFormatVersion
$sel:permissionPolicy:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> RowLevelPermissionPolicy
$sel:arn:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Text
$sel:status:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Maybe Status
$sel:namespace:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Maybe Text
$sel:formatVersion:RowLevelPermissionDataSet' :: RowLevelPermissionDataSet -> Maybe RowLevelPermissionFormatVersion
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"FormatVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RowLevelPermissionFormatVersion
formatVersion,
(Key
"Namespace" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
namespace,
(Key
"Status" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Status
status,
forall a. a -> Maybe a
Prelude.Just (Key
"Arn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
arn),
forall a. a -> Maybe a
Prelude.Just
(Key
"PermissionPolicy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= RowLevelPermissionPolicy
permissionPolicy)
]
)