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