{-# 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.RedshiftData.Types.TableMember where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TableMember = TableMember'
{
TableMember -> Maybe Text
schema :: Prelude.Maybe Prelude.Text,
TableMember -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
TableMember -> Maybe Text
type' :: Prelude.Maybe Prelude.Text
}
deriving (TableMember -> TableMember -> Bool
(TableMember -> TableMember -> Bool)
-> (TableMember -> TableMember -> Bool) -> Eq TableMember
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TableMember -> TableMember -> Bool
$c/= :: TableMember -> TableMember -> Bool
== :: TableMember -> TableMember -> Bool
$c== :: TableMember -> TableMember -> Bool
Prelude.Eq, ReadPrec [TableMember]
ReadPrec TableMember
Int -> ReadS TableMember
ReadS [TableMember]
(Int -> ReadS TableMember)
-> ReadS [TableMember]
-> ReadPrec TableMember
-> ReadPrec [TableMember]
-> Read TableMember
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TableMember]
$creadListPrec :: ReadPrec [TableMember]
readPrec :: ReadPrec TableMember
$creadPrec :: ReadPrec TableMember
readList :: ReadS [TableMember]
$creadList :: ReadS [TableMember]
readsPrec :: Int -> ReadS TableMember
$creadsPrec :: Int -> ReadS TableMember
Prelude.Read, Int -> TableMember -> ShowS
[TableMember] -> ShowS
TableMember -> String
(Int -> TableMember -> ShowS)
-> (TableMember -> String)
-> ([TableMember] -> ShowS)
-> Show TableMember
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TableMember] -> ShowS
$cshowList :: [TableMember] -> ShowS
show :: TableMember -> String
$cshow :: TableMember -> String
showsPrec :: Int -> TableMember -> ShowS
$cshowsPrec :: Int -> TableMember -> ShowS
Prelude.Show, (forall x. TableMember -> Rep TableMember x)
-> (forall x. Rep TableMember x -> TableMember)
-> Generic TableMember
forall x. Rep TableMember x -> TableMember
forall x. TableMember -> Rep TableMember x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TableMember x -> TableMember
$cfrom :: forall x. TableMember -> Rep TableMember x
Prelude.Generic)
newTableMember ::
TableMember
newTableMember :: TableMember
newTableMember =
TableMember' :: Maybe Text -> Maybe Text -> Maybe Text -> TableMember
TableMember'
{ $sel:schema:TableMember' :: Maybe Text
schema = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:TableMember' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':TableMember' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
tableMember_schema :: Lens.Lens' TableMember (Prelude.Maybe Prelude.Text)
tableMember_schema :: (Maybe Text -> f (Maybe Text)) -> TableMember -> f TableMember
tableMember_schema = (TableMember -> Maybe Text)
-> (TableMember -> Maybe Text -> TableMember)
-> Lens TableMember TableMember (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableMember' {Maybe Text
schema :: Maybe Text
$sel:schema:TableMember' :: TableMember -> Maybe Text
schema} -> Maybe Text
schema) (\s :: TableMember
s@TableMember' {} Maybe Text
a -> TableMember
s {$sel:schema:TableMember' :: Maybe Text
schema = Maybe Text
a} :: TableMember)
tableMember_name :: Lens.Lens' TableMember (Prelude.Maybe Prelude.Text)
tableMember_name :: (Maybe Text -> f (Maybe Text)) -> TableMember -> f TableMember
tableMember_name = (TableMember -> Maybe Text)
-> (TableMember -> Maybe Text -> TableMember)
-> Lens TableMember TableMember (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableMember' {Maybe Text
name :: Maybe Text
$sel:name:TableMember' :: TableMember -> Maybe Text
name} -> Maybe Text
name) (\s :: TableMember
s@TableMember' {} Maybe Text
a -> TableMember
s {$sel:name:TableMember' :: Maybe Text
name = Maybe Text
a} :: TableMember)
tableMember_type :: Lens.Lens' TableMember (Prelude.Maybe Prelude.Text)
tableMember_type :: (Maybe Text -> f (Maybe Text)) -> TableMember -> f TableMember
tableMember_type = (TableMember -> Maybe Text)
-> (TableMember -> Maybe Text -> TableMember)
-> Lens TableMember TableMember (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableMember' {Maybe Text
type' :: Maybe Text
$sel:type':TableMember' :: TableMember -> Maybe Text
type'} -> Maybe Text
type') (\s :: TableMember
s@TableMember' {} Maybe Text
a -> TableMember
s {$sel:type':TableMember' :: Maybe Text
type' = Maybe Text
a} :: TableMember)
instance Core.FromJSON TableMember where
parseJSON :: Value -> Parser TableMember
parseJSON =
String
-> (Object -> Parser TableMember) -> Value -> Parser TableMember
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TableMember"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> TableMember
TableMember'
(Maybe Text -> Maybe Text -> Maybe Text -> TableMember)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> TableMember)
forall (f :: * -> *) a b. Functor 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
"schema")
Parser (Maybe Text -> Maybe Text -> TableMember)
-> Parser (Maybe Text) -> Parser (Maybe Text -> TableMember)
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")
Parser (Maybe Text -> TableMember)
-> Parser (Maybe Text) -> Parser TableMember
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
"type")
)
instance Prelude.Hashable TableMember
instance Prelude.NFData TableMember