{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BorderStyle = BorderStyle'
{
BorderStyle -> Maybe Bool
show :: Prelude.Maybe Prelude.Bool
}
deriving (BorderStyle -> BorderStyle -> Bool
(BorderStyle -> BorderStyle -> Bool)
-> (BorderStyle -> BorderStyle -> Bool) -> Eq BorderStyle
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]
(Int -> ReadS BorderStyle)
-> ReadS [BorderStyle]
-> ReadPrec BorderStyle
-> ReadPrec [BorderStyle]
-> Read 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
(Int -> BorderStyle -> ShowS)
-> (BorderStyle -> String)
-> ([BorderStyle] -> ShowS)
-> Show BorderStyle
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. BorderStyle -> Rep BorderStyle x)
-> (forall x. Rep BorderStyle x -> BorderStyle)
-> Generic BorderStyle
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' :: Maybe Bool -> BorderStyle
BorderStyle' {$sel:show:BorderStyle' :: Maybe Bool
show = Maybe Bool
forall a. Maybe a
Prelude.Nothing}
borderStyle_show :: Lens.Lens' BorderStyle (Prelude.Maybe Prelude.Bool)
borderStyle_show :: (Maybe Bool -> f (Maybe Bool)) -> BorderStyle -> f BorderStyle
borderStyle_show = (BorderStyle -> Maybe Bool)
-> (BorderStyle -> Maybe Bool -> BorderStyle)
-> Lens BorderStyle BorderStyle (Maybe Bool) (Maybe Bool)
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 Core.FromJSON BorderStyle where
parseJSON :: Value -> Parser BorderStyle
parseJSON =
String
-> (Object -> Parser BorderStyle) -> Value -> Parser BorderStyle
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BorderStyle"
(\Object
x -> Maybe Bool -> BorderStyle
BorderStyle' (Maybe Bool -> BorderStyle)
-> Parser (Maybe Bool) -> Parser BorderStyle
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Show"))
instance Prelude.Hashable BorderStyle
instance Prelude.NFData BorderStyle
instance Core.ToJSON BorderStyle where
toJSON :: BorderStyle -> Value
toJSON BorderStyle' {Maybe Bool
show :: Maybe Bool
$sel:show:BorderStyle' :: BorderStyle -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"Show" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
show]
)