{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.RedshiftData.ListTables
(
ListTables (..),
newListTables,
listTables_clusterIdentifier,
listTables_connectedDatabase,
listTables_dbUser,
listTables_maxResults,
listTables_nextToken,
listTables_schemaPattern,
listTables_secretArn,
listTables_tablePattern,
listTables_workgroupName,
listTables_database,
ListTablesResponse (..),
newListTablesResponse,
listTablesResponse_nextToken,
listTablesResponse_tables,
listTablesResponse_httpStatus,
)
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.RedshiftData.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListTables = ListTables'
{
ListTables -> Maybe Text
clusterIdentifier :: Prelude.Maybe Prelude.Text,
ListTables -> Maybe Text
connectedDatabase :: Prelude.Maybe Prelude.Text,
ListTables -> Maybe Text
dbUser :: Prelude.Maybe Prelude.Text,
ListTables -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListTables -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTables -> Maybe Text
schemaPattern :: Prelude.Maybe Prelude.Text,
ListTables -> Maybe Text
secretArn :: Prelude.Maybe Prelude.Text,
ListTables -> Maybe Text
tablePattern :: Prelude.Maybe Prelude.Text,
ListTables -> Maybe Text
workgroupName :: Prelude.Maybe Prelude.Text,
ListTables -> Text
database :: Prelude.Text
}
deriving (ListTables -> ListTables -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTables -> ListTables -> Bool
$c/= :: ListTables -> ListTables -> Bool
== :: ListTables -> ListTables -> Bool
$c== :: ListTables -> ListTables -> Bool
Prelude.Eq, ReadPrec [ListTables]
ReadPrec ListTables
Int -> ReadS ListTables
ReadS [ListTables]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTables]
$creadListPrec :: ReadPrec [ListTables]
readPrec :: ReadPrec ListTables
$creadPrec :: ReadPrec ListTables
readList :: ReadS [ListTables]
$creadList :: ReadS [ListTables]
readsPrec :: Int -> ReadS ListTables
$creadsPrec :: Int -> ReadS ListTables
Prelude.Read, Int -> ListTables -> ShowS
[ListTables] -> ShowS
ListTables -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTables] -> ShowS
$cshowList :: [ListTables] -> ShowS
show :: ListTables -> String
$cshow :: ListTables -> String
showsPrec :: Int -> ListTables -> ShowS
$cshowsPrec :: Int -> ListTables -> ShowS
Prelude.Show, forall x. Rep ListTables x -> ListTables
forall x. ListTables -> Rep ListTables x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTables x -> ListTables
$cfrom :: forall x. ListTables -> Rep ListTables x
Prelude.Generic)
newListTables ::
Prelude.Text ->
ListTables
newListTables :: Text -> ListTables
newListTables Text
pDatabase_ =
ListTables'
{ $sel:clusterIdentifier:ListTables' :: Maybe Text
clusterIdentifier = forall a. Maybe a
Prelude.Nothing,
$sel:connectedDatabase:ListTables' :: Maybe Text
connectedDatabase = forall a. Maybe a
Prelude.Nothing,
$sel:dbUser:ListTables' :: Maybe Text
dbUser = forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListTables' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListTables' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:schemaPattern:ListTables' :: Maybe Text
schemaPattern = forall a. Maybe a
Prelude.Nothing,
$sel:secretArn:ListTables' :: Maybe Text
secretArn = forall a. Maybe a
Prelude.Nothing,
$sel:tablePattern:ListTables' :: Maybe Text
tablePattern = forall a. Maybe a
Prelude.Nothing,
$sel:workgroupName:ListTables' :: Maybe Text
workgroupName = forall a. Maybe a
Prelude.Nothing,
$sel:database:ListTables' :: Text
database = Text
pDatabase_
}
listTables_clusterIdentifier :: Lens.Lens' ListTables (Prelude.Maybe Prelude.Text)
listTables_clusterIdentifier :: Lens' ListTables (Maybe Text)
listTables_clusterIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTables' {Maybe Text
clusterIdentifier :: Maybe Text
$sel:clusterIdentifier:ListTables' :: ListTables -> Maybe Text
clusterIdentifier} -> Maybe Text
clusterIdentifier) (\s :: ListTables
s@ListTables' {} Maybe Text
a -> ListTables
s {$sel:clusterIdentifier:ListTables' :: Maybe Text
clusterIdentifier = Maybe Text
a} :: ListTables)
listTables_connectedDatabase :: Lens.Lens' ListTables (Prelude.Maybe Prelude.Text)
listTables_connectedDatabase :: Lens' ListTables (Maybe Text)
listTables_connectedDatabase = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTables' {Maybe Text
connectedDatabase :: Maybe Text
$sel:connectedDatabase:ListTables' :: ListTables -> Maybe Text
connectedDatabase} -> Maybe Text
connectedDatabase) (\s :: ListTables
s@ListTables' {} Maybe Text
a -> ListTables
s {$sel:connectedDatabase:ListTables' :: Maybe Text
connectedDatabase = Maybe Text
a} :: ListTables)
listTables_dbUser :: Lens.Lens' ListTables (Prelude.Maybe Prelude.Text)
listTables_dbUser :: Lens' ListTables (Maybe Text)
listTables_dbUser = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTables' {Maybe Text
dbUser :: Maybe Text
$sel:dbUser:ListTables' :: ListTables -> Maybe Text
dbUser} -> Maybe Text
dbUser) (\s :: ListTables
s@ListTables' {} Maybe Text
a -> ListTables
s {$sel:dbUser:ListTables' :: Maybe Text
dbUser = Maybe Text
a} :: ListTables)
listTables_maxResults :: Lens.Lens' ListTables (Prelude.Maybe Prelude.Natural)
listTables_maxResults :: Lens' ListTables (Maybe Natural)
listTables_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTables' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListTables' :: ListTables -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListTables
s@ListTables' {} Maybe Natural
a -> ListTables
s {$sel:maxResults:ListTables' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListTables)
listTables_nextToken :: Lens.Lens' ListTables (Prelude.Maybe Prelude.Text)
listTables_nextToken :: Lens' ListTables (Maybe Text)
listTables_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTables' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTables' :: ListTables -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTables
s@ListTables' {} Maybe Text
a -> ListTables
s {$sel:nextToken:ListTables' :: Maybe Text
nextToken = Maybe Text
a} :: ListTables)
listTables_schemaPattern :: Lens.Lens' ListTables (Prelude.Maybe Prelude.Text)
listTables_schemaPattern :: Lens' ListTables (Maybe Text)
listTables_schemaPattern = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTables' {Maybe Text
schemaPattern :: Maybe Text
$sel:schemaPattern:ListTables' :: ListTables -> Maybe Text
schemaPattern} -> Maybe Text
schemaPattern) (\s :: ListTables
s@ListTables' {} Maybe Text
a -> ListTables
s {$sel:schemaPattern:ListTables' :: Maybe Text
schemaPattern = Maybe Text
a} :: ListTables)
listTables_secretArn :: Lens.Lens' ListTables (Prelude.Maybe Prelude.Text)
listTables_secretArn :: Lens' ListTables (Maybe Text)
listTables_secretArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTables' {Maybe Text
secretArn :: Maybe Text
$sel:secretArn:ListTables' :: ListTables -> Maybe Text
secretArn} -> Maybe Text
secretArn) (\s :: ListTables
s@ListTables' {} Maybe Text
a -> ListTables
s {$sel:secretArn:ListTables' :: Maybe Text
secretArn = Maybe Text
a} :: ListTables)
listTables_tablePattern :: Lens.Lens' ListTables (Prelude.Maybe Prelude.Text)
listTables_tablePattern :: Lens' ListTables (Maybe Text)
listTables_tablePattern = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTables' {Maybe Text
tablePattern :: Maybe Text
$sel:tablePattern:ListTables' :: ListTables -> Maybe Text
tablePattern} -> Maybe Text
tablePattern) (\s :: ListTables
s@ListTables' {} Maybe Text
a -> ListTables
s {$sel:tablePattern:ListTables' :: Maybe Text
tablePattern = Maybe Text
a} :: ListTables)
listTables_workgroupName :: Lens.Lens' ListTables (Prelude.Maybe Prelude.Text)
listTables_workgroupName :: Lens' ListTables (Maybe Text)
listTables_workgroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTables' {Maybe Text
workgroupName :: Maybe Text
$sel:workgroupName:ListTables' :: ListTables -> Maybe Text
workgroupName} -> Maybe Text
workgroupName) (\s :: ListTables
s@ListTables' {} Maybe Text
a -> ListTables
s {$sel:workgroupName:ListTables' :: Maybe Text
workgroupName = Maybe Text
a} :: ListTables)
listTables_database :: Lens.Lens' ListTables Prelude.Text
listTables_database :: Lens' ListTables Text
listTables_database = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTables' {Text
database :: Text
$sel:database:ListTables' :: ListTables -> Text
database} -> Text
database) (\s :: ListTables
s@ListTables' {} Text
a -> ListTables
s {$sel:database:ListTables' :: Text
database = Text
a} :: ListTables)
instance Core.AWSPager ListTables where
page :: ListTables -> AWSResponse ListTables -> Maybe ListTables
page ListTables
rq AWSResponse ListTables
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTables
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListTablesResponse (Maybe Text)
listTablesResponse_nextToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTables
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListTablesResponse (Maybe [TableMember])
listTablesResponse_tables
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
forall a. a -> Maybe a
Prelude.Just
forall a b. (a -> b) -> a -> b
Prelude.$ ListTables
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListTables (Maybe Text)
listTables_nextToken
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListTables
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListTablesResponse (Maybe Text)
listTablesResponse_nextToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListTables where
type AWSResponse ListTables = ListTablesResponse
request :: (Service -> Service) -> ListTables -> Request ListTables
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListTables
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListTables)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Maybe [TableMember] -> Int -> ListTablesResponse
ListTablesResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Tables" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ListTables where
hashWithSalt :: Int -> ListTables -> Int
hashWithSalt Int
_salt ListTables' {Maybe Natural
Maybe Text
Text
database :: Text
workgroupName :: Maybe Text
tablePattern :: Maybe Text
secretArn :: Maybe Text
schemaPattern :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
dbUser :: Maybe Text
connectedDatabase :: Maybe Text
clusterIdentifier :: Maybe Text
$sel:database:ListTables' :: ListTables -> Text
$sel:workgroupName:ListTables' :: ListTables -> Maybe Text
$sel:tablePattern:ListTables' :: ListTables -> Maybe Text
$sel:secretArn:ListTables' :: ListTables -> Maybe Text
$sel:schemaPattern:ListTables' :: ListTables -> Maybe Text
$sel:nextToken:ListTables' :: ListTables -> Maybe Text
$sel:maxResults:ListTables' :: ListTables -> Maybe Natural
$sel:dbUser:ListTables' :: ListTables -> Maybe Text
$sel:connectedDatabase:ListTables' :: ListTables -> Maybe Text
$sel:clusterIdentifier:ListTables' :: ListTables -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clusterIdentifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
connectedDatabase
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbUser
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
schemaPattern
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
secretArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tablePattern
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
workgroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
database
instance Prelude.NFData ListTables where
rnf :: ListTables -> ()
rnf ListTables' {Maybe Natural
Maybe Text
Text
database :: Text
workgroupName :: Maybe Text
tablePattern :: Maybe Text
secretArn :: Maybe Text
schemaPattern :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
dbUser :: Maybe Text
connectedDatabase :: Maybe Text
clusterIdentifier :: Maybe Text
$sel:database:ListTables' :: ListTables -> Text
$sel:workgroupName:ListTables' :: ListTables -> Maybe Text
$sel:tablePattern:ListTables' :: ListTables -> Maybe Text
$sel:secretArn:ListTables' :: ListTables -> Maybe Text
$sel:schemaPattern:ListTables' :: ListTables -> Maybe Text
$sel:nextToken:ListTables' :: ListTables -> Maybe Text
$sel:maxResults:ListTables' :: ListTables -> Maybe Natural
$sel:dbUser:ListTables' :: ListTables -> Maybe Text
$sel:connectedDatabase:ListTables' :: ListTables -> Maybe Text
$sel:clusterIdentifier:ListTables' :: ListTables -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterIdentifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
connectedDatabase
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbUser
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
schemaPattern
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
secretArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
tablePattern
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
workgroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
database
instance Data.ToHeaders ListTables where
toHeaders :: ListTables -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# (ByteString
"RedshiftData.ListTables" :: Prelude.ByteString),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON ListTables where
toJSON :: ListTables -> Value
toJSON ListTables' {Maybe Natural
Maybe Text
Text
database :: Text
workgroupName :: Maybe Text
tablePattern :: Maybe Text
secretArn :: Maybe Text
schemaPattern :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
dbUser :: Maybe Text
connectedDatabase :: Maybe Text
clusterIdentifier :: Maybe Text
$sel:database:ListTables' :: ListTables -> Text
$sel:workgroupName:ListTables' :: ListTables -> Maybe Text
$sel:tablePattern:ListTables' :: ListTables -> Maybe Text
$sel:secretArn:ListTables' :: ListTables -> Maybe Text
$sel:schemaPattern:ListTables' :: ListTables -> Maybe Text
$sel:nextToken:ListTables' :: ListTables -> Maybe Text
$sel:maxResults:ListTables' :: ListTables -> Maybe Natural
$sel:dbUser:ListTables' :: ListTables -> Maybe Text
$sel:connectedDatabase:ListTables' :: ListTables -> Maybe Text
$sel:clusterIdentifier:ListTables' :: ListTables -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ClusterIdentifier" 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 Text
clusterIdentifier,
(Key
"ConnectedDatabase" 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 Text
connectedDatabase,
(Key
"DbUser" 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 Text
dbUser,
(Key
"MaxResults" 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 Natural
maxResults,
(Key
"NextToken" 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 Text
nextToken,
(Key
"SchemaPattern" 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 Text
schemaPattern,
(Key
"SecretArn" 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 Text
secretArn,
(Key
"TablePattern" 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 Text
tablePattern,
(Key
"WorkgroupName" 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 Text
workgroupName,
forall a. a -> Maybe a
Prelude.Just (Key
"Database" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
database)
]
)
instance Data.ToPath ListTables where
toPath :: ListTables -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ListTables where
toQuery :: ListTables -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ListTablesResponse = ListTablesResponse'
{
ListTablesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTablesResponse -> Maybe [TableMember]
tables :: Prelude.Maybe [TableMember],
ListTablesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListTablesResponse -> ListTablesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTablesResponse -> ListTablesResponse -> Bool
$c/= :: ListTablesResponse -> ListTablesResponse -> Bool
== :: ListTablesResponse -> ListTablesResponse -> Bool
$c== :: ListTablesResponse -> ListTablesResponse -> Bool
Prelude.Eq, ReadPrec [ListTablesResponse]
ReadPrec ListTablesResponse
Int -> ReadS ListTablesResponse
ReadS [ListTablesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTablesResponse]
$creadListPrec :: ReadPrec [ListTablesResponse]
readPrec :: ReadPrec ListTablesResponse
$creadPrec :: ReadPrec ListTablesResponse
readList :: ReadS [ListTablesResponse]
$creadList :: ReadS [ListTablesResponse]
readsPrec :: Int -> ReadS ListTablesResponse
$creadsPrec :: Int -> ReadS ListTablesResponse
Prelude.Read, Int -> ListTablesResponse -> ShowS
[ListTablesResponse] -> ShowS
ListTablesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTablesResponse] -> ShowS
$cshowList :: [ListTablesResponse] -> ShowS
show :: ListTablesResponse -> String
$cshow :: ListTablesResponse -> String
showsPrec :: Int -> ListTablesResponse -> ShowS
$cshowsPrec :: Int -> ListTablesResponse -> ShowS
Prelude.Show, forall x. Rep ListTablesResponse x -> ListTablesResponse
forall x. ListTablesResponse -> Rep ListTablesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTablesResponse x -> ListTablesResponse
$cfrom :: forall x. ListTablesResponse -> Rep ListTablesResponse x
Prelude.Generic)
newListTablesResponse ::
Prelude.Int ->
ListTablesResponse
newListTablesResponse :: Int -> ListTablesResponse
newListTablesResponse Int
pHttpStatus_ =
ListTablesResponse'
{ $sel:nextToken:ListTablesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:tables:ListTablesResponse' :: Maybe [TableMember]
tables = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListTablesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listTablesResponse_nextToken :: Lens.Lens' ListTablesResponse (Prelude.Maybe Prelude.Text)
listTablesResponse_nextToken :: Lens' ListTablesResponse (Maybe Text)
listTablesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTablesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTablesResponse' :: ListTablesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTablesResponse
s@ListTablesResponse' {} Maybe Text
a -> ListTablesResponse
s {$sel:nextToken:ListTablesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListTablesResponse)
listTablesResponse_tables :: Lens.Lens' ListTablesResponse (Prelude.Maybe [TableMember])
listTablesResponse_tables :: Lens' ListTablesResponse (Maybe [TableMember])
listTablesResponse_tables = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTablesResponse' {Maybe [TableMember]
tables :: Maybe [TableMember]
$sel:tables:ListTablesResponse' :: ListTablesResponse -> Maybe [TableMember]
tables} -> Maybe [TableMember]
tables) (\s :: ListTablesResponse
s@ListTablesResponse' {} Maybe [TableMember]
a -> ListTablesResponse
s {$sel:tables:ListTablesResponse' :: Maybe [TableMember]
tables = Maybe [TableMember]
a} :: ListTablesResponse) 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
listTablesResponse_httpStatus :: Lens.Lens' ListTablesResponse Prelude.Int
listTablesResponse_httpStatus :: Lens' ListTablesResponse Int
listTablesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTablesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListTablesResponse' :: ListTablesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListTablesResponse
s@ListTablesResponse' {} Int
a -> ListTablesResponse
s {$sel:httpStatus:ListTablesResponse' :: Int
httpStatus = Int
a} :: ListTablesResponse)
instance Prelude.NFData ListTablesResponse where
rnf :: ListTablesResponse -> ()
rnf ListTablesResponse' {Int
Maybe [TableMember]
Maybe Text
httpStatus :: Int
tables :: Maybe [TableMember]
nextToken :: Maybe Text
$sel:httpStatus:ListTablesResponse' :: ListTablesResponse -> Int
$sel:tables:ListTablesResponse' :: ListTablesResponse -> Maybe [TableMember]
$sel:nextToken:ListTablesResponse' :: ListTablesResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [TableMember]
tables
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus