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