{-# 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.DataSetConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types.ColumnGroupSchema
import Amazonka.QuickSight.Types.DataSetSchema
data DataSetConfiguration = DataSetConfiguration'
{
DataSetConfiguration -> Maybe [ColumnGroupSchema]
columnGroupSchemaList :: Prelude.Maybe [ColumnGroupSchema],
DataSetConfiguration -> Maybe DataSetSchema
dataSetSchema :: Prelude.Maybe DataSetSchema,
DataSetConfiguration -> Maybe Text
placeholder :: Prelude.Maybe Prelude.Text
}
deriving (DataSetConfiguration -> DataSetConfiguration -> Bool
(DataSetConfiguration -> DataSetConfiguration -> Bool)
-> (DataSetConfiguration -> DataSetConfiguration -> Bool)
-> Eq DataSetConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataSetConfiguration -> DataSetConfiguration -> Bool
$c/= :: DataSetConfiguration -> DataSetConfiguration -> Bool
== :: DataSetConfiguration -> DataSetConfiguration -> Bool
$c== :: DataSetConfiguration -> DataSetConfiguration -> Bool
Prelude.Eq, ReadPrec [DataSetConfiguration]
ReadPrec DataSetConfiguration
Int -> ReadS DataSetConfiguration
ReadS [DataSetConfiguration]
(Int -> ReadS DataSetConfiguration)
-> ReadS [DataSetConfiguration]
-> ReadPrec DataSetConfiguration
-> ReadPrec [DataSetConfiguration]
-> Read DataSetConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataSetConfiguration]
$creadListPrec :: ReadPrec [DataSetConfiguration]
readPrec :: ReadPrec DataSetConfiguration
$creadPrec :: ReadPrec DataSetConfiguration
readList :: ReadS [DataSetConfiguration]
$creadList :: ReadS [DataSetConfiguration]
readsPrec :: Int -> ReadS DataSetConfiguration
$creadsPrec :: Int -> ReadS DataSetConfiguration
Prelude.Read, Int -> DataSetConfiguration -> ShowS
[DataSetConfiguration] -> ShowS
DataSetConfiguration -> String
(Int -> DataSetConfiguration -> ShowS)
-> (DataSetConfiguration -> String)
-> ([DataSetConfiguration] -> ShowS)
-> Show DataSetConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataSetConfiguration] -> ShowS
$cshowList :: [DataSetConfiguration] -> ShowS
show :: DataSetConfiguration -> String
$cshow :: DataSetConfiguration -> String
showsPrec :: Int -> DataSetConfiguration -> ShowS
$cshowsPrec :: Int -> DataSetConfiguration -> ShowS
Prelude.Show, (forall x. DataSetConfiguration -> Rep DataSetConfiguration x)
-> (forall x. Rep DataSetConfiguration x -> DataSetConfiguration)
-> Generic DataSetConfiguration
forall x. Rep DataSetConfiguration x -> DataSetConfiguration
forall x. DataSetConfiguration -> Rep DataSetConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DataSetConfiguration x -> DataSetConfiguration
$cfrom :: forall x. DataSetConfiguration -> Rep DataSetConfiguration x
Prelude.Generic)
newDataSetConfiguration ::
DataSetConfiguration
newDataSetConfiguration :: DataSetConfiguration
newDataSetConfiguration =
DataSetConfiguration' :: Maybe [ColumnGroupSchema]
-> Maybe DataSetSchema -> Maybe Text -> DataSetConfiguration
DataSetConfiguration'
{ $sel:columnGroupSchemaList:DataSetConfiguration' :: Maybe [ColumnGroupSchema]
columnGroupSchemaList =
Maybe [ColumnGroupSchema]
forall a. Maybe a
Prelude.Nothing,
$sel:dataSetSchema:DataSetConfiguration' :: Maybe DataSetSchema
dataSetSchema = Maybe DataSetSchema
forall a. Maybe a
Prelude.Nothing,
$sel:placeholder:DataSetConfiguration' :: Maybe Text
placeholder = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
dataSetConfiguration_columnGroupSchemaList :: Lens.Lens' DataSetConfiguration (Prelude.Maybe [ColumnGroupSchema])
dataSetConfiguration_columnGroupSchemaList :: (Maybe [ColumnGroupSchema] -> f (Maybe [ColumnGroupSchema]))
-> DataSetConfiguration -> f DataSetConfiguration
dataSetConfiguration_columnGroupSchemaList = (DataSetConfiguration -> Maybe [ColumnGroupSchema])
-> (DataSetConfiguration
-> Maybe [ColumnGroupSchema] -> DataSetConfiguration)
-> Lens
DataSetConfiguration
DataSetConfiguration
(Maybe [ColumnGroupSchema])
(Maybe [ColumnGroupSchema])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetConfiguration' {Maybe [ColumnGroupSchema]
columnGroupSchemaList :: Maybe [ColumnGroupSchema]
$sel:columnGroupSchemaList:DataSetConfiguration' :: DataSetConfiguration -> Maybe [ColumnGroupSchema]
columnGroupSchemaList} -> Maybe [ColumnGroupSchema]
columnGroupSchemaList) (\s :: DataSetConfiguration
s@DataSetConfiguration' {} Maybe [ColumnGroupSchema]
a -> DataSetConfiguration
s {$sel:columnGroupSchemaList:DataSetConfiguration' :: Maybe [ColumnGroupSchema]
columnGroupSchemaList = Maybe [ColumnGroupSchema]
a} :: DataSetConfiguration) ((Maybe [ColumnGroupSchema] -> f (Maybe [ColumnGroupSchema]))
-> DataSetConfiguration -> f DataSetConfiguration)
-> ((Maybe [ColumnGroupSchema] -> f (Maybe [ColumnGroupSchema]))
-> Maybe [ColumnGroupSchema] -> f (Maybe [ColumnGroupSchema]))
-> (Maybe [ColumnGroupSchema] -> f (Maybe [ColumnGroupSchema]))
-> DataSetConfiguration
-> f DataSetConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ColumnGroupSchema]
[ColumnGroupSchema]
[ColumnGroupSchema]
[ColumnGroupSchema]
-> Iso
(Maybe [ColumnGroupSchema])
(Maybe [ColumnGroupSchema])
(Maybe [ColumnGroupSchema])
(Maybe [ColumnGroupSchema])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[ColumnGroupSchema]
[ColumnGroupSchema]
[ColumnGroupSchema]
[ColumnGroupSchema]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
dataSetConfiguration_dataSetSchema :: Lens.Lens' DataSetConfiguration (Prelude.Maybe DataSetSchema)
dataSetConfiguration_dataSetSchema :: (Maybe DataSetSchema -> f (Maybe DataSetSchema))
-> DataSetConfiguration -> f DataSetConfiguration
dataSetConfiguration_dataSetSchema = (DataSetConfiguration -> Maybe DataSetSchema)
-> (DataSetConfiguration
-> Maybe DataSetSchema -> DataSetConfiguration)
-> Lens
DataSetConfiguration
DataSetConfiguration
(Maybe DataSetSchema)
(Maybe DataSetSchema)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetConfiguration' {Maybe DataSetSchema
dataSetSchema :: Maybe DataSetSchema
$sel:dataSetSchema:DataSetConfiguration' :: DataSetConfiguration -> Maybe DataSetSchema
dataSetSchema} -> Maybe DataSetSchema
dataSetSchema) (\s :: DataSetConfiguration
s@DataSetConfiguration' {} Maybe DataSetSchema
a -> DataSetConfiguration
s {$sel:dataSetSchema:DataSetConfiguration' :: Maybe DataSetSchema
dataSetSchema = Maybe DataSetSchema
a} :: DataSetConfiguration)
dataSetConfiguration_placeholder :: Lens.Lens' DataSetConfiguration (Prelude.Maybe Prelude.Text)
dataSetConfiguration_placeholder :: (Maybe Text -> f (Maybe Text))
-> DataSetConfiguration -> f DataSetConfiguration
dataSetConfiguration_placeholder = (DataSetConfiguration -> Maybe Text)
-> (DataSetConfiguration -> Maybe Text -> DataSetConfiguration)
-> Lens
DataSetConfiguration DataSetConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetConfiguration' {Maybe Text
placeholder :: Maybe Text
$sel:placeholder:DataSetConfiguration' :: DataSetConfiguration -> Maybe Text
placeholder} -> Maybe Text
placeholder) (\s :: DataSetConfiguration
s@DataSetConfiguration' {} Maybe Text
a -> DataSetConfiguration
s {$sel:placeholder:DataSetConfiguration' :: Maybe Text
placeholder = Maybe Text
a} :: DataSetConfiguration)
instance Core.FromJSON DataSetConfiguration where
parseJSON :: Value -> Parser DataSetConfiguration
parseJSON =
String
-> (Object -> Parser DataSetConfiguration)
-> Value
-> Parser DataSetConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DataSetConfiguration"
( \Object
x ->
Maybe [ColumnGroupSchema]
-> Maybe DataSetSchema -> Maybe Text -> DataSetConfiguration
DataSetConfiguration'
(Maybe [ColumnGroupSchema]
-> Maybe DataSetSchema -> Maybe Text -> DataSetConfiguration)
-> Parser (Maybe [ColumnGroupSchema])
-> Parser
(Maybe DataSetSchema -> Maybe Text -> DataSetConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ColumnGroupSchema]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ColumnGroupSchemaList"
Parser (Maybe (Maybe [ColumnGroupSchema]))
-> Maybe [ColumnGroupSchema] -> Parser (Maybe [ColumnGroupSchema])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ColumnGroupSchema]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe DataSetSchema -> Maybe Text -> DataSetConfiguration)
-> Parser (Maybe DataSetSchema)
-> Parser (Maybe Text -> DataSetConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DataSetSchema)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DataSetSchema")
Parser (Maybe Text -> DataSetConfiguration)
-> Parser (Maybe Text) -> Parser DataSetConfiguration
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
"Placeholder")
)
instance Prelude.Hashable DataSetConfiguration
instance Prelude.NFData DataSetConfiguration