{-# 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.DMS.Types.TableToReload where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TableToReload = TableToReload'
{
TableToReload -> Text
schemaName :: Prelude.Text,
TableToReload -> Text
tableName :: Prelude.Text
}
deriving (TableToReload -> TableToReload -> Bool
(TableToReload -> TableToReload -> Bool)
-> (TableToReload -> TableToReload -> Bool) -> Eq TableToReload
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TableToReload -> TableToReload -> Bool
$c/= :: TableToReload -> TableToReload -> Bool
== :: TableToReload -> TableToReload -> Bool
$c== :: TableToReload -> TableToReload -> Bool
Prelude.Eq, ReadPrec [TableToReload]
ReadPrec TableToReload
Int -> ReadS TableToReload
ReadS [TableToReload]
(Int -> ReadS TableToReload)
-> ReadS [TableToReload]
-> ReadPrec TableToReload
-> ReadPrec [TableToReload]
-> Read TableToReload
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TableToReload]
$creadListPrec :: ReadPrec [TableToReload]
readPrec :: ReadPrec TableToReload
$creadPrec :: ReadPrec TableToReload
readList :: ReadS [TableToReload]
$creadList :: ReadS [TableToReload]
readsPrec :: Int -> ReadS TableToReload
$creadsPrec :: Int -> ReadS TableToReload
Prelude.Read, Int -> TableToReload -> ShowS
[TableToReload] -> ShowS
TableToReload -> String
(Int -> TableToReload -> ShowS)
-> (TableToReload -> String)
-> ([TableToReload] -> ShowS)
-> Show TableToReload
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TableToReload] -> ShowS
$cshowList :: [TableToReload] -> ShowS
show :: TableToReload -> String
$cshow :: TableToReload -> String
showsPrec :: Int -> TableToReload -> ShowS
$cshowsPrec :: Int -> TableToReload -> ShowS
Prelude.Show, (forall x. TableToReload -> Rep TableToReload x)
-> (forall x. Rep TableToReload x -> TableToReload)
-> Generic TableToReload
forall x. Rep TableToReload x -> TableToReload
forall x. TableToReload -> Rep TableToReload x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TableToReload x -> TableToReload
$cfrom :: forall x. TableToReload -> Rep TableToReload x
Prelude.Generic)
newTableToReload ::
Prelude.Text ->
Prelude.Text ->
TableToReload
newTableToReload :: Text -> Text -> TableToReload
newTableToReload Text
pSchemaName_ Text
pTableName_ =
TableToReload' :: Text -> Text -> TableToReload
TableToReload'
{ $sel:schemaName:TableToReload' :: Text
schemaName = Text
pSchemaName_,
$sel:tableName:TableToReload' :: Text
tableName = Text
pTableName_
}
tableToReload_schemaName :: Lens.Lens' TableToReload Prelude.Text
tableToReload_schemaName :: (Text -> f Text) -> TableToReload -> f TableToReload
tableToReload_schemaName = (TableToReload -> Text)
-> (TableToReload -> Text -> TableToReload)
-> Lens TableToReload TableToReload Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableToReload' {Text
schemaName :: Text
$sel:schemaName:TableToReload' :: TableToReload -> Text
schemaName} -> Text
schemaName) (\s :: TableToReload
s@TableToReload' {} Text
a -> TableToReload
s {$sel:schemaName:TableToReload' :: Text
schemaName = Text
a} :: TableToReload)
tableToReload_tableName :: Lens.Lens' TableToReload Prelude.Text
tableToReload_tableName :: (Text -> f Text) -> TableToReload -> f TableToReload
tableToReload_tableName = (TableToReload -> Text)
-> (TableToReload -> Text -> TableToReload)
-> Lens TableToReload TableToReload Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableToReload' {Text
tableName :: Text
$sel:tableName:TableToReload' :: TableToReload -> Text
tableName} -> Text
tableName) (\s :: TableToReload
s@TableToReload' {} Text
a -> TableToReload
s {$sel:tableName:TableToReload' :: Text
tableName = Text
a} :: TableToReload)
instance Prelude.Hashable TableToReload
instance Prelude.NFData TableToReload
instance Core.ToJSON TableToReload where
toJSON :: TableToReload -> Value
toJSON TableToReload' {Text
tableName :: Text
schemaName :: Text
$sel:tableName:TableToReload' :: TableToReload -> Text
$sel:schemaName:TableToReload' :: TableToReload -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SchemaName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
schemaName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TableName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
tableName)
]
)