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