{-# 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.ColumnGroup where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types.GeoSpatialColumnGroup
data ColumnGroup = ColumnGroup'
{
ColumnGroup -> Maybe GeoSpatialColumnGroup
geoSpatialColumnGroup :: Prelude.Maybe GeoSpatialColumnGroup
}
deriving (ColumnGroup -> ColumnGroup -> Bool
(ColumnGroup -> ColumnGroup -> Bool)
-> (ColumnGroup -> ColumnGroup -> Bool) -> Eq ColumnGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ColumnGroup -> ColumnGroup -> Bool
$c/= :: ColumnGroup -> ColumnGroup -> Bool
== :: ColumnGroup -> ColumnGroup -> Bool
$c== :: ColumnGroup -> ColumnGroup -> Bool
Prelude.Eq, ReadPrec [ColumnGroup]
ReadPrec ColumnGroup
Int -> ReadS ColumnGroup
ReadS [ColumnGroup]
(Int -> ReadS ColumnGroup)
-> ReadS [ColumnGroup]
-> ReadPrec ColumnGroup
-> ReadPrec [ColumnGroup]
-> Read ColumnGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ColumnGroup]
$creadListPrec :: ReadPrec [ColumnGroup]
readPrec :: ReadPrec ColumnGroup
$creadPrec :: ReadPrec ColumnGroup
readList :: ReadS [ColumnGroup]
$creadList :: ReadS [ColumnGroup]
readsPrec :: Int -> ReadS ColumnGroup
$creadsPrec :: Int -> ReadS ColumnGroup
Prelude.Read, Int -> ColumnGroup -> ShowS
[ColumnGroup] -> ShowS
ColumnGroup -> String
(Int -> ColumnGroup -> ShowS)
-> (ColumnGroup -> String)
-> ([ColumnGroup] -> ShowS)
-> Show ColumnGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ColumnGroup] -> ShowS
$cshowList :: [ColumnGroup] -> ShowS
show :: ColumnGroup -> String
$cshow :: ColumnGroup -> String
showsPrec :: Int -> ColumnGroup -> ShowS
$cshowsPrec :: Int -> ColumnGroup -> ShowS
Prelude.Show, (forall x. ColumnGroup -> Rep ColumnGroup x)
-> (forall x. Rep ColumnGroup x -> ColumnGroup)
-> Generic ColumnGroup
forall x. Rep ColumnGroup x -> ColumnGroup
forall x. ColumnGroup -> Rep ColumnGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ColumnGroup x -> ColumnGroup
$cfrom :: forall x. ColumnGroup -> Rep ColumnGroup x
Prelude.Generic)
newColumnGroup ::
ColumnGroup
newColumnGroup :: ColumnGroup
newColumnGroup =
ColumnGroup' :: Maybe GeoSpatialColumnGroup -> ColumnGroup
ColumnGroup'
{ $sel:geoSpatialColumnGroup:ColumnGroup' :: Maybe GeoSpatialColumnGroup
geoSpatialColumnGroup =
Maybe GeoSpatialColumnGroup
forall a. Maybe a
Prelude.Nothing
}
columnGroup_geoSpatialColumnGroup :: Lens.Lens' ColumnGroup (Prelude.Maybe GeoSpatialColumnGroup)
columnGroup_geoSpatialColumnGroup :: (Maybe GeoSpatialColumnGroup -> f (Maybe GeoSpatialColumnGroup))
-> ColumnGroup -> f ColumnGroup
columnGroup_geoSpatialColumnGroup = (ColumnGroup -> Maybe GeoSpatialColumnGroup)
-> (ColumnGroup -> Maybe GeoSpatialColumnGroup -> ColumnGroup)
-> Lens
ColumnGroup
ColumnGroup
(Maybe GeoSpatialColumnGroup)
(Maybe GeoSpatialColumnGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ColumnGroup' {Maybe GeoSpatialColumnGroup
geoSpatialColumnGroup :: Maybe GeoSpatialColumnGroup
$sel:geoSpatialColumnGroup:ColumnGroup' :: ColumnGroup -> Maybe GeoSpatialColumnGroup
geoSpatialColumnGroup} -> Maybe GeoSpatialColumnGroup
geoSpatialColumnGroup) (\s :: ColumnGroup
s@ColumnGroup' {} Maybe GeoSpatialColumnGroup
a -> ColumnGroup
s {$sel:geoSpatialColumnGroup:ColumnGroup' :: Maybe GeoSpatialColumnGroup
geoSpatialColumnGroup = Maybe GeoSpatialColumnGroup
a} :: ColumnGroup)
instance Core.FromJSON ColumnGroup where
parseJSON :: Value -> Parser ColumnGroup
parseJSON =
String
-> (Object -> Parser ColumnGroup) -> Value -> Parser ColumnGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ColumnGroup"
( \Object
x ->
Maybe GeoSpatialColumnGroup -> ColumnGroup
ColumnGroup'
(Maybe GeoSpatialColumnGroup -> ColumnGroup)
-> Parser (Maybe GeoSpatialColumnGroup) -> Parser ColumnGroup
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe GeoSpatialColumnGroup)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GeoSpatialColumnGroup")
)
instance Prelude.Hashable ColumnGroup
instance Prelude.NFData ColumnGroup
instance Core.ToJSON ColumnGroup where
toJSON :: ColumnGroup -> Value
toJSON ColumnGroup' {Maybe GeoSpatialColumnGroup
geoSpatialColumnGroup :: Maybe GeoSpatialColumnGroup
$sel:geoSpatialColumnGroup:ColumnGroup' :: ColumnGroup -> Maybe GeoSpatialColumnGroup
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"GeoSpatialColumnGroup" Text -> GeoSpatialColumnGroup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(GeoSpatialColumnGroup -> Pair)
-> Maybe GeoSpatialColumnGroup -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe GeoSpatialColumnGroup
geoSpatialColumnGroup
]
)