{-# 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.PivotTableOptions
-- 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.PivotTableOptions 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.PivotTableMetricPlacement
import Amazonka.QuickSight.Types.RowAlternateColorOptions
import Amazonka.QuickSight.Types.TableCellStyle
import Amazonka.QuickSight.Types.Visibility

-- | The table options for a pivot table visual.
--
-- /See:/ 'newPivotTableOptions' smart constructor.
data PivotTableOptions = PivotTableOptions'
  { -- | The table cell style of cells.
    PivotTableOptions -> Maybe TableCellStyle
cellStyle :: Prelude.Maybe TableCellStyle,
    -- | The table cell style of the column header.
    PivotTableOptions -> Maybe TableCellStyle
columnHeaderStyle :: Prelude.Maybe TableCellStyle,
    -- | The visibility of the column names.
    PivotTableOptions -> Maybe Visibility
columnNamesVisibility :: Prelude.Maybe Visibility,
    -- | The metric placement (row, column) options.
    PivotTableOptions -> Maybe PivotTableMetricPlacement
metricPlacement :: Prelude.Maybe PivotTableMetricPlacement,
    -- | The row alternate color options (widget status, row alternate colors).
    PivotTableOptions -> Maybe RowAlternateColorOptions
rowAlternateColorOptions :: Prelude.Maybe RowAlternateColorOptions,
    -- | The table cell style of row field names.
    PivotTableOptions -> Maybe TableCellStyle
rowFieldNamesStyle :: Prelude.Maybe TableCellStyle,
    -- | The table cell style of the row headers.
    PivotTableOptions -> Maybe TableCellStyle
rowHeaderStyle :: Prelude.Maybe TableCellStyle,
    -- | The visibility of the single metric options.
    PivotTableOptions -> Maybe Visibility
singleMetricVisibility :: Prelude.Maybe Visibility,
    -- | Determines the visibility of the pivot table.
    PivotTableOptions -> Maybe Visibility
toggleButtonsVisibility :: Prelude.Maybe Visibility
  }
  deriving (PivotTableOptions -> PivotTableOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PivotTableOptions -> PivotTableOptions -> Bool
$c/= :: PivotTableOptions -> PivotTableOptions -> Bool
== :: PivotTableOptions -> PivotTableOptions -> Bool
$c== :: PivotTableOptions -> PivotTableOptions -> Bool
Prelude.Eq, ReadPrec [PivotTableOptions]
ReadPrec PivotTableOptions
Int -> ReadS PivotTableOptions
ReadS [PivotTableOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PivotTableOptions]
$creadListPrec :: ReadPrec [PivotTableOptions]
readPrec :: ReadPrec PivotTableOptions
$creadPrec :: ReadPrec PivotTableOptions
readList :: ReadS [PivotTableOptions]
$creadList :: ReadS [PivotTableOptions]
readsPrec :: Int -> ReadS PivotTableOptions
$creadsPrec :: Int -> ReadS PivotTableOptions
Prelude.Read, Int -> PivotTableOptions -> ShowS
[PivotTableOptions] -> ShowS
PivotTableOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PivotTableOptions] -> ShowS
$cshowList :: [PivotTableOptions] -> ShowS
show :: PivotTableOptions -> String
$cshow :: PivotTableOptions -> String
showsPrec :: Int -> PivotTableOptions -> ShowS
$cshowsPrec :: Int -> PivotTableOptions -> ShowS
Prelude.Show, forall x. Rep PivotTableOptions x -> PivotTableOptions
forall x. PivotTableOptions -> Rep PivotTableOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PivotTableOptions x -> PivotTableOptions
$cfrom :: forall x. PivotTableOptions -> Rep PivotTableOptions x
Prelude.Generic)

-- |
-- Create a value of 'PivotTableOptions' 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:
--
-- 'cellStyle', 'pivotTableOptions_cellStyle' - The table cell style of cells.
--
-- 'columnHeaderStyle', 'pivotTableOptions_columnHeaderStyle' - The table cell style of the column header.
--
-- 'columnNamesVisibility', 'pivotTableOptions_columnNamesVisibility' - The visibility of the column names.
--
-- 'metricPlacement', 'pivotTableOptions_metricPlacement' - The metric placement (row, column) options.
--
-- 'rowAlternateColorOptions', 'pivotTableOptions_rowAlternateColorOptions' - The row alternate color options (widget status, row alternate colors).
--
-- 'rowFieldNamesStyle', 'pivotTableOptions_rowFieldNamesStyle' - The table cell style of row field names.
--
-- 'rowHeaderStyle', 'pivotTableOptions_rowHeaderStyle' - The table cell style of the row headers.
--
-- 'singleMetricVisibility', 'pivotTableOptions_singleMetricVisibility' - The visibility of the single metric options.
--
-- 'toggleButtonsVisibility', 'pivotTableOptions_toggleButtonsVisibility' - Determines the visibility of the pivot table.
newPivotTableOptions ::
  PivotTableOptions
newPivotTableOptions :: PivotTableOptions
newPivotTableOptions =
  PivotTableOptions'
    { $sel:cellStyle:PivotTableOptions' :: Maybe TableCellStyle
cellStyle = forall a. Maybe a
Prelude.Nothing,
      $sel:columnHeaderStyle:PivotTableOptions' :: Maybe TableCellStyle
columnHeaderStyle = forall a. Maybe a
Prelude.Nothing,
      $sel:columnNamesVisibility:PivotTableOptions' :: Maybe Visibility
columnNamesVisibility = forall a. Maybe a
Prelude.Nothing,
      $sel:metricPlacement:PivotTableOptions' :: Maybe PivotTableMetricPlacement
metricPlacement = forall a. Maybe a
Prelude.Nothing,
      $sel:rowAlternateColorOptions:PivotTableOptions' :: Maybe RowAlternateColorOptions
rowAlternateColorOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:rowFieldNamesStyle:PivotTableOptions' :: Maybe TableCellStyle
rowFieldNamesStyle = forall a. Maybe a
Prelude.Nothing,
      $sel:rowHeaderStyle:PivotTableOptions' :: Maybe TableCellStyle
rowHeaderStyle = forall a. Maybe a
Prelude.Nothing,
      $sel:singleMetricVisibility:PivotTableOptions' :: Maybe Visibility
singleMetricVisibility = forall a. Maybe a
Prelude.Nothing,
      $sel:toggleButtonsVisibility:PivotTableOptions' :: Maybe Visibility
toggleButtonsVisibility = forall a. Maybe a
Prelude.Nothing
    }

-- | The table cell style of cells.
pivotTableOptions_cellStyle :: Lens.Lens' PivotTableOptions (Prelude.Maybe TableCellStyle)
pivotTableOptions_cellStyle :: Lens' PivotTableOptions (Maybe TableCellStyle)
pivotTableOptions_cellStyle = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PivotTableOptions' {Maybe TableCellStyle
cellStyle :: Maybe TableCellStyle
$sel:cellStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
cellStyle} -> Maybe TableCellStyle
cellStyle) (\s :: PivotTableOptions
s@PivotTableOptions' {} Maybe TableCellStyle
a -> PivotTableOptions
s {$sel:cellStyle:PivotTableOptions' :: Maybe TableCellStyle
cellStyle = Maybe TableCellStyle
a} :: PivotTableOptions)

-- | The table cell style of the column header.
pivotTableOptions_columnHeaderStyle :: Lens.Lens' PivotTableOptions (Prelude.Maybe TableCellStyle)
pivotTableOptions_columnHeaderStyle :: Lens' PivotTableOptions (Maybe TableCellStyle)
pivotTableOptions_columnHeaderStyle = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PivotTableOptions' {Maybe TableCellStyle
columnHeaderStyle :: Maybe TableCellStyle
$sel:columnHeaderStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
columnHeaderStyle} -> Maybe TableCellStyle
columnHeaderStyle) (\s :: PivotTableOptions
s@PivotTableOptions' {} Maybe TableCellStyle
a -> PivotTableOptions
s {$sel:columnHeaderStyle:PivotTableOptions' :: Maybe TableCellStyle
columnHeaderStyle = Maybe TableCellStyle
a} :: PivotTableOptions)

-- | The visibility of the column names.
pivotTableOptions_columnNamesVisibility :: Lens.Lens' PivotTableOptions (Prelude.Maybe Visibility)
pivotTableOptions_columnNamesVisibility :: Lens' PivotTableOptions (Maybe Visibility)
pivotTableOptions_columnNamesVisibility = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PivotTableOptions' {Maybe Visibility
columnNamesVisibility :: Maybe Visibility
$sel:columnNamesVisibility:PivotTableOptions' :: PivotTableOptions -> Maybe Visibility
columnNamesVisibility} -> Maybe Visibility
columnNamesVisibility) (\s :: PivotTableOptions
s@PivotTableOptions' {} Maybe Visibility
a -> PivotTableOptions
s {$sel:columnNamesVisibility:PivotTableOptions' :: Maybe Visibility
columnNamesVisibility = Maybe Visibility
a} :: PivotTableOptions)

-- | The metric placement (row, column) options.
pivotTableOptions_metricPlacement :: Lens.Lens' PivotTableOptions (Prelude.Maybe PivotTableMetricPlacement)
pivotTableOptions_metricPlacement :: Lens' PivotTableOptions (Maybe PivotTableMetricPlacement)
pivotTableOptions_metricPlacement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PivotTableOptions' {Maybe PivotTableMetricPlacement
metricPlacement :: Maybe PivotTableMetricPlacement
$sel:metricPlacement:PivotTableOptions' :: PivotTableOptions -> Maybe PivotTableMetricPlacement
metricPlacement} -> Maybe PivotTableMetricPlacement
metricPlacement) (\s :: PivotTableOptions
s@PivotTableOptions' {} Maybe PivotTableMetricPlacement
a -> PivotTableOptions
s {$sel:metricPlacement:PivotTableOptions' :: Maybe PivotTableMetricPlacement
metricPlacement = Maybe PivotTableMetricPlacement
a} :: PivotTableOptions)

-- | The row alternate color options (widget status, row alternate colors).
pivotTableOptions_rowAlternateColorOptions :: Lens.Lens' PivotTableOptions (Prelude.Maybe RowAlternateColorOptions)
pivotTableOptions_rowAlternateColorOptions :: Lens' PivotTableOptions (Maybe RowAlternateColorOptions)
pivotTableOptions_rowAlternateColorOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PivotTableOptions' {Maybe RowAlternateColorOptions
rowAlternateColorOptions :: Maybe RowAlternateColorOptions
$sel:rowAlternateColorOptions:PivotTableOptions' :: PivotTableOptions -> Maybe RowAlternateColorOptions
rowAlternateColorOptions} -> Maybe RowAlternateColorOptions
rowAlternateColorOptions) (\s :: PivotTableOptions
s@PivotTableOptions' {} Maybe RowAlternateColorOptions
a -> PivotTableOptions
s {$sel:rowAlternateColorOptions:PivotTableOptions' :: Maybe RowAlternateColorOptions
rowAlternateColorOptions = Maybe RowAlternateColorOptions
a} :: PivotTableOptions)

-- | The table cell style of row field names.
pivotTableOptions_rowFieldNamesStyle :: Lens.Lens' PivotTableOptions (Prelude.Maybe TableCellStyle)
pivotTableOptions_rowFieldNamesStyle :: Lens' PivotTableOptions (Maybe TableCellStyle)
pivotTableOptions_rowFieldNamesStyle = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PivotTableOptions' {Maybe TableCellStyle
rowFieldNamesStyle :: Maybe TableCellStyle
$sel:rowFieldNamesStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
rowFieldNamesStyle} -> Maybe TableCellStyle
rowFieldNamesStyle) (\s :: PivotTableOptions
s@PivotTableOptions' {} Maybe TableCellStyle
a -> PivotTableOptions
s {$sel:rowFieldNamesStyle:PivotTableOptions' :: Maybe TableCellStyle
rowFieldNamesStyle = Maybe TableCellStyle
a} :: PivotTableOptions)

-- | The table cell style of the row headers.
pivotTableOptions_rowHeaderStyle :: Lens.Lens' PivotTableOptions (Prelude.Maybe TableCellStyle)
pivotTableOptions_rowHeaderStyle :: Lens' PivotTableOptions (Maybe TableCellStyle)
pivotTableOptions_rowHeaderStyle = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PivotTableOptions' {Maybe TableCellStyle
rowHeaderStyle :: Maybe TableCellStyle
$sel:rowHeaderStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
rowHeaderStyle} -> Maybe TableCellStyle
rowHeaderStyle) (\s :: PivotTableOptions
s@PivotTableOptions' {} Maybe TableCellStyle
a -> PivotTableOptions
s {$sel:rowHeaderStyle:PivotTableOptions' :: Maybe TableCellStyle
rowHeaderStyle = Maybe TableCellStyle
a} :: PivotTableOptions)

-- | The visibility of the single metric options.
pivotTableOptions_singleMetricVisibility :: Lens.Lens' PivotTableOptions (Prelude.Maybe Visibility)
pivotTableOptions_singleMetricVisibility :: Lens' PivotTableOptions (Maybe Visibility)
pivotTableOptions_singleMetricVisibility = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PivotTableOptions' {Maybe Visibility
singleMetricVisibility :: Maybe Visibility
$sel:singleMetricVisibility:PivotTableOptions' :: PivotTableOptions -> Maybe Visibility
singleMetricVisibility} -> Maybe Visibility
singleMetricVisibility) (\s :: PivotTableOptions
s@PivotTableOptions' {} Maybe Visibility
a -> PivotTableOptions
s {$sel:singleMetricVisibility:PivotTableOptions' :: Maybe Visibility
singleMetricVisibility = Maybe Visibility
a} :: PivotTableOptions)

-- | Determines the visibility of the pivot table.
pivotTableOptions_toggleButtonsVisibility :: Lens.Lens' PivotTableOptions (Prelude.Maybe Visibility)
pivotTableOptions_toggleButtonsVisibility :: Lens' PivotTableOptions (Maybe Visibility)
pivotTableOptions_toggleButtonsVisibility = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PivotTableOptions' {Maybe Visibility
toggleButtonsVisibility :: Maybe Visibility
$sel:toggleButtonsVisibility:PivotTableOptions' :: PivotTableOptions -> Maybe Visibility
toggleButtonsVisibility} -> Maybe Visibility
toggleButtonsVisibility) (\s :: PivotTableOptions
s@PivotTableOptions' {} Maybe Visibility
a -> PivotTableOptions
s {$sel:toggleButtonsVisibility:PivotTableOptions' :: Maybe Visibility
toggleButtonsVisibility = Maybe Visibility
a} :: PivotTableOptions)

instance Data.FromJSON PivotTableOptions where
  parseJSON :: Value -> Parser PivotTableOptions
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"PivotTableOptions"
      ( \Object
x ->
          Maybe TableCellStyle
-> Maybe TableCellStyle
-> Maybe Visibility
-> Maybe PivotTableMetricPlacement
-> Maybe RowAlternateColorOptions
-> Maybe TableCellStyle
-> Maybe TableCellStyle
-> Maybe Visibility
-> Maybe Visibility
-> PivotTableOptions
PivotTableOptions'
            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
"CellStyle")
            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
"ColumnHeaderStyle")
            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
"ColumnNamesVisibility")
            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
"MetricPlacement")
            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
"RowAlternateColorOptions")
            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
"RowFieldNamesStyle")
            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
"RowHeaderStyle")
            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
"SingleMetricVisibility")
            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
"ToggleButtonsVisibility")
      )

instance Prelude.Hashable PivotTableOptions where
  hashWithSalt :: Int -> PivotTableOptions -> Int
hashWithSalt Int
_salt PivotTableOptions' {Maybe PivotTableMetricPlacement
Maybe Visibility
Maybe TableCellStyle
Maybe RowAlternateColorOptions
toggleButtonsVisibility :: Maybe Visibility
singleMetricVisibility :: Maybe Visibility
rowHeaderStyle :: Maybe TableCellStyle
rowFieldNamesStyle :: Maybe TableCellStyle
rowAlternateColorOptions :: Maybe RowAlternateColorOptions
metricPlacement :: Maybe PivotTableMetricPlacement
columnNamesVisibility :: Maybe Visibility
columnHeaderStyle :: Maybe TableCellStyle
cellStyle :: Maybe TableCellStyle
$sel:toggleButtonsVisibility:PivotTableOptions' :: PivotTableOptions -> Maybe Visibility
$sel:singleMetricVisibility:PivotTableOptions' :: PivotTableOptions -> Maybe Visibility
$sel:rowHeaderStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
$sel:rowFieldNamesStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
$sel:rowAlternateColorOptions:PivotTableOptions' :: PivotTableOptions -> Maybe RowAlternateColorOptions
$sel:metricPlacement:PivotTableOptions' :: PivotTableOptions -> Maybe PivotTableMetricPlacement
$sel:columnNamesVisibility:PivotTableOptions' :: PivotTableOptions -> Maybe Visibility
$sel:columnHeaderStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
$sel:cellStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TableCellStyle
cellStyle
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TableCellStyle
columnHeaderStyle
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Visibility
columnNamesVisibility
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PivotTableMetricPlacement
metricPlacement
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RowAlternateColorOptions
rowAlternateColorOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TableCellStyle
rowFieldNamesStyle
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TableCellStyle
rowHeaderStyle
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Visibility
singleMetricVisibility
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Visibility
toggleButtonsVisibility

instance Prelude.NFData PivotTableOptions where
  rnf :: PivotTableOptions -> ()
rnf PivotTableOptions' {Maybe PivotTableMetricPlacement
Maybe Visibility
Maybe TableCellStyle
Maybe RowAlternateColorOptions
toggleButtonsVisibility :: Maybe Visibility
singleMetricVisibility :: Maybe Visibility
rowHeaderStyle :: Maybe TableCellStyle
rowFieldNamesStyle :: Maybe TableCellStyle
rowAlternateColorOptions :: Maybe RowAlternateColorOptions
metricPlacement :: Maybe PivotTableMetricPlacement
columnNamesVisibility :: Maybe Visibility
columnHeaderStyle :: Maybe TableCellStyle
cellStyle :: Maybe TableCellStyle
$sel:toggleButtonsVisibility:PivotTableOptions' :: PivotTableOptions -> Maybe Visibility
$sel:singleMetricVisibility:PivotTableOptions' :: PivotTableOptions -> Maybe Visibility
$sel:rowHeaderStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
$sel:rowFieldNamesStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
$sel:rowAlternateColorOptions:PivotTableOptions' :: PivotTableOptions -> Maybe RowAlternateColorOptions
$sel:metricPlacement:PivotTableOptions' :: PivotTableOptions -> Maybe PivotTableMetricPlacement
$sel:columnNamesVisibility:PivotTableOptions' :: PivotTableOptions -> Maybe Visibility
$sel:columnHeaderStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
$sel:cellStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe TableCellStyle
cellStyle
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TableCellStyle
columnHeaderStyle
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Visibility
columnNamesVisibility
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PivotTableMetricPlacement
metricPlacement
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RowAlternateColorOptions
rowAlternateColorOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TableCellStyle
rowFieldNamesStyle
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TableCellStyle
rowHeaderStyle
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Visibility
singleMetricVisibility
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Visibility
toggleButtonsVisibility

instance Data.ToJSON PivotTableOptions where
  toJSON :: PivotTableOptions -> Value
toJSON PivotTableOptions' {Maybe PivotTableMetricPlacement
Maybe Visibility
Maybe TableCellStyle
Maybe RowAlternateColorOptions
toggleButtonsVisibility :: Maybe Visibility
singleMetricVisibility :: Maybe Visibility
rowHeaderStyle :: Maybe TableCellStyle
rowFieldNamesStyle :: Maybe TableCellStyle
rowAlternateColorOptions :: Maybe RowAlternateColorOptions
metricPlacement :: Maybe PivotTableMetricPlacement
columnNamesVisibility :: Maybe Visibility
columnHeaderStyle :: Maybe TableCellStyle
cellStyle :: Maybe TableCellStyle
$sel:toggleButtonsVisibility:PivotTableOptions' :: PivotTableOptions -> Maybe Visibility
$sel:singleMetricVisibility:PivotTableOptions' :: PivotTableOptions -> Maybe Visibility
$sel:rowHeaderStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
$sel:rowFieldNamesStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
$sel:rowAlternateColorOptions:PivotTableOptions' :: PivotTableOptions -> Maybe RowAlternateColorOptions
$sel:metricPlacement:PivotTableOptions' :: PivotTableOptions -> Maybe PivotTableMetricPlacement
$sel:columnNamesVisibility:PivotTableOptions' :: PivotTableOptions -> Maybe Visibility
$sel:columnHeaderStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
$sel:cellStyle:PivotTableOptions' :: PivotTableOptions -> Maybe TableCellStyle
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"CellStyle" 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 TableCellStyle
cellStyle,
            (Key
"ColumnHeaderStyle" 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 TableCellStyle
columnHeaderStyle,
            (Key
"ColumnNamesVisibility" 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 Visibility
columnNamesVisibility,
            (Key
"MetricPlacement" 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 PivotTableMetricPlacement
metricPlacement,
            (Key
"RowAlternateColorOptions" 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 RowAlternateColorOptions
rowAlternateColorOptions,
            (Key
"RowFieldNamesStyle" 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 TableCellStyle
rowFieldNamesStyle,
            (Key
"RowHeaderStyle" 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 TableCellStyle
rowHeaderStyle,
            (Key
"SingleMetricVisibility" 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 Visibility
singleMetricVisibility,
            (Key
"ToggleButtonsVisibility" 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 Visibility
toggleButtonsVisibility
          ]
      )