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