{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.QuickSight.Types.DataSet
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.QuickSight.Types.DataSet 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.ColumnGroup
import Amazonka.QuickSight.Types.ColumnLevelPermissionRule
import Amazonka.QuickSight.Types.DataSetImportMode
import Amazonka.QuickSight.Types.DataSetUsageConfiguration
import Amazonka.QuickSight.Types.FieldFolder
import Amazonka.QuickSight.Types.LogicalTable
import Amazonka.QuickSight.Types.OutputColumn
import Amazonka.QuickSight.Types.PhysicalTable
import Amazonka.QuickSight.Types.RowLevelPermissionDataSet
import Amazonka.QuickSight.Types.RowLevelPermissionTagConfiguration

-- | Dataset.
--
-- /See:/ 'newDataSet' smart constructor.
data DataSet = DataSet'
  { -- | The Amazon Resource Name (ARN) of the resource.
    DataSet -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Groupings of columns that work together in certain Amazon QuickSight
    -- features. Currently, only geospatial hierarchy is supported.
    DataSet -> Maybe (NonEmpty ColumnGroup)
columnGroups :: Prelude.Maybe (Prelude.NonEmpty ColumnGroup),
    -- | A set of one or more definitions of a
    -- @ @<https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ColumnLevelPermissionRule.html ColumnLevelPermissionRule>@ @.
    DataSet -> Maybe (NonEmpty ColumnLevelPermissionRule)
columnLevelPermissionRules :: Prelude.Maybe (Prelude.NonEmpty ColumnLevelPermissionRule),
    -- | The amount of SPICE capacity used by this dataset. This is 0 if the
    -- dataset isn\'t imported into SPICE.
    DataSet -> Maybe Integer
consumedSpiceCapacityInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The time that this dataset was created.
    DataSet -> Maybe POSIX
createdTime :: Prelude.Maybe Data.POSIX,
    -- | The ID of the dataset.
    DataSet -> Maybe Text
dataSetId :: Prelude.Maybe Prelude.Text,
    -- | The usage configuration to apply to child datasets that reference this
    -- dataset as a source.
    DataSet -> Maybe DataSetUsageConfiguration
dataSetUsageConfiguration :: Prelude.Maybe DataSetUsageConfiguration,
    -- | The folder that contains fields and nested subfolders for your dataset.
    DataSet -> Maybe (HashMap Text FieldFolder)
fieldFolders :: Prelude.Maybe (Prelude.HashMap Prelude.Text FieldFolder),
    -- | A value that indicates whether you want to import the data into SPICE.
    DataSet -> Maybe DataSetImportMode
importMode :: Prelude.Maybe DataSetImportMode,
    -- | The last time that this dataset was updated.
    DataSet -> Maybe POSIX
lastUpdatedTime :: Prelude.Maybe Data.POSIX,
    -- | Configures the combination and transformation of the data from the
    -- physical tables.
    DataSet -> Maybe (HashMap Text LogicalTable)
logicalTableMap :: Prelude.Maybe (Prelude.HashMap Prelude.Text LogicalTable),
    -- | A display name for the dataset.
    DataSet -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The list of columns after all transforms. These columns are available in
    -- templates, analyses, and dashboards.
    DataSet -> Maybe [OutputColumn]
outputColumns :: Prelude.Maybe [OutputColumn],
    -- | Declares the physical tables that are available in the underlying data
    -- sources.
    DataSet -> Maybe (HashMap Text PhysicalTable)
physicalTableMap :: Prelude.Maybe (Prelude.HashMap Prelude.Text PhysicalTable),
    -- | The row-level security configuration for the dataset.
    DataSet -> Maybe RowLevelPermissionDataSet
rowLevelPermissionDataSet :: Prelude.Maybe RowLevelPermissionDataSet,
    -- | The element you can use to define tags for row-level security.
    DataSet -> Maybe RowLevelPermissionTagConfiguration
rowLevelPermissionTagConfiguration :: Prelude.Maybe RowLevelPermissionTagConfiguration
  }
  deriving (DataSet -> DataSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataSet -> DataSet -> Bool
$c/= :: DataSet -> DataSet -> Bool
== :: DataSet -> DataSet -> Bool
$c== :: DataSet -> DataSet -> Bool
Prelude.Eq, Int -> DataSet -> ShowS
[DataSet] -> ShowS
DataSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataSet] -> ShowS
$cshowList :: [DataSet] -> ShowS
show :: DataSet -> String
$cshow :: DataSet -> String
showsPrec :: Int -> DataSet -> ShowS
$cshowsPrec :: Int -> DataSet -> ShowS
Prelude.Show, forall x. Rep DataSet x -> DataSet
forall x. DataSet -> Rep DataSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DataSet x -> DataSet
$cfrom :: forall x. DataSet -> Rep DataSet x
Prelude.Generic)

-- |
-- Create a value of 'DataSet' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'arn', 'dataSet_arn' - The Amazon Resource Name (ARN) of the resource.
--
-- 'columnGroups', 'dataSet_columnGroups' - Groupings of columns that work together in certain Amazon QuickSight
-- features. Currently, only geospatial hierarchy is supported.
--
-- 'columnLevelPermissionRules', 'dataSet_columnLevelPermissionRules' - A set of one or more definitions of a
-- @ @<https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ColumnLevelPermissionRule.html ColumnLevelPermissionRule>@ @.
--
-- 'consumedSpiceCapacityInBytes', 'dataSet_consumedSpiceCapacityInBytes' - The amount of SPICE capacity used by this dataset. This is 0 if the
-- dataset isn\'t imported into SPICE.
--
-- 'createdTime', 'dataSet_createdTime' - The time that this dataset was created.
--
-- 'dataSetId', 'dataSet_dataSetId' - The ID of the dataset.
--
-- 'dataSetUsageConfiguration', 'dataSet_dataSetUsageConfiguration' - The usage configuration to apply to child datasets that reference this
-- dataset as a source.
--
-- 'fieldFolders', 'dataSet_fieldFolders' - The folder that contains fields and nested subfolders for your dataset.
--
-- 'importMode', 'dataSet_importMode' - A value that indicates whether you want to import the data into SPICE.
--
-- 'lastUpdatedTime', 'dataSet_lastUpdatedTime' - The last time that this dataset was updated.
--
-- 'logicalTableMap', 'dataSet_logicalTableMap' - Configures the combination and transformation of the data from the
-- physical tables.
--
-- 'name', 'dataSet_name' - A display name for the dataset.
--
-- 'outputColumns', 'dataSet_outputColumns' - The list of columns after all transforms. These columns are available in
-- templates, analyses, and dashboards.
--
-- 'physicalTableMap', 'dataSet_physicalTableMap' - Declares the physical tables that are available in the underlying data
-- sources.
--
-- 'rowLevelPermissionDataSet', 'dataSet_rowLevelPermissionDataSet' - The row-level security configuration for the dataset.
--
-- 'rowLevelPermissionTagConfiguration', 'dataSet_rowLevelPermissionTagConfiguration' - The element you can use to define tags for row-level security.
newDataSet ::
  DataSet
newDataSet :: DataSet
newDataSet =
  DataSet'
    { $sel:arn:DataSet' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:columnGroups:DataSet' :: Maybe (NonEmpty ColumnGroup)
columnGroups = forall a. Maybe a
Prelude.Nothing,
      $sel:columnLevelPermissionRules:DataSet' :: Maybe (NonEmpty ColumnLevelPermissionRule)
columnLevelPermissionRules = forall a. Maybe a
Prelude.Nothing,
      $sel:consumedSpiceCapacityInBytes:DataSet' :: Maybe Integer
consumedSpiceCapacityInBytes = forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:DataSet' :: Maybe POSIX
createdTime = forall a. Maybe a
Prelude.Nothing,
      $sel:dataSetId:DataSet' :: Maybe Text
dataSetId = forall a. Maybe a
Prelude.Nothing,
      $sel:dataSetUsageConfiguration:DataSet' :: Maybe DataSetUsageConfiguration
dataSetUsageConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:fieldFolders:DataSet' :: Maybe (HashMap Text FieldFolder)
fieldFolders = forall a. Maybe a
Prelude.Nothing,
      $sel:importMode:DataSet' :: Maybe DataSetImportMode
importMode = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTime:DataSet' :: Maybe POSIX
lastUpdatedTime = forall a. Maybe a
Prelude.Nothing,
      $sel:logicalTableMap:DataSet' :: Maybe (HashMap Text LogicalTable)
logicalTableMap = forall a. Maybe a
Prelude.Nothing,
      $sel:name:DataSet' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:outputColumns:DataSet' :: Maybe [OutputColumn]
outputColumns = forall a. Maybe a
Prelude.Nothing,
      $sel:physicalTableMap:DataSet' :: Maybe (HashMap Text PhysicalTable)
physicalTableMap = forall a. Maybe a
Prelude.Nothing,
      $sel:rowLevelPermissionDataSet:DataSet' :: Maybe RowLevelPermissionDataSet
rowLevelPermissionDataSet = forall a. Maybe a
Prelude.Nothing,
      $sel:rowLevelPermissionTagConfiguration:DataSet' :: Maybe RowLevelPermissionTagConfiguration
rowLevelPermissionTagConfiguration = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the resource.
dataSet_arn :: Lens.Lens' DataSet (Prelude.Maybe Prelude.Text)
dataSet_arn :: Lens' DataSet (Maybe Text)
dataSet_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe Text
arn :: Maybe Text
$sel:arn:DataSet' :: DataSet -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DataSet
s@DataSet' {} Maybe Text
a -> DataSet
s {$sel:arn:DataSet' :: Maybe Text
arn = Maybe Text
a} :: DataSet)

-- | Groupings of columns that work together in certain Amazon QuickSight
-- features. Currently, only geospatial hierarchy is supported.
dataSet_columnGroups :: Lens.Lens' DataSet (Prelude.Maybe (Prelude.NonEmpty ColumnGroup))
dataSet_columnGroups :: Lens' DataSet (Maybe (NonEmpty ColumnGroup))
dataSet_columnGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe (NonEmpty ColumnGroup)
columnGroups :: Maybe (NonEmpty ColumnGroup)
$sel:columnGroups:DataSet' :: DataSet -> Maybe (NonEmpty ColumnGroup)
columnGroups} -> Maybe (NonEmpty ColumnGroup)
columnGroups) (\s :: DataSet
s@DataSet' {} Maybe (NonEmpty ColumnGroup)
a -> DataSet
s {$sel:columnGroups:DataSet' :: Maybe (NonEmpty ColumnGroup)
columnGroups = Maybe (NonEmpty ColumnGroup)
a} :: DataSet) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A set of one or more definitions of a
-- @ @<https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ColumnLevelPermissionRule.html ColumnLevelPermissionRule>@ @.
dataSet_columnLevelPermissionRules :: Lens.Lens' DataSet (Prelude.Maybe (Prelude.NonEmpty ColumnLevelPermissionRule))
dataSet_columnLevelPermissionRules :: Lens' DataSet (Maybe (NonEmpty ColumnLevelPermissionRule))
dataSet_columnLevelPermissionRules = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe (NonEmpty ColumnLevelPermissionRule)
columnLevelPermissionRules :: Maybe (NonEmpty ColumnLevelPermissionRule)
$sel:columnLevelPermissionRules:DataSet' :: DataSet -> Maybe (NonEmpty ColumnLevelPermissionRule)
columnLevelPermissionRules} -> Maybe (NonEmpty ColumnLevelPermissionRule)
columnLevelPermissionRules) (\s :: DataSet
s@DataSet' {} Maybe (NonEmpty ColumnLevelPermissionRule)
a -> DataSet
s {$sel:columnLevelPermissionRules:DataSet' :: Maybe (NonEmpty ColumnLevelPermissionRule)
columnLevelPermissionRules = Maybe (NonEmpty ColumnLevelPermissionRule)
a} :: DataSet) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The amount of SPICE capacity used by this dataset. This is 0 if the
-- dataset isn\'t imported into SPICE.
dataSet_consumedSpiceCapacityInBytes :: Lens.Lens' DataSet (Prelude.Maybe Prelude.Integer)
dataSet_consumedSpiceCapacityInBytes :: Lens' DataSet (Maybe Integer)
dataSet_consumedSpiceCapacityInBytes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe Integer
consumedSpiceCapacityInBytes :: Maybe Integer
$sel:consumedSpiceCapacityInBytes:DataSet' :: DataSet -> Maybe Integer
consumedSpiceCapacityInBytes} -> Maybe Integer
consumedSpiceCapacityInBytes) (\s :: DataSet
s@DataSet' {} Maybe Integer
a -> DataSet
s {$sel:consumedSpiceCapacityInBytes:DataSet' :: Maybe Integer
consumedSpiceCapacityInBytes = Maybe Integer
a} :: DataSet)

-- | The time that this dataset was created.
dataSet_createdTime :: Lens.Lens' DataSet (Prelude.Maybe Prelude.UTCTime)
dataSet_createdTime :: Lens' DataSet (Maybe UTCTime)
dataSet_createdTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:DataSet' :: DataSet -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: DataSet
s@DataSet' {} Maybe POSIX
a -> DataSet
s {$sel:createdTime:DataSet' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: DataSet) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The ID of the dataset.
dataSet_dataSetId :: Lens.Lens' DataSet (Prelude.Maybe Prelude.Text)
dataSet_dataSetId :: Lens' DataSet (Maybe Text)
dataSet_dataSetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe Text
dataSetId :: Maybe Text
$sel:dataSetId:DataSet' :: DataSet -> Maybe Text
dataSetId} -> Maybe Text
dataSetId) (\s :: DataSet
s@DataSet' {} Maybe Text
a -> DataSet
s {$sel:dataSetId:DataSet' :: Maybe Text
dataSetId = Maybe Text
a} :: DataSet)

-- | The usage configuration to apply to child datasets that reference this
-- dataset as a source.
dataSet_dataSetUsageConfiguration :: Lens.Lens' DataSet (Prelude.Maybe DataSetUsageConfiguration)
dataSet_dataSetUsageConfiguration :: Lens' DataSet (Maybe DataSetUsageConfiguration)
dataSet_dataSetUsageConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe DataSetUsageConfiguration
dataSetUsageConfiguration :: Maybe DataSetUsageConfiguration
$sel:dataSetUsageConfiguration:DataSet' :: DataSet -> Maybe DataSetUsageConfiguration
dataSetUsageConfiguration} -> Maybe DataSetUsageConfiguration
dataSetUsageConfiguration) (\s :: DataSet
s@DataSet' {} Maybe DataSetUsageConfiguration
a -> DataSet
s {$sel:dataSetUsageConfiguration:DataSet' :: Maybe DataSetUsageConfiguration
dataSetUsageConfiguration = Maybe DataSetUsageConfiguration
a} :: DataSet)

-- | The folder that contains fields and nested subfolders for your dataset.
dataSet_fieldFolders :: Lens.Lens' DataSet (Prelude.Maybe (Prelude.HashMap Prelude.Text FieldFolder))
dataSet_fieldFolders :: Lens' DataSet (Maybe (HashMap Text FieldFolder))
dataSet_fieldFolders = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe (HashMap Text FieldFolder)
fieldFolders :: Maybe (HashMap Text FieldFolder)
$sel:fieldFolders:DataSet' :: DataSet -> Maybe (HashMap Text FieldFolder)
fieldFolders} -> Maybe (HashMap Text FieldFolder)
fieldFolders) (\s :: DataSet
s@DataSet' {} Maybe (HashMap Text FieldFolder)
a -> DataSet
s {$sel:fieldFolders:DataSet' :: Maybe (HashMap Text FieldFolder)
fieldFolders = Maybe (HashMap Text FieldFolder)
a} :: DataSet) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A value that indicates whether you want to import the data into SPICE.
dataSet_importMode :: Lens.Lens' DataSet (Prelude.Maybe DataSetImportMode)
dataSet_importMode :: Lens' DataSet (Maybe DataSetImportMode)
dataSet_importMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe DataSetImportMode
importMode :: Maybe DataSetImportMode
$sel:importMode:DataSet' :: DataSet -> Maybe DataSetImportMode
importMode} -> Maybe DataSetImportMode
importMode) (\s :: DataSet
s@DataSet' {} Maybe DataSetImportMode
a -> DataSet
s {$sel:importMode:DataSet' :: Maybe DataSetImportMode
importMode = Maybe DataSetImportMode
a} :: DataSet)

-- | The last time that this dataset was updated.
dataSet_lastUpdatedTime :: Lens.Lens' DataSet (Prelude.Maybe Prelude.UTCTime)
dataSet_lastUpdatedTime :: Lens' DataSet (Maybe UTCTime)
dataSet_lastUpdatedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe POSIX
lastUpdatedTime :: Maybe POSIX
$sel:lastUpdatedTime:DataSet' :: DataSet -> Maybe POSIX
lastUpdatedTime} -> Maybe POSIX
lastUpdatedTime) (\s :: DataSet
s@DataSet' {} Maybe POSIX
a -> DataSet
s {$sel:lastUpdatedTime:DataSet' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
a} :: DataSet) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Configures the combination and transformation of the data from the
-- physical tables.
dataSet_logicalTableMap :: Lens.Lens' DataSet (Prelude.Maybe (Prelude.HashMap Prelude.Text LogicalTable))
dataSet_logicalTableMap :: Lens' DataSet (Maybe (HashMap Text LogicalTable))
dataSet_logicalTableMap = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe (HashMap Text LogicalTable)
logicalTableMap :: Maybe (HashMap Text LogicalTable)
$sel:logicalTableMap:DataSet' :: DataSet -> Maybe (HashMap Text LogicalTable)
logicalTableMap} -> Maybe (HashMap Text LogicalTable)
logicalTableMap) (\s :: DataSet
s@DataSet' {} Maybe (HashMap Text LogicalTable)
a -> DataSet
s {$sel:logicalTableMap:DataSet' :: Maybe (HashMap Text LogicalTable)
logicalTableMap = Maybe (HashMap Text LogicalTable)
a} :: DataSet) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A display name for the dataset.
dataSet_name :: Lens.Lens' DataSet (Prelude.Maybe Prelude.Text)
dataSet_name :: Lens' DataSet (Maybe Text)
dataSet_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe Text
name :: Maybe Text
$sel:name:DataSet' :: DataSet -> Maybe Text
name} -> Maybe Text
name) (\s :: DataSet
s@DataSet' {} Maybe Text
a -> DataSet
s {$sel:name:DataSet' :: Maybe Text
name = Maybe Text
a} :: DataSet)

-- | The list of columns after all transforms. These columns are available in
-- templates, analyses, and dashboards.
dataSet_outputColumns :: Lens.Lens' DataSet (Prelude.Maybe [OutputColumn])
dataSet_outputColumns :: Lens' DataSet (Maybe [OutputColumn])
dataSet_outputColumns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe [OutputColumn]
outputColumns :: Maybe [OutputColumn]
$sel:outputColumns:DataSet' :: DataSet -> Maybe [OutputColumn]
outputColumns} -> Maybe [OutputColumn]
outputColumns) (\s :: DataSet
s@DataSet' {} Maybe [OutputColumn]
a -> DataSet
s {$sel:outputColumns:DataSet' :: Maybe [OutputColumn]
outputColumns = Maybe [OutputColumn]
a} :: DataSet) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Declares the physical tables that are available in the underlying data
-- sources.
dataSet_physicalTableMap :: Lens.Lens' DataSet (Prelude.Maybe (Prelude.HashMap Prelude.Text PhysicalTable))
dataSet_physicalTableMap :: Lens' DataSet (Maybe (HashMap Text PhysicalTable))
dataSet_physicalTableMap = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe (HashMap Text PhysicalTable)
physicalTableMap :: Maybe (HashMap Text PhysicalTable)
$sel:physicalTableMap:DataSet' :: DataSet -> Maybe (HashMap Text PhysicalTable)
physicalTableMap} -> Maybe (HashMap Text PhysicalTable)
physicalTableMap) (\s :: DataSet
s@DataSet' {} Maybe (HashMap Text PhysicalTable)
a -> DataSet
s {$sel:physicalTableMap:DataSet' :: Maybe (HashMap Text PhysicalTable)
physicalTableMap = Maybe (HashMap Text PhysicalTable)
a} :: DataSet) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The row-level security configuration for the dataset.
dataSet_rowLevelPermissionDataSet :: Lens.Lens' DataSet (Prelude.Maybe RowLevelPermissionDataSet)
dataSet_rowLevelPermissionDataSet :: Lens' DataSet (Maybe RowLevelPermissionDataSet)
dataSet_rowLevelPermissionDataSet = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe RowLevelPermissionDataSet
rowLevelPermissionDataSet :: Maybe RowLevelPermissionDataSet
$sel:rowLevelPermissionDataSet:DataSet' :: DataSet -> Maybe RowLevelPermissionDataSet
rowLevelPermissionDataSet} -> Maybe RowLevelPermissionDataSet
rowLevelPermissionDataSet) (\s :: DataSet
s@DataSet' {} Maybe RowLevelPermissionDataSet
a -> DataSet
s {$sel:rowLevelPermissionDataSet:DataSet' :: Maybe RowLevelPermissionDataSet
rowLevelPermissionDataSet = Maybe RowLevelPermissionDataSet
a} :: DataSet)

-- | The element you can use to define tags for row-level security.
dataSet_rowLevelPermissionTagConfiguration :: Lens.Lens' DataSet (Prelude.Maybe RowLevelPermissionTagConfiguration)
dataSet_rowLevelPermissionTagConfiguration :: Lens' DataSet (Maybe RowLevelPermissionTagConfiguration)
dataSet_rowLevelPermissionTagConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSet' {Maybe RowLevelPermissionTagConfiguration
rowLevelPermissionTagConfiguration :: Maybe RowLevelPermissionTagConfiguration
$sel:rowLevelPermissionTagConfiguration:DataSet' :: DataSet -> Maybe RowLevelPermissionTagConfiguration
rowLevelPermissionTagConfiguration} -> Maybe RowLevelPermissionTagConfiguration
rowLevelPermissionTagConfiguration) (\s :: DataSet
s@DataSet' {} Maybe RowLevelPermissionTagConfiguration
a -> DataSet
s {$sel:rowLevelPermissionTagConfiguration:DataSet' :: Maybe RowLevelPermissionTagConfiguration
rowLevelPermissionTagConfiguration = Maybe RowLevelPermissionTagConfiguration
a} :: DataSet)

instance Data.FromJSON DataSet where
  parseJSON :: Value -> Parser DataSet
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"DataSet"
      ( \Object
x ->
          Maybe Text
-> Maybe (NonEmpty ColumnGroup)
-> Maybe (NonEmpty ColumnLevelPermissionRule)
-> Maybe Integer
-> Maybe POSIX
-> Maybe Text
-> Maybe DataSetUsageConfiguration
-> Maybe (HashMap Text FieldFolder)
-> Maybe DataSetImportMode
-> Maybe POSIX
-> Maybe (HashMap Text LogicalTable)
-> Maybe Text
-> Maybe [OutputColumn]
-> Maybe (HashMap Text PhysicalTable)
-> Maybe RowLevelPermissionDataSet
-> Maybe RowLevelPermissionTagConfiguration
-> DataSet
DataSet'
            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
"Arn")
            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
"ColumnGroups")
            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
"ColumnLevelPermissionRules")
            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
"ConsumedSpiceCapacityInBytes")
            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
"CreatedTime")
            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
"DataSetId")
            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
"DataSetUsageConfiguration")
            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
"FieldFolders" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            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
"ImportMode")
            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
"LastUpdatedTime")
            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
"LogicalTableMap"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            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
"Name")
            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
"OutputColumns" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            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
"PhysicalTableMap"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            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
"RowLevelPermissionDataSet")
            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
"RowLevelPermissionTagConfiguration")
      )

instance Prelude.Hashable DataSet where
  hashWithSalt :: Int -> DataSet -> Int
hashWithSalt Int
_salt DataSet' {Maybe Integer
Maybe [OutputColumn]
Maybe (NonEmpty ColumnLevelPermissionRule)
Maybe (NonEmpty ColumnGroup)
Maybe Text
Maybe (HashMap Text FieldFolder)
Maybe (HashMap Text LogicalTable)
Maybe (HashMap Text PhysicalTable)
Maybe POSIX
Maybe DataSetImportMode
Maybe DataSetUsageConfiguration
Maybe RowLevelPermissionTagConfiguration
Maybe RowLevelPermissionDataSet
rowLevelPermissionTagConfiguration :: Maybe RowLevelPermissionTagConfiguration
rowLevelPermissionDataSet :: Maybe RowLevelPermissionDataSet
physicalTableMap :: Maybe (HashMap Text PhysicalTable)
outputColumns :: Maybe [OutputColumn]
name :: Maybe Text
logicalTableMap :: Maybe (HashMap Text LogicalTable)
lastUpdatedTime :: Maybe POSIX
importMode :: Maybe DataSetImportMode
fieldFolders :: Maybe (HashMap Text FieldFolder)
dataSetUsageConfiguration :: Maybe DataSetUsageConfiguration
dataSetId :: Maybe Text
createdTime :: Maybe POSIX
consumedSpiceCapacityInBytes :: Maybe Integer
columnLevelPermissionRules :: Maybe (NonEmpty ColumnLevelPermissionRule)
columnGroups :: Maybe (NonEmpty ColumnGroup)
arn :: Maybe Text
$sel:rowLevelPermissionTagConfiguration:DataSet' :: DataSet -> Maybe RowLevelPermissionTagConfiguration
$sel:rowLevelPermissionDataSet:DataSet' :: DataSet -> Maybe RowLevelPermissionDataSet
$sel:physicalTableMap:DataSet' :: DataSet -> Maybe (HashMap Text PhysicalTable)
$sel:outputColumns:DataSet' :: DataSet -> Maybe [OutputColumn]
$sel:name:DataSet' :: DataSet -> Maybe Text
$sel:logicalTableMap:DataSet' :: DataSet -> Maybe (HashMap Text LogicalTable)
$sel:lastUpdatedTime:DataSet' :: DataSet -> Maybe POSIX
$sel:importMode:DataSet' :: DataSet -> Maybe DataSetImportMode
$sel:fieldFolders:DataSet' :: DataSet -> Maybe (HashMap Text FieldFolder)
$sel:dataSetUsageConfiguration:DataSet' :: DataSet -> Maybe DataSetUsageConfiguration
$sel:dataSetId:DataSet' :: DataSet -> Maybe Text
$sel:createdTime:DataSet' :: DataSet -> Maybe POSIX
$sel:consumedSpiceCapacityInBytes:DataSet' :: DataSet -> Maybe Integer
$sel:columnLevelPermissionRules:DataSet' :: DataSet -> Maybe (NonEmpty ColumnLevelPermissionRule)
$sel:columnGroups:DataSet' :: DataSet -> Maybe (NonEmpty ColumnGroup)
$sel:arn:DataSet' :: DataSet -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty ColumnGroup)
columnGroups
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty ColumnLevelPermissionRule)
columnLevelPermissionRules
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
consumedSpiceCapacityInBytes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dataSetId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DataSetUsageConfiguration
dataSetUsageConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text FieldFolder)
fieldFolders
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DataSetImportMode
importMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text LogicalTable)
logicalTableMap
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [OutputColumn]
outputColumns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text PhysicalTable)
physicalTableMap
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RowLevelPermissionDataSet
rowLevelPermissionDataSet
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RowLevelPermissionTagConfiguration
rowLevelPermissionTagConfiguration

instance Prelude.NFData DataSet where
  rnf :: DataSet -> ()
rnf DataSet' {Maybe Integer
Maybe [OutputColumn]
Maybe (NonEmpty ColumnLevelPermissionRule)
Maybe (NonEmpty ColumnGroup)
Maybe Text
Maybe (HashMap Text FieldFolder)
Maybe (HashMap Text LogicalTable)
Maybe (HashMap Text PhysicalTable)
Maybe POSIX
Maybe DataSetImportMode
Maybe DataSetUsageConfiguration
Maybe RowLevelPermissionTagConfiguration
Maybe RowLevelPermissionDataSet
rowLevelPermissionTagConfiguration :: Maybe RowLevelPermissionTagConfiguration
rowLevelPermissionDataSet :: Maybe RowLevelPermissionDataSet
physicalTableMap :: Maybe (HashMap Text PhysicalTable)
outputColumns :: Maybe [OutputColumn]
name :: Maybe Text
logicalTableMap :: Maybe (HashMap Text LogicalTable)
lastUpdatedTime :: Maybe POSIX
importMode :: Maybe DataSetImportMode
fieldFolders :: Maybe (HashMap Text FieldFolder)
dataSetUsageConfiguration :: Maybe DataSetUsageConfiguration
dataSetId :: Maybe Text
createdTime :: Maybe POSIX
consumedSpiceCapacityInBytes :: Maybe Integer
columnLevelPermissionRules :: Maybe (NonEmpty ColumnLevelPermissionRule)
columnGroups :: Maybe (NonEmpty ColumnGroup)
arn :: Maybe Text
$sel:rowLevelPermissionTagConfiguration:DataSet' :: DataSet -> Maybe RowLevelPermissionTagConfiguration
$sel:rowLevelPermissionDataSet:DataSet' :: DataSet -> Maybe RowLevelPermissionDataSet
$sel:physicalTableMap:DataSet' :: DataSet -> Maybe (HashMap Text PhysicalTable)
$sel:outputColumns:DataSet' :: DataSet -> Maybe [OutputColumn]
$sel:name:DataSet' :: DataSet -> Maybe Text
$sel:logicalTableMap:DataSet' :: DataSet -> Maybe (HashMap Text LogicalTable)
$sel:lastUpdatedTime:DataSet' :: DataSet -> Maybe POSIX
$sel:importMode:DataSet' :: DataSet -> Maybe DataSetImportMode
$sel:fieldFolders:DataSet' :: DataSet -> Maybe (HashMap Text FieldFolder)
$sel:dataSetUsageConfiguration:DataSet' :: DataSet -> Maybe DataSetUsageConfiguration
$sel:dataSetId:DataSet' :: DataSet -> Maybe Text
$sel:createdTime:DataSet' :: DataSet -> Maybe POSIX
$sel:consumedSpiceCapacityInBytes:DataSet' :: DataSet -> Maybe Integer
$sel:columnLevelPermissionRules:DataSet' :: DataSet -> Maybe (NonEmpty ColumnLevelPermissionRule)
$sel:columnGroups:DataSet' :: DataSet -> Maybe (NonEmpty ColumnGroup)
$sel:arn:DataSet' :: DataSet -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty ColumnGroup)
columnGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty ColumnLevelPermissionRule)
columnLevelPermissionRules
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
consumedSpiceCapacityInBytes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dataSetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DataSetUsageConfiguration
dataSetUsageConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text FieldFolder)
fieldFolders
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DataSetImportMode
importMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text LogicalTable)
logicalTableMap
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [OutputColumn]
outputColumns
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text PhysicalTable)
physicalTableMap
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RowLevelPermissionDataSet
rowLevelPermissionDataSet
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe RowLevelPermissionTagConfiguration
rowLevelPermissionTagConfiguration