{-# 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.BorderStyle 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
data BorderStyle = BorderStyle'
{
BorderStyle -> Maybe Bool
show :: Prelude.Maybe Prelude.Bool
}
deriving (BorderStyle -> BorderStyle -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BorderStyle -> BorderStyle -> Bool
$c/= :: BorderStyle -> BorderStyle -> Bool
== :: BorderStyle -> BorderStyle -> Bool
$c== :: BorderStyle -> BorderStyle -> Bool
Prelude.Eq, ReadPrec [BorderStyle]
ReadPrec BorderStyle
Int -> ReadS BorderStyle
ReadS [BorderStyle]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BorderStyle]
$creadListPrec :: ReadPrec [BorderStyle]
readPrec :: ReadPrec BorderStyle
$creadPrec :: ReadPrec BorderStyle
readList :: ReadS [BorderStyle]
$creadList :: ReadS [BorderStyle]
readsPrec :: Int -> ReadS BorderStyle
$creadsPrec :: Int -> ReadS BorderStyle
Prelude.Read, Int -> BorderStyle -> ShowS
[BorderStyle] -> ShowS
BorderStyle -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BorderStyle] -> ShowS
$cshowList :: [BorderStyle] -> ShowS
show :: BorderStyle -> String
$cshow :: BorderStyle -> String
showsPrec :: Int -> BorderStyle -> ShowS
$cshowsPrec :: Int -> BorderStyle -> ShowS
Prelude.Show, forall x. Rep BorderStyle x -> BorderStyle
forall x. BorderStyle -> Rep BorderStyle x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BorderStyle x -> BorderStyle
$cfrom :: forall x. BorderStyle -> Rep BorderStyle x
Prelude.Generic)
newBorderStyle ::
BorderStyle
newBorderStyle :: BorderStyle
newBorderStyle = BorderStyle' {$sel:show:BorderStyle' :: Maybe Bool
show = forall a. Maybe a
Prelude.Nothing}
borderStyle_show :: Lens.Lens' BorderStyle (Prelude.Maybe Prelude.Bool)
borderStyle_show :: Lens' BorderStyle (Maybe Bool)
borderStyle_show = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BorderStyle' {Maybe Bool
show :: Maybe Bool
$sel:show:BorderStyle' :: BorderStyle -> Maybe Bool
show} -> Maybe Bool
show) (\s :: BorderStyle
s@BorderStyle' {} Maybe Bool
a -> BorderStyle
s {$sel:show:BorderStyle' :: Maybe Bool
show = Maybe Bool
a} :: BorderStyle)
instance Data.FromJSON BorderStyle where
parseJSON :: Value -> Parser BorderStyle
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BorderStyle"
(\Object
x -> Maybe Bool -> BorderStyle
BorderStyle' 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
"Show"))
instance Prelude.Hashable BorderStyle where
hashWithSalt :: Int -> BorderStyle -> Int
hashWithSalt Int
_salt BorderStyle' {Maybe Bool
show :: Maybe Bool
$sel:show:BorderStyle' :: BorderStyle -> Maybe Bool
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
show
instance Prelude.NFData BorderStyle where
rnf :: BorderStyle -> ()
rnf BorderStyle' {Maybe Bool
show :: Maybe Bool
$sel:show:BorderStyle' :: BorderStyle -> Maybe Bool
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
show
instance Data.ToJSON BorderStyle where
toJSON :: BorderStyle -> Value
toJSON BorderStyle' {Maybe Bool
show :: Maybe Bool
$sel:show:BorderStyle' :: BorderStyle -> Maybe Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"Show" 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 Bool
show]
)