{-# 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.FilledMapSortConfiguration 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.FieldSortOptions
data FilledMapSortConfiguration = FilledMapSortConfiguration'
{
FilledMapSortConfiguration -> Maybe [FieldSortOptions]
categorySort :: Prelude.Maybe [FieldSortOptions]
}
deriving (FilledMapSortConfiguration -> FilledMapSortConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FilledMapSortConfiguration -> FilledMapSortConfiguration -> Bool
$c/= :: FilledMapSortConfiguration -> FilledMapSortConfiguration -> Bool
== :: FilledMapSortConfiguration -> FilledMapSortConfiguration -> Bool
$c== :: FilledMapSortConfiguration -> FilledMapSortConfiguration -> Bool
Prelude.Eq, ReadPrec [FilledMapSortConfiguration]
ReadPrec FilledMapSortConfiguration
Int -> ReadS FilledMapSortConfiguration
ReadS [FilledMapSortConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FilledMapSortConfiguration]
$creadListPrec :: ReadPrec [FilledMapSortConfiguration]
readPrec :: ReadPrec FilledMapSortConfiguration
$creadPrec :: ReadPrec FilledMapSortConfiguration
readList :: ReadS [FilledMapSortConfiguration]
$creadList :: ReadS [FilledMapSortConfiguration]
readsPrec :: Int -> ReadS FilledMapSortConfiguration
$creadsPrec :: Int -> ReadS FilledMapSortConfiguration
Prelude.Read, Int -> FilledMapSortConfiguration -> ShowS
[FilledMapSortConfiguration] -> ShowS
FilledMapSortConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FilledMapSortConfiguration] -> ShowS
$cshowList :: [FilledMapSortConfiguration] -> ShowS
show :: FilledMapSortConfiguration -> String
$cshow :: FilledMapSortConfiguration -> String
showsPrec :: Int -> FilledMapSortConfiguration -> ShowS
$cshowsPrec :: Int -> FilledMapSortConfiguration -> ShowS
Prelude.Show, forall x.
Rep FilledMapSortConfiguration x -> FilledMapSortConfiguration
forall x.
FilledMapSortConfiguration -> Rep FilledMapSortConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FilledMapSortConfiguration x -> FilledMapSortConfiguration
$cfrom :: forall x.
FilledMapSortConfiguration -> Rep FilledMapSortConfiguration x
Prelude.Generic)
newFilledMapSortConfiguration ::
FilledMapSortConfiguration
newFilledMapSortConfiguration :: FilledMapSortConfiguration
newFilledMapSortConfiguration =
FilledMapSortConfiguration'
{ $sel:categorySort:FilledMapSortConfiguration' :: Maybe [FieldSortOptions]
categorySort =
forall a. Maybe a
Prelude.Nothing
}
filledMapSortConfiguration_categorySort :: Lens.Lens' FilledMapSortConfiguration (Prelude.Maybe [FieldSortOptions])
filledMapSortConfiguration_categorySort :: Lens' FilledMapSortConfiguration (Maybe [FieldSortOptions])
filledMapSortConfiguration_categorySort = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FilledMapSortConfiguration' {Maybe [FieldSortOptions]
categorySort :: Maybe [FieldSortOptions]
$sel:categorySort:FilledMapSortConfiguration' :: FilledMapSortConfiguration -> Maybe [FieldSortOptions]
categorySort} -> Maybe [FieldSortOptions]
categorySort) (\s :: FilledMapSortConfiguration
s@FilledMapSortConfiguration' {} Maybe [FieldSortOptions]
a -> FilledMapSortConfiguration
s {$sel:categorySort:FilledMapSortConfiguration' :: Maybe [FieldSortOptions]
categorySort = Maybe [FieldSortOptions]
a} :: FilledMapSortConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON FilledMapSortConfiguration where
parseJSON :: Value -> Parser FilledMapSortConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FilledMapSortConfiguration"
( \Object
x ->
Maybe [FieldSortOptions] -> FilledMapSortConfiguration
FilledMapSortConfiguration'
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
"CategorySort" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable FilledMapSortConfiguration where
hashWithSalt :: Int -> FilledMapSortConfiguration -> Int
hashWithSalt Int
_salt FilledMapSortConfiguration' {Maybe [FieldSortOptions]
categorySort :: Maybe [FieldSortOptions]
$sel:categorySort:FilledMapSortConfiguration' :: FilledMapSortConfiguration -> Maybe [FieldSortOptions]
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [FieldSortOptions]
categorySort
instance Prelude.NFData FilledMapSortConfiguration where
rnf :: FilledMapSortConfiguration -> ()
rnf FilledMapSortConfiguration' {Maybe [FieldSortOptions]
categorySort :: Maybe [FieldSortOptions]
$sel:categorySort:FilledMapSortConfiguration' :: FilledMapSortConfiguration -> Maybe [FieldSortOptions]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [FieldSortOptions]
categorySort
instance Data.ToJSON FilledMapSortConfiguration where
toJSON :: FilledMapSortConfiguration -> Value
toJSON FilledMapSortConfiguration' {Maybe [FieldSortOptions]
categorySort :: Maybe [FieldSortOptions]
$sel:categorySort:FilledMapSortConfiguration' :: FilledMapSortConfiguration -> Maybe [FieldSortOptions]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"CategorySort" 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 [FieldSortOptions]
categorySort]
)