{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DataSetUsageConfiguration = DataSetUsageConfiguration'
{
DataSetUsageConfiguration -> Maybe Bool
disableUseAsImportedSource :: Prelude.Maybe Prelude.Bool,
DataSetUsageConfiguration -> Maybe Bool
disableUseAsDirectQuerySource :: Prelude.Maybe Prelude.Bool
}
deriving (DataSetUsageConfiguration -> DataSetUsageConfiguration -> Bool
(DataSetUsageConfiguration -> DataSetUsageConfiguration -> Bool)
-> (DataSetUsageConfiguration -> DataSetUsageConfiguration -> Bool)
-> Eq DataSetUsageConfiguration
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]
(Int -> ReadS DataSetUsageConfiguration)
-> ReadS [DataSetUsageConfiguration]
-> ReadPrec DataSetUsageConfiguration
-> ReadPrec [DataSetUsageConfiguration]
-> Read 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
(Int -> DataSetUsageConfiguration -> ShowS)
-> (DataSetUsageConfiguration -> String)
-> ([DataSetUsageConfiguration] -> ShowS)
-> Show DataSetUsageConfiguration
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.
DataSetUsageConfiguration -> Rep DataSetUsageConfiguration x)
-> (forall x.
Rep DataSetUsageConfiguration x -> DataSetUsageConfiguration)
-> Generic DataSetUsageConfiguration
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' :: Maybe Bool -> Maybe Bool -> DataSetUsageConfiguration
DataSetUsageConfiguration'
{ $sel:disableUseAsImportedSource:DataSetUsageConfiguration' :: Maybe Bool
disableUseAsImportedSource =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:disableUseAsDirectQuerySource:DataSetUsageConfiguration' :: Maybe Bool
disableUseAsDirectQuerySource = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
dataSetUsageConfiguration_disableUseAsImportedSource :: Lens.Lens' DataSetUsageConfiguration (Prelude.Maybe Prelude.Bool)
dataSetUsageConfiguration_disableUseAsImportedSource :: (Maybe Bool -> f (Maybe Bool))
-> DataSetUsageConfiguration -> f DataSetUsageConfiguration
dataSetUsageConfiguration_disableUseAsImportedSource = (DataSetUsageConfiguration -> Maybe Bool)
-> (DataSetUsageConfiguration
-> Maybe Bool -> DataSetUsageConfiguration)
-> Lens
DataSetUsageConfiguration
DataSetUsageConfiguration
(Maybe Bool)
(Maybe Bool)
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)
dataSetUsageConfiguration_disableUseAsDirectQuerySource :: Lens.Lens' DataSetUsageConfiguration (Prelude.Maybe Prelude.Bool)
dataSetUsageConfiguration_disableUseAsDirectQuerySource :: (Maybe Bool -> f (Maybe Bool))
-> DataSetUsageConfiguration -> f DataSetUsageConfiguration
dataSetUsageConfiguration_disableUseAsDirectQuerySource = (DataSetUsageConfiguration -> Maybe Bool)
-> (DataSetUsageConfiguration
-> Maybe Bool -> DataSetUsageConfiguration)
-> Lens
DataSetUsageConfiguration
DataSetUsageConfiguration
(Maybe Bool)
(Maybe Bool)
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)
instance Core.FromJSON DataSetUsageConfiguration where
parseJSON :: Value -> Parser DataSetUsageConfiguration
parseJSON =
String
-> (Object -> Parser DataSetUsageConfiguration)
-> Value
-> Parser DataSetUsageConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DataSetUsageConfiguration"
( \Object
x ->
Maybe Bool -> Maybe Bool -> DataSetUsageConfiguration
DataSetUsageConfiguration'
(Maybe Bool -> Maybe Bool -> DataSetUsageConfiguration)
-> Parser (Maybe Bool)
-> Parser (Maybe Bool -> DataSetUsageConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DisableUseAsImportedSource")
Parser (Maybe Bool -> DataSetUsageConfiguration)
-> Parser (Maybe Bool) -> Parser DataSetUsageConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DisableUseAsDirectQuerySource")
)
instance Prelude.Hashable DataSetUsageConfiguration
instance Prelude.NFData DataSetUsageConfiguration
instance Core.ToJSON DataSetUsageConfiguration where
toJSON :: DataSetUsageConfiguration -> Value
toJSON DataSetUsageConfiguration' {Maybe Bool
disableUseAsDirectQuerySource :: Maybe Bool
disableUseAsImportedSource :: Maybe Bool
$sel:disableUseAsDirectQuerySource:DataSetUsageConfiguration' :: DataSetUsageConfiguration -> Maybe Bool
$sel:disableUseAsImportedSource:DataSetUsageConfiguration' :: DataSetUsageConfiguration -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DisableUseAsImportedSource" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disableUseAsImportedSource,
(Text
"DisableUseAsDirectQuerySource" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disableUseAsDirectQuerySource
]
)