{-# 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.ColumnGroupSchema where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types.ColumnGroupColumnSchema
data ColumnGroupSchema = ColumnGroupSchema'
{
ColumnGroupSchema -> Maybe [ColumnGroupColumnSchema]
columnGroupColumnSchemaList :: Prelude.Maybe [ColumnGroupColumnSchema],
ColumnGroupSchema -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (ColumnGroupSchema -> ColumnGroupSchema -> Bool
(ColumnGroupSchema -> ColumnGroupSchema -> Bool)
-> (ColumnGroupSchema -> ColumnGroupSchema -> Bool)
-> Eq ColumnGroupSchema
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ColumnGroupSchema -> ColumnGroupSchema -> Bool
$c/= :: ColumnGroupSchema -> ColumnGroupSchema -> Bool
== :: ColumnGroupSchema -> ColumnGroupSchema -> Bool
$c== :: ColumnGroupSchema -> ColumnGroupSchema -> Bool
Prelude.Eq, ReadPrec [ColumnGroupSchema]
ReadPrec ColumnGroupSchema
Int -> ReadS ColumnGroupSchema
ReadS [ColumnGroupSchema]
(Int -> ReadS ColumnGroupSchema)
-> ReadS [ColumnGroupSchema]
-> ReadPrec ColumnGroupSchema
-> ReadPrec [ColumnGroupSchema]
-> Read ColumnGroupSchema
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ColumnGroupSchema]
$creadListPrec :: ReadPrec [ColumnGroupSchema]
readPrec :: ReadPrec ColumnGroupSchema
$creadPrec :: ReadPrec ColumnGroupSchema
readList :: ReadS [ColumnGroupSchema]
$creadList :: ReadS [ColumnGroupSchema]
readsPrec :: Int -> ReadS ColumnGroupSchema
$creadsPrec :: Int -> ReadS ColumnGroupSchema
Prelude.Read, Int -> ColumnGroupSchema -> ShowS
[ColumnGroupSchema] -> ShowS
ColumnGroupSchema -> String
(Int -> ColumnGroupSchema -> ShowS)
-> (ColumnGroupSchema -> String)
-> ([ColumnGroupSchema] -> ShowS)
-> Show ColumnGroupSchema
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ColumnGroupSchema] -> ShowS
$cshowList :: [ColumnGroupSchema] -> ShowS
show :: ColumnGroupSchema -> String
$cshow :: ColumnGroupSchema -> String
showsPrec :: Int -> ColumnGroupSchema -> ShowS
$cshowsPrec :: Int -> ColumnGroupSchema -> ShowS
Prelude.Show, (forall x. ColumnGroupSchema -> Rep ColumnGroupSchema x)
-> (forall x. Rep ColumnGroupSchema x -> ColumnGroupSchema)
-> Generic ColumnGroupSchema
forall x. Rep ColumnGroupSchema x -> ColumnGroupSchema
forall x. ColumnGroupSchema -> Rep ColumnGroupSchema x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ColumnGroupSchema x -> ColumnGroupSchema
$cfrom :: forall x. ColumnGroupSchema -> Rep ColumnGroupSchema x
Prelude.Generic)
newColumnGroupSchema ::
ColumnGroupSchema
newColumnGroupSchema :: ColumnGroupSchema
newColumnGroupSchema =
ColumnGroupSchema' :: Maybe [ColumnGroupColumnSchema] -> Maybe Text -> ColumnGroupSchema
ColumnGroupSchema'
{ $sel:columnGroupColumnSchemaList:ColumnGroupSchema' :: Maybe [ColumnGroupColumnSchema]
columnGroupColumnSchemaList =
Maybe [ColumnGroupColumnSchema]
forall a. Maybe a
Prelude.Nothing,
$sel:name:ColumnGroupSchema' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
columnGroupSchema_columnGroupColumnSchemaList :: Lens.Lens' ColumnGroupSchema (Prelude.Maybe [ColumnGroupColumnSchema])
columnGroupSchema_columnGroupColumnSchemaList :: (Maybe [ColumnGroupColumnSchema]
-> f (Maybe [ColumnGroupColumnSchema]))
-> ColumnGroupSchema -> f ColumnGroupSchema
columnGroupSchema_columnGroupColumnSchemaList = (ColumnGroupSchema -> Maybe [ColumnGroupColumnSchema])
-> (ColumnGroupSchema
-> Maybe [ColumnGroupColumnSchema] -> ColumnGroupSchema)
-> Lens
ColumnGroupSchema
ColumnGroupSchema
(Maybe [ColumnGroupColumnSchema])
(Maybe [ColumnGroupColumnSchema])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ColumnGroupSchema' {Maybe [ColumnGroupColumnSchema]
columnGroupColumnSchemaList :: Maybe [ColumnGroupColumnSchema]
$sel:columnGroupColumnSchemaList:ColumnGroupSchema' :: ColumnGroupSchema -> Maybe [ColumnGroupColumnSchema]
columnGroupColumnSchemaList} -> Maybe [ColumnGroupColumnSchema]
columnGroupColumnSchemaList) (\s :: ColumnGroupSchema
s@ColumnGroupSchema' {} Maybe [ColumnGroupColumnSchema]
a -> ColumnGroupSchema
s {$sel:columnGroupColumnSchemaList:ColumnGroupSchema' :: Maybe [ColumnGroupColumnSchema]
columnGroupColumnSchemaList = Maybe [ColumnGroupColumnSchema]
a} :: ColumnGroupSchema) ((Maybe [ColumnGroupColumnSchema]
-> f (Maybe [ColumnGroupColumnSchema]))
-> ColumnGroupSchema -> f ColumnGroupSchema)
-> ((Maybe [ColumnGroupColumnSchema]
-> f (Maybe [ColumnGroupColumnSchema]))
-> Maybe [ColumnGroupColumnSchema]
-> f (Maybe [ColumnGroupColumnSchema]))
-> (Maybe [ColumnGroupColumnSchema]
-> f (Maybe [ColumnGroupColumnSchema]))
-> ColumnGroupSchema
-> f ColumnGroupSchema
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ColumnGroupColumnSchema]
[ColumnGroupColumnSchema]
[ColumnGroupColumnSchema]
[ColumnGroupColumnSchema]
-> Iso
(Maybe [ColumnGroupColumnSchema])
(Maybe [ColumnGroupColumnSchema])
(Maybe [ColumnGroupColumnSchema])
(Maybe [ColumnGroupColumnSchema])
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 AnIso
[ColumnGroupColumnSchema]
[ColumnGroupColumnSchema]
[ColumnGroupColumnSchema]
[ColumnGroupColumnSchema]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
columnGroupSchema_name :: Lens.Lens' ColumnGroupSchema (Prelude.Maybe Prelude.Text)
columnGroupSchema_name :: (Maybe Text -> f (Maybe Text))
-> ColumnGroupSchema -> f ColumnGroupSchema
columnGroupSchema_name = (ColumnGroupSchema -> Maybe Text)
-> (ColumnGroupSchema -> Maybe Text -> ColumnGroupSchema)
-> Lens
ColumnGroupSchema ColumnGroupSchema (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ColumnGroupSchema' {Maybe Text
name :: Maybe Text
$sel:name:ColumnGroupSchema' :: ColumnGroupSchema -> Maybe Text
name} -> Maybe Text
name) (\s :: ColumnGroupSchema
s@ColumnGroupSchema' {} Maybe Text
a -> ColumnGroupSchema
s {$sel:name:ColumnGroupSchema' :: Maybe Text
name = Maybe Text
a} :: ColumnGroupSchema)
instance Core.FromJSON ColumnGroupSchema where
parseJSON :: Value -> Parser ColumnGroupSchema
parseJSON =
String
-> (Object -> Parser ColumnGroupSchema)
-> Value
-> Parser ColumnGroupSchema
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ColumnGroupSchema"
( \Object
x ->
Maybe [ColumnGroupColumnSchema] -> Maybe Text -> ColumnGroupSchema
ColumnGroupSchema'
(Maybe [ColumnGroupColumnSchema]
-> Maybe Text -> ColumnGroupSchema)
-> Parser (Maybe [ColumnGroupColumnSchema])
-> Parser (Maybe Text -> ColumnGroupSchema)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ColumnGroupColumnSchema]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ColumnGroupColumnSchemaList"
Parser (Maybe (Maybe [ColumnGroupColumnSchema]))
-> Maybe [ColumnGroupColumnSchema]
-> Parser (Maybe [ColumnGroupColumnSchema])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ColumnGroupColumnSchema]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe Text -> ColumnGroupSchema)
-> Parser (Maybe Text) -> Parser ColumnGroupSchema
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
)
instance Prelude.Hashable ColumnGroupSchema
instance Prelude.NFData ColumnGroupSchema