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