{-# 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.DataSetUsageConfiguration 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
data DataSetUsageConfiguration = DataSetUsageConfiguration'
{
DataSetUsageConfiguration -> Maybe Bool
disableUseAsDirectQuerySource :: Prelude.Maybe Prelude.Bool,
DataSetUsageConfiguration -> Maybe Bool
disableUseAsImportedSource :: Prelude.Maybe Prelude.Bool
}
deriving (DataSetUsageConfiguration -> DataSetUsageConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataSetUsageConfiguration -> DataSetUsageConfiguration -> Bool
$c/= :: DataSetUsageConfiguration -> DataSetUsageConfiguration -> Bool
== :: DataSetUsageConfiguration -> DataSetUsageConfiguration -> Bool
$c== :: DataSetUsageConfiguration -> DataSetUsageConfiguration -> Bool
Prelude.Eq, ReadPrec [DataSetUsageConfiguration]
ReadPrec DataSetUsageConfiguration
Int -> ReadS DataSetUsageConfiguration
ReadS [DataSetUsageConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataSetUsageConfiguration]
$creadListPrec :: ReadPrec [DataSetUsageConfiguration]
readPrec :: ReadPrec DataSetUsageConfiguration
$creadPrec :: ReadPrec DataSetUsageConfiguration
readList :: ReadS [DataSetUsageConfiguration]
$creadList :: ReadS [DataSetUsageConfiguration]
readsPrec :: Int -> ReadS DataSetUsageConfiguration
$creadsPrec :: Int -> ReadS DataSetUsageConfiguration
Prelude.Read, Int -> DataSetUsageConfiguration -> ShowS
[DataSetUsageConfiguration] -> ShowS
DataSetUsageConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataSetUsageConfiguration] -> ShowS
$cshowList :: [DataSetUsageConfiguration] -> ShowS
show :: DataSetUsageConfiguration -> String
$cshow :: DataSetUsageConfiguration -> String
showsPrec :: Int -> DataSetUsageConfiguration -> ShowS
$cshowsPrec :: Int -> DataSetUsageConfiguration -> ShowS
Prelude.Show, forall x.
Rep DataSetUsageConfiguration x -> DataSetUsageConfiguration
forall x.
DataSetUsageConfiguration -> Rep DataSetUsageConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DataSetUsageConfiguration x -> DataSetUsageConfiguration
$cfrom :: forall x.
DataSetUsageConfiguration -> Rep DataSetUsageConfiguration x
Prelude.Generic)
newDataSetUsageConfiguration ::
DataSetUsageConfiguration
newDataSetUsageConfiguration :: DataSetUsageConfiguration
newDataSetUsageConfiguration =
DataSetUsageConfiguration'
{ $sel:disableUseAsDirectQuerySource:DataSetUsageConfiguration' :: Maybe Bool
disableUseAsDirectQuerySource =
forall a. Maybe a
Prelude.Nothing,
$sel:disableUseAsImportedSource:DataSetUsageConfiguration' :: Maybe Bool
disableUseAsImportedSource = forall a. Maybe a
Prelude.Nothing
}
dataSetUsageConfiguration_disableUseAsDirectQuerySource :: Lens.Lens' DataSetUsageConfiguration (Prelude.Maybe Prelude.Bool)
dataSetUsageConfiguration_disableUseAsDirectQuerySource :: Lens' DataSetUsageConfiguration (Maybe Bool)
dataSetUsageConfiguration_disableUseAsDirectQuerySource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetUsageConfiguration' {Maybe Bool
disableUseAsDirectQuerySource :: Maybe Bool
$sel:disableUseAsDirectQuerySource:DataSetUsageConfiguration' :: DataSetUsageConfiguration -> Maybe Bool
disableUseAsDirectQuerySource} -> Maybe Bool
disableUseAsDirectQuerySource) (\s :: DataSetUsageConfiguration
s@DataSetUsageConfiguration' {} Maybe Bool
a -> DataSetUsageConfiguration
s {$sel:disableUseAsDirectQuerySource:DataSetUsageConfiguration' :: Maybe Bool
disableUseAsDirectQuerySource = Maybe Bool
a} :: DataSetUsageConfiguration)
dataSetUsageConfiguration_disableUseAsImportedSource :: Lens.Lens' DataSetUsageConfiguration (Prelude.Maybe Prelude.Bool)
dataSetUsageConfiguration_disableUseAsImportedSource :: Lens' DataSetUsageConfiguration (Maybe Bool)
dataSetUsageConfiguration_disableUseAsImportedSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetUsageConfiguration' {Maybe Bool
disableUseAsImportedSource :: Maybe Bool
$sel:disableUseAsImportedSource:DataSetUsageConfiguration' :: DataSetUsageConfiguration -> Maybe Bool
disableUseAsImportedSource} -> Maybe Bool
disableUseAsImportedSource) (\s :: DataSetUsageConfiguration
s@DataSetUsageConfiguration' {} Maybe Bool
a -> DataSetUsageConfiguration
s {$sel:disableUseAsImportedSource:DataSetUsageConfiguration' :: Maybe Bool
disableUseAsImportedSource = Maybe Bool
a} :: DataSetUsageConfiguration)
instance Data.FromJSON DataSetUsageConfiguration where
parseJSON :: Value -> Parser DataSetUsageConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DataSetUsageConfiguration"
( \Object
x ->
Maybe Bool -> Maybe Bool -> DataSetUsageConfiguration
DataSetUsageConfiguration'
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
"DisableUseAsDirectQuerySource")
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
"DisableUseAsImportedSource")
)
instance Prelude.Hashable DataSetUsageConfiguration where
hashWithSalt :: Int -> DataSetUsageConfiguration -> Int
hashWithSalt Int
_salt DataSetUsageConfiguration' {Maybe Bool
disableUseAsImportedSource :: Maybe Bool
disableUseAsDirectQuerySource :: Maybe Bool
$sel:disableUseAsImportedSource:DataSetUsageConfiguration' :: DataSetUsageConfiguration -> Maybe Bool
$sel:disableUseAsDirectQuerySource:DataSetUsageConfiguration' :: DataSetUsageConfiguration -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disableUseAsDirectQuerySource
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disableUseAsImportedSource
instance Prelude.NFData DataSetUsageConfiguration where
rnf :: DataSetUsageConfiguration -> ()
rnf DataSetUsageConfiguration' {Maybe Bool
disableUseAsImportedSource :: Maybe Bool
disableUseAsDirectQuerySource :: Maybe Bool
$sel:disableUseAsImportedSource:DataSetUsageConfiguration' :: DataSetUsageConfiguration -> Maybe Bool
$sel:disableUseAsDirectQuerySource:DataSetUsageConfiguration' :: DataSetUsageConfiguration -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disableUseAsDirectQuerySource
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disableUseAsImportedSource
instance Data.ToJSON DataSetUsageConfiguration where
toJSON :: DataSetUsageConfiguration -> Value
toJSON DataSetUsageConfiguration' {Maybe Bool
disableUseAsImportedSource :: Maybe Bool
disableUseAsDirectQuerySource :: Maybe Bool
$sel:disableUseAsImportedSource:DataSetUsageConfiguration' :: DataSetUsageConfiguration -> Maybe Bool
$sel:disableUseAsDirectQuerySource:DataSetUsageConfiguration' :: DataSetUsageConfiguration -> Maybe Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"DisableUseAsDirectQuerySource" 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 Bool
disableUseAsDirectQuerySource,
(Key
"DisableUseAsImportedSource" 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 Bool
disableUseAsImportedSource
]
)