{-# 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.DashboardPublishOptions where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types.AdHocFilteringOption
import Amazonka.QuickSight.Types.ExportToCSVOption
import Amazonka.QuickSight.Types.SheetControlsOption
data DashboardPublishOptions = DashboardPublishOptions'
{
DashboardPublishOptions -> Maybe AdHocFilteringOption
adHocFilteringOption :: Prelude.Maybe AdHocFilteringOption,
DashboardPublishOptions -> Maybe ExportToCSVOption
exportToCSVOption :: Prelude.Maybe ExportToCSVOption,
DashboardPublishOptions -> Maybe SheetControlsOption
sheetControlsOption :: Prelude.Maybe SheetControlsOption
}
deriving (DashboardPublishOptions -> DashboardPublishOptions -> Bool
(DashboardPublishOptions -> DashboardPublishOptions -> Bool)
-> (DashboardPublishOptions -> DashboardPublishOptions -> Bool)
-> Eq DashboardPublishOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DashboardPublishOptions -> DashboardPublishOptions -> Bool
$c/= :: DashboardPublishOptions -> DashboardPublishOptions -> Bool
== :: DashboardPublishOptions -> DashboardPublishOptions -> Bool
$c== :: DashboardPublishOptions -> DashboardPublishOptions -> Bool
Prelude.Eq, ReadPrec [DashboardPublishOptions]
ReadPrec DashboardPublishOptions
Int -> ReadS DashboardPublishOptions
ReadS [DashboardPublishOptions]
(Int -> ReadS DashboardPublishOptions)
-> ReadS [DashboardPublishOptions]
-> ReadPrec DashboardPublishOptions
-> ReadPrec [DashboardPublishOptions]
-> Read DashboardPublishOptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DashboardPublishOptions]
$creadListPrec :: ReadPrec [DashboardPublishOptions]
readPrec :: ReadPrec DashboardPublishOptions
$creadPrec :: ReadPrec DashboardPublishOptions
readList :: ReadS [DashboardPublishOptions]
$creadList :: ReadS [DashboardPublishOptions]
readsPrec :: Int -> ReadS DashboardPublishOptions
$creadsPrec :: Int -> ReadS DashboardPublishOptions
Prelude.Read, Int -> DashboardPublishOptions -> ShowS
[DashboardPublishOptions] -> ShowS
DashboardPublishOptions -> String
(Int -> DashboardPublishOptions -> ShowS)
-> (DashboardPublishOptions -> String)
-> ([DashboardPublishOptions] -> ShowS)
-> Show DashboardPublishOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DashboardPublishOptions] -> ShowS
$cshowList :: [DashboardPublishOptions] -> ShowS
show :: DashboardPublishOptions -> String
$cshow :: DashboardPublishOptions -> String
showsPrec :: Int -> DashboardPublishOptions -> ShowS
$cshowsPrec :: Int -> DashboardPublishOptions -> ShowS
Prelude.Show, (forall x.
DashboardPublishOptions -> Rep DashboardPublishOptions x)
-> (forall x.
Rep DashboardPublishOptions x -> DashboardPublishOptions)
-> Generic DashboardPublishOptions
forall x. Rep DashboardPublishOptions x -> DashboardPublishOptions
forall x. DashboardPublishOptions -> Rep DashboardPublishOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DashboardPublishOptions x -> DashboardPublishOptions
$cfrom :: forall x. DashboardPublishOptions -> Rep DashboardPublishOptions x
Prelude.Generic)
newDashboardPublishOptions ::
DashboardPublishOptions
newDashboardPublishOptions :: DashboardPublishOptions
newDashboardPublishOptions =
DashboardPublishOptions' :: Maybe AdHocFilteringOption
-> Maybe ExportToCSVOption
-> Maybe SheetControlsOption
-> DashboardPublishOptions
DashboardPublishOptions'
{ $sel:adHocFilteringOption:DashboardPublishOptions' :: Maybe AdHocFilteringOption
adHocFilteringOption =
Maybe AdHocFilteringOption
forall a. Maybe a
Prelude.Nothing,
$sel:exportToCSVOption:DashboardPublishOptions' :: Maybe ExportToCSVOption
exportToCSVOption = Maybe ExportToCSVOption
forall a. Maybe a
Prelude.Nothing,
$sel:sheetControlsOption:DashboardPublishOptions' :: Maybe SheetControlsOption
sheetControlsOption = Maybe SheetControlsOption
forall a. Maybe a
Prelude.Nothing
}
dashboardPublishOptions_adHocFilteringOption :: Lens.Lens' DashboardPublishOptions (Prelude.Maybe AdHocFilteringOption)
dashboardPublishOptions_adHocFilteringOption :: (Maybe AdHocFilteringOption -> f (Maybe AdHocFilteringOption))
-> DashboardPublishOptions -> f DashboardPublishOptions
dashboardPublishOptions_adHocFilteringOption = (DashboardPublishOptions -> Maybe AdHocFilteringOption)
-> (DashboardPublishOptions
-> Maybe AdHocFilteringOption -> DashboardPublishOptions)
-> Lens
DashboardPublishOptions
DashboardPublishOptions
(Maybe AdHocFilteringOption)
(Maybe AdHocFilteringOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashboardPublishOptions' {Maybe AdHocFilteringOption
adHocFilteringOption :: Maybe AdHocFilteringOption
$sel:adHocFilteringOption:DashboardPublishOptions' :: DashboardPublishOptions -> Maybe AdHocFilteringOption
adHocFilteringOption} -> Maybe AdHocFilteringOption
adHocFilteringOption) (\s :: DashboardPublishOptions
s@DashboardPublishOptions' {} Maybe AdHocFilteringOption
a -> DashboardPublishOptions
s {$sel:adHocFilteringOption:DashboardPublishOptions' :: Maybe AdHocFilteringOption
adHocFilteringOption = Maybe AdHocFilteringOption
a} :: DashboardPublishOptions)
dashboardPublishOptions_exportToCSVOption :: Lens.Lens' DashboardPublishOptions (Prelude.Maybe ExportToCSVOption)
dashboardPublishOptions_exportToCSVOption :: (Maybe ExportToCSVOption -> f (Maybe ExportToCSVOption))
-> DashboardPublishOptions -> f DashboardPublishOptions
dashboardPublishOptions_exportToCSVOption = (DashboardPublishOptions -> Maybe ExportToCSVOption)
-> (DashboardPublishOptions
-> Maybe ExportToCSVOption -> DashboardPublishOptions)
-> Lens
DashboardPublishOptions
DashboardPublishOptions
(Maybe ExportToCSVOption)
(Maybe ExportToCSVOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashboardPublishOptions' {Maybe ExportToCSVOption
exportToCSVOption :: Maybe ExportToCSVOption
$sel:exportToCSVOption:DashboardPublishOptions' :: DashboardPublishOptions -> Maybe ExportToCSVOption
exportToCSVOption} -> Maybe ExportToCSVOption
exportToCSVOption) (\s :: DashboardPublishOptions
s@DashboardPublishOptions' {} Maybe ExportToCSVOption
a -> DashboardPublishOptions
s {$sel:exportToCSVOption:DashboardPublishOptions' :: Maybe ExportToCSVOption
exportToCSVOption = Maybe ExportToCSVOption
a} :: DashboardPublishOptions)
dashboardPublishOptions_sheetControlsOption :: Lens.Lens' DashboardPublishOptions (Prelude.Maybe SheetControlsOption)
dashboardPublishOptions_sheetControlsOption :: (Maybe SheetControlsOption -> f (Maybe SheetControlsOption))
-> DashboardPublishOptions -> f DashboardPublishOptions
dashboardPublishOptions_sheetControlsOption = (DashboardPublishOptions -> Maybe SheetControlsOption)
-> (DashboardPublishOptions
-> Maybe SheetControlsOption -> DashboardPublishOptions)
-> Lens
DashboardPublishOptions
DashboardPublishOptions
(Maybe SheetControlsOption)
(Maybe SheetControlsOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashboardPublishOptions' {Maybe SheetControlsOption
sheetControlsOption :: Maybe SheetControlsOption
$sel:sheetControlsOption:DashboardPublishOptions' :: DashboardPublishOptions -> Maybe SheetControlsOption
sheetControlsOption} -> Maybe SheetControlsOption
sheetControlsOption) (\s :: DashboardPublishOptions
s@DashboardPublishOptions' {} Maybe SheetControlsOption
a -> DashboardPublishOptions
s {$sel:sheetControlsOption:DashboardPublishOptions' :: Maybe SheetControlsOption
sheetControlsOption = Maybe SheetControlsOption
a} :: DashboardPublishOptions)
instance Prelude.Hashable DashboardPublishOptions
instance Prelude.NFData DashboardPublishOptions
instance Core.ToJSON DashboardPublishOptions where
toJSON :: DashboardPublishOptions -> Value
toJSON DashboardPublishOptions' {Maybe AdHocFilteringOption
Maybe ExportToCSVOption
Maybe SheetControlsOption
sheetControlsOption :: Maybe SheetControlsOption
exportToCSVOption :: Maybe ExportToCSVOption
adHocFilteringOption :: Maybe AdHocFilteringOption
$sel:sheetControlsOption:DashboardPublishOptions' :: DashboardPublishOptions -> Maybe SheetControlsOption
$sel:exportToCSVOption:DashboardPublishOptions' :: DashboardPublishOptions -> Maybe ExportToCSVOption
$sel:adHocFilteringOption:DashboardPublishOptions' :: DashboardPublishOptions -> Maybe AdHocFilteringOption
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"AdHocFilteringOption" Text -> AdHocFilteringOption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AdHocFilteringOption -> Pair)
-> Maybe AdHocFilteringOption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AdHocFilteringOption
adHocFilteringOption,
(Text
"ExportToCSVOption" Text -> ExportToCSVOption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ExportToCSVOption -> Pair)
-> Maybe ExportToCSVOption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExportToCSVOption
exportToCSVOption,
(Text
"SheetControlsOption" Text -> SheetControlsOption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SheetControlsOption -> Pair)
-> Maybe SheetControlsOption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SheetControlsOption
sheetControlsOption
]
)