{-# 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.TableSideBorderOptions 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.TableBorderOptions
data TableSideBorderOptions = TableSideBorderOptions'
{
TableSideBorderOptions -> Maybe TableBorderOptions
bottom :: Prelude.Maybe TableBorderOptions,
TableSideBorderOptions -> Maybe TableBorderOptions
innerHorizontal :: Prelude.Maybe TableBorderOptions,
TableSideBorderOptions -> Maybe TableBorderOptions
innerVertical :: Prelude.Maybe TableBorderOptions,
TableSideBorderOptions -> Maybe TableBorderOptions
left :: Prelude.Maybe TableBorderOptions,
TableSideBorderOptions -> Maybe TableBorderOptions
right :: Prelude.Maybe TableBorderOptions,
TableSideBorderOptions -> Maybe TableBorderOptions
top :: Prelude.Maybe TableBorderOptions
}
deriving (TableSideBorderOptions -> TableSideBorderOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TableSideBorderOptions -> TableSideBorderOptions -> Bool
$c/= :: TableSideBorderOptions -> TableSideBorderOptions -> Bool
== :: TableSideBorderOptions -> TableSideBorderOptions -> Bool
$c== :: TableSideBorderOptions -> TableSideBorderOptions -> Bool
Prelude.Eq, ReadPrec [TableSideBorderOptions]
ReadPrec TableSideBorderOptions
Int -> ReadS TableSideBorderOptions
ReadS [TableSideBorderOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TableSideBorderOptions]
$creadListPrec :: ReadPrec [TableSideBorderOptions]
readPrec :: ReadPrec TableSideBorderOptions
$creadPrec :: ReadPrec TableSideBorderOptions
readList :: ReadS [TableSideBorderOptions]
$creadList :: ReadS [TableSideBorderOptions]
readsPrec :: Int -> ReadS TableSideBorderOptions
$creadsPrec :: Int -> ReadS TableSideBorderOptions
Prelude.Read, Int -> TableSideBorderOptions -> ShowS
[TableSideBorderOptions] -> ShowS
TableSideBorderOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TableSideBorderOptions] -> ShowS
$cshowList :: [TableSideBorderOptions] -> ShowS
show :: TableSideBorderOptions -> String
$cshow :: TableSideBorderOptions -> String
showsPrec :: Int -> TableSideBorderOptions -> ShowS
$cshowsPrec :: Int -> TableSideBorderOptions -> ShowS
Prelude.Show, forall x. Rep TableSideBorderOptions x -> TableSideBorderOptions
forall x. TableSideBorderOptions -> Rep TableSideBorderOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TableSideBorderOptions x -> TableSideBorderOptions
$cfrom :: forall x. TableSideBorderOptions -> Rep TableSideBorderOptions x
Prelude.Generic)
newTableSideBorderOptions ::
TableSideBorderOptions
newTableSideBorderOptions :: TableSideBorderOptions
newTableSideBorderOptions =
TableSideBorderOptions'
{ $sel:bottom:TableSideBorderOptions' :: Maybe TableBorderOptions
bottom = forall a. Maybe a
Prelude.Nothing,
$sel:innerHorizontal:TableSideBorderOptions' :: Maybe TableBorderOptions
innerHorizontal = forall a. Maybe a
Prelude.Nothing,
$sel:innerVertical:TableSideBorderOptions' :: Maybe TableBorderOptions
innerVertical = forall a. Maybe a
Prelude.Nothing,
$sel:left:TableSideBorderOptions' :: Maybe TableBorderOptions
left = forall a. Maybe a
Prelude.Nothing,
$sel:right:TableSideBorderOptions' :: Maybe TableBorderOptions
right = forall a. Maybe a
Prelude.Nothing,
$sel:top:TableSideBorderOptions' :: Maybe TableBorderOptions
top = forall a. Maybe a
Prelude.Nothing
}
tableSideBorderOptions_bottom :: Lens.Lens' TableSideBorderOptions (Prelude.Maybe TableBorderOptions)
tableSideBorderOptions_bottom :: Lens' TableSideBorderOptions (Maybe TableBorderOptions)
tableSideBorderOptions_bottom = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableSideBorderOptions' {Maybe TableBorderOptions
bottom :: Maybe TableBorderOptions
$sel:bottom:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
bottom} -> Maybe TableBorderOptions
bottom) (\s :: TableSideBorderOptions
s@TableSideBorderOptions' {} Maybe TableBorderOptions
a -> TableSideBorderOptions
s {$sel:bottom:TableSideBorderOptions' :: Maybe TableBorderOptions
bottom = Maybe TableBorderOptions
a} :: TableSideBorderOptions)
tableSideBorderOptions_innerHorizontal :: Lens.Lens' TableSideBorderOptions (Prelude.Maybe TableBorderOptions)
tableSideBorderOptions_innerHorizontal :: Lens' TableSideBorderOptions (Maybe TableBorderOptions)
tableSideBorderOptions_innerHorizontal = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableSideBorderOptions' {Maybe TableBorderOptions
innerHorizontal :: Maybe TableBorderOptions
$sel:innerHorizontal:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
innerHorizontal} -> Maybe TableBorderOptions
innerHorizontal) (\s :: TableSideBorderOptions
s@TableSideBorderOptions' {} Maybe TableBorderOptions
a -> TableSideBorderOptions
s {$sel:innerHorizontal:TableSideBorderOptions' :: Maybe TableBorderOptions
innerHorizontal = Maybe TableBorderOptions
a} :: TableSideBorderOptions)
tableSideBorderOptions_innerVertical :: Lens.Lens' TableSideBorderOptions (Prelude.Maybe TableBorderOptions)
tableSideBorderOptions_innerVertical :: Lens' TableSideBorderOptions (Maybe TableBorderOptions)
tableSideBorderOptions_innerVertical = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableSideBorderOptions' {Maybe TableBorderOptions
innerVertical :: Maybe TableBorderOptions
$sel:innerVertical:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
innerVertical} -> Maybe TableBorderOptions
innerVertical) (\s :: TableSideBorderOptions
s@TableSideBorderOptions' {} Maybe TableBorderOptions
a -> TableSideBorderOptions
s {$sel:innerVertical:TableSideBorderOptions' :: Maybe TableBorderOptions
innerVertical = Maybe TableBorderOptions
a} :: TableSideBorderOptions)
tableSideBorderOptions_left :: Lens.Lens' TableSideBorderOptions (Prelude.Maybe TableBorderOptions)
tableSideBorderOptions_left :: Lens' TableSideBorderOptions (Maybe TableBorderOptions)
tableSideBorderOptions_left = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableSideBorderOptions' {Maybe TableBorderOptions
left :: Maybe TableBorderOptions
$sel:left:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
left} -> Maybe TableBorderOptions
left) (\s :: TableSideBorderOptions
s@TableSideBorderOptions' {} Maybe TableBorderOptions
a -> TableSideBorderOptions
s {$sel:left:TableSideBorderOptions' :: Maybe TableBorderOptions
left = Maybe TableBorderOptions
a} :: TableSideBorderOptions)
tableSideBorderOptions_right :: Lens.Lens' TableSideBorderOptions (Prelude.Maybe TableBorderOptions)
tableSideBorderOptions_right :: Lens' TableSideBorderOptions (Maybe TableBorderOptions)
tableSideBorderOptions_right = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableSideBorderOptions' {Maybe TableBorderOptions
right :: Maybe TableBorderOptions
$sel:right:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
right} -> Maybe TableBorderOptions
right) (\s :: TableSideBorderOptions
s@TableSideBorderOptions' {} Maybe TableBorderOptions
a -> TableSideBorderOptions
s {$sel:right:TableSideBorderOptions' :: Maybe TableBorderOptions
right = Maybe TableBorderOptions
a} :: TableSideBorderOptions)
tableSideBorderOptions_top :: Lens.Lens' TableSideBorderOptions (Prelude.Maybe TableBorderOptions)
tableSideBorderOptions_top :: Lens' TableSideBorderOptions (Maybe TableBorderOptions)
tableSideBorderOptions_top = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableSideBorderOptions' {Maybe TableBorderOptions
top :: Maybe TableBorderOptions
$sel:top:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
top} -> Maybe TableBorderOptions
top) (\s :: TableSideBorderOptions
s@TableSideBorderOptions' {} Maybe TableBorderOptions
a -> TableSideBorderOptions
s {$sel:top:TableSideBorderOptions' :: Maybe TableBorderOptions
top = Maybe TableBorderOptions
a} :: TableSideBorderOptions)
instance Data.FromJSON TableSideBorderOptions where
parseJSON :: Value -> Parser TableSideBorderOptions
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TableSideBorderOptions"
( \Object
x ->
Maybe TableBorderOptions
-> Maybe TableBorderOptions
-> Maybe TableBorderOptions
-> Maybe TableBorderOptions
-> Maybe TableBorderOptions
-> Maybe TableBorderOptions
-> TableSideBorderOptions
TableSideBorderOptions'
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
"Bottom")
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
"InnerHorizontal")
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
"InnerVertical")
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
"Left")
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
"Right")
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
"Top")
)
instance Prelude.Hashable TableSideBorderOptions where
hashWithSalt :: Int -> TableSideBorderOptions -> Int
hashWithSalt Int
_salt TableSideBorderOptions' {Maybe TableBorderOptions
top :: Maybe TableBorderOptions
right :: Maybe TableBorderOptions
left :: Maybe TableBorderOptions
innerVertical :: Maybe TableBorderOptions
innerHorizontal :: Maybe TableBorderOptions
bottom :: Maybe TableBorderOptions
$sel:top:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:right:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:left:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:innerVertical:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:innerHorizontal:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:bottom:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TableBorderOptions
bottom
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TableBorderOptions
innerHorizontal
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TableBorderOptions
innerVertical
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TableBorderOptions
left
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TableBorderOptions
right
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TableBorderOptions
top
instance Prelude.NFData TableSideBorderOptions where
rnf :: TableSideBorderOptions -> ()
rnf TableSideBorderOptions' {Maybe TableBorderOptions
top :: Maybe TableBorderOptions
right :: Maybe TableBorderOptions
left :: Maybe TableBorderOptions
innerVertical :: Maybe TableBorderOptions
innerHorizontal :: Maybe TableBorderOptions
bottom :: Maybe TableBorderOptions
$sel:top:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:right:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:left:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:innerVertical:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:innerHorizontal:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:bottom:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe TableBorderOptions
bottom
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TableBorderOptions
innerHorizontal
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TableBorderOptions
innerVertical
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TableBorderOptions
left
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TableBorderOptions
right
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TableBorderOptions
top
instance Data.ToJSON TableSideBorderOptions where
toJSON :: TableSideBorderOptions -> Value
toJSON TableSideBorderOptions' {Maybe TableBorderOptions
top :: Maybe TableBorderOptions
right :: Maybe TableBorderOptions
left :: Maybe TableBorderOptions
innerVertical :: Maybe TableBorderOptions
innerHorizontal :: Maybe TableBorderOptions
bottom :: Maybe TableBorderOptions
$sel:top:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:right:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:left:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:innerVertical:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:innerHorizontal:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
$sel:bottom:TableSideBorderOptions' :: TableSideBorderOptions -> Maybe TableBorderOptions
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Bottom" 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 TableBorderOptions
bottom,
(Key
"InnerHorizontal" 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 TableBorderOptions
innerHorizontal,
(Key
"InnerVertical" 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 TableBorderOptions
innerVertical,
(Key
"Left" 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 TableBorderOptions
left,
(Key
"Right" 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 TableBorderOptions
right,
(Key
"Top" 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 TableBorderOptions
top
]
)