{-# 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.ListDatabases
(
ListDatabases (..),
newListDatabases,
listDatabases_dbUser,
listDatabases_nextToken,
listDatabases_secretArn,
listDatabases_maxResults,
listDatabases_clusterIdentifier,
listDatabases_database,
ListDatabasesResponse (..),
newListDatabasesResponse,
listDatabasesResponse_nextToken,
listDatabasesResponse_databases,
listDatabasesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RedshiftData.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListDatabases = ListDatabases'
{
ListDatabases -> Maybe Text
dbUser :: Prelude.Maybe Prelude.Text,
ListDatabases -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListDatabases -> Maybe Text
secretArn :: Prelude.Maybe Prelude.Text,
ListDatabases -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListDatabases -> Text
clusterIdentifier :: Prelude.Text,
ListDatabases -> Text
database :: Prelude.Text
}
deriving (ListDatabases -> ListDatabases -> Bool
(ListDatabases -> ListDatabases -> Bool)
-> (ListDatabases -> ListDatabases -> Bool) -> Eq ListDatabases
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDatabases -> ListDatabases -> Bool
$c/= :: ListDatabases -> ListDatabases -> Bool
== :: ListDatabases -> ListDatabases -> Bool
$c== :: ListDatabases -> ListDatabases -> Bool
Prelude.Eq, ReadPrec [ListDatabases]
ReadPrec ListDatabases
Int -> ReadS ListDatabases
ReadS [ListDatabases]
(Int -> ReadS ListDatabases)
-> ReadS [ListDatabases]
-> ReadPrec ListDatabases
-> ReadPrec [ListDatabases]
-> Read ListDatabases
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDatabases]
$creadListPrec :: ReadPrec [ListDatabases]
readPrec :: ReadPrec ListDatabases
$creadPrec :: ReadPrec ListDatabases
readList :: ReadS [ListDatabases]
$creadList :: ReadS [ListDatabases]
readsPrec :: Int -> ReadS ListDatabases
$creadsPrec :: Int -> ReadS ListDatabases
Prelude.Read, Int -> ListDatabases -> ShowS
[ListDatabases] -> ShowS
ListDatabases -> String
(Int -> ListDatabases -> ShowS)
-> (ListDatabases -> String)
-> ([ListDatabases] -> ShowS)
-> Show ListDatabases
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDatabases] -> ShowS
$cshowList :: [ListDatabases] -> ShowS
show :: ListDatabases -> String
$cshow :: ListDatabases -> String
showsPrec :: Int -> ListDatabases -> ShowS
$cshowsPrec :: Int -> ListDatabases -> ShowS
Prelude.Show, (forall x. ListDatabases -> Rep ListDatabases x)
-> (forall x. Rep ListDatabases x -> ListDatabases)
-> Generic ListDatabases
forall x. Rep ListDatabases x -> ListDatabases
forall x. ListDatabases -> Rep ListDatabases x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDatabases x -> ListDatabases
$cfrom :: forall x. ListDatabases -> Rep ListDatabases x
Prelude.Generic)
newListDatabases ::
Prelude.Text ->
Prelude.Text ->
ListDatabases
newListDatabases :: Text -> Text -> ListDatabases
newListDatabases Text
pClusterIdentifier_ Text
pDatabase_ =
ListDatabases' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Text
-> Text
-> ListDatabases
ListDatabases'
{ $sel:dbUser:ListDatabases' :: Maybe Text
dbUser = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListDatabases' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:secretArn:ListDatabases' :: Maybe Text
secretArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListDatabases' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:clusterIdentifier:ListDatabases' :: Text
clusterIdentifier = Text
pClusterIdentifier_,
$sel:database:ListDatabases' :: Text
database = Text
pDatabase_
}
listDatabases_dbUser :: Lens.Lens' ListDatabases (Prelude.Maybe Prelude.Text)
listDatabases_dbUser :: (Maybe Text -> f (Maybe Text)) -> ListDatabases -> f ListDatabases
listDatabases_dbUser = (ListDatabases -> Maybe Text)
-> (ListDatabases -> Maybe Text -> ListDatabases)
-> Lens ListDatabases ListDatabases (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatabases' {Maybe Text
dbUser :: Maybe Text
$sel:dbUser:ListDatabases' :: ListDatabases -> Maybe Text
dbUser} -> Maybe Text
dbUser) (\s :: ListDatabases
s@ListDatabases' {} Maybe Text
a -> ListDatabases
s {$sel:dbUser:ListDatabases' :: Maybe Text
dbUser = Maybe Text
a} :: ListDatabases)
listDatabases_nextToken :: Lens.Lens' ListDatabases (Prelude.Maybe Prelude.Text)
listDatabases_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListDatabases -> f ListDatabases
listDatabases_nextToken = (ListDatabases -> Maybe Text)
-> (ListDatabases -> Maybe Text -> ListDatabases)
-> Lens ListDatabases ListDatabases (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatabases' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDatabases' :: ListDatabases -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDatabases
s@ListDatabases' {} Maybe Text
a -> ListDatabases
s {$sel:nextToken:ListDatabases' :: Maybe Text
nextToken = Maybe Text
a} :: ListDatabases)
listDatabases_secretArn :: Lens.Lens' ListDatabases (Prelude.Maybe Prelude.Text)
listDatabases_secretArn :: (Maybe Text -> f (Maybe Text)) -> ListDatabases -> f ListDatabases
listDatabases_secretArn = (ListDatabases -> Maybe Text)
-> (ListDatabases -> Maybe Text -> ListDatabases)
-> Lens ListDatabases ListDatabases (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatabases' {Maybe Text
secretArn :: Maybe Text
$sel:secretArn:ListDatabases' :: ListDatabases -> Maybe Text
secretArn} -> Maybe Text
secretArn) (\s :: ListDatabases
s@ListDatabases' {} Maybe Text
a -> ListDatabases
s {$sel:secretArn:ListDatabases' :: Maybe Text
secretArn = Maybe Text
a} :: ListDatabases)
listDatabases_maxResults :: Lens.Lens' ListDatabases (Prelude.Maybe Prelude.Natural)
listDatabases_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListDatabases -> f ListDatabases
listDatabases_maxResults = (ListDatabases -> Maybe Natural)
-> (ListDatabases -> Maybe Natural -> ListDatabases)
-> Lens ListDatabases ListDatabases (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatabases' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListDatabases' :: ListDatabases -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListDatabases
s@ListDatabases' {} Maybe Natural
a -> ListDatabases
s {$sel:maxResults:ListDatabases' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListDatabases)
listDatabases_clusterIdentifier :: Lens.Lens' ListDatabases Prelude.Text
listDatabases_clusterIdentifier :: (Text -> f Text) -> ListDatabases -> f ListDatabases
listDatabases_clusterIdentifier = (ListDatabases -> Text)
-> (ListDatabases -> Text -> ListDatabases)
-> Lens ListDatabases ListDatabases Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatabases' {Text
clusterIdentifier :: Text
$sel:clusterIdentifier:ListDatabases' :: ListDatabases -> Text
clusterIdentifier} -> Text
clusterIdentifier) (\s :: ListDatabases
s@ListDatabases' {} Text
a -> ListDatabases
s {$sel:clusterIdentifier:ListDatabases' :: Text
clusterIdentifier = Text
a} :: ListDatabases)
listDatabases_database :: Lens.Lens' ListDatabases Prelude.Text
listDatabases_database :: (Text -> f Text) -> ListDatabases -> f ListDatabases
listDatabases_database = (ListDatabases -> Text)
-> (ListDatabases -> Text -> ListDatabases)
-> Lens ListDatabases ListDatabases Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatabases' {Text
database :: Text
$sel:database:ListDatabases' :: ListDatabases -> Text
database} -> Text
database) (\s :: ListDatabases
s@ListDatabases' {} Text
a -> ListDatabases
s {$sel:database:ListDatabases' :: Text
database = Text
a} :: ListDatabases)
instance Core.AWSPager ListDatabases where
page :: ListDatabases -> AWSResponse ListDatabases -> Maybe ListDatabases
page ListDatabases
rq AWSResponse ListDatabases
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListDatabases
ListDatabasesResponse
rs
ListDatabasesResponse
-> Getting (First Text) ListDatabasesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDatabasesResponse
-> Const (First Text) ListDatabasesResponse
Lens' ListDatabasesResponse (Maybe Text)
listDatabasesResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListDatabasesResponse
-> Const (First Text) ListDatabasesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDatabasesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListDatabases
forall a. Maybe a
Prelude.Nothing
| Maybe [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListDatabases
ListDatabasesResponse
rs
ListDatabasesResponse
-> Getting (First [Text]) ListDatabasesResponse [Text]
-> Maybe [Text]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> ListDatabasesResponse
-> Const (First [Text]) ListDatabasesResponse
Lens' ListDatabasesResponse (Maybe [Text])
listDatabasesResponse_databases ((Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> ListDatabasesResponse
-> Const (First [Text]) ListDatabasesResponse)
-> (([Text] -> Const (First [Text]) [Text])
-> Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> Getting (First [Text]) ListDatabasesResponse [Text]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> Const (First [Text]) [Text])
-> Maybe [Text] -> Const (First [Text]) (Maybe [Text])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListDatabases
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListDatabases -> Maybe ListDatabases
forall a. a -> Maybe a
Prelude.Just (ListDatabases -> Maybe ListDatabases)
-> ListDatabases -> Maybe ListDatabases
forall a b. (a -> b) -> a -> b
Prelude.$
ListDatabases
rq
ListDatabases -> (ListDatabases -> ListDatabases) -> ListDatabases
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListDatabases -> Identity ListDatabases
Lens ListDatabases ListDatabases (Maybe Text) (Maybe Text)
listDatabases_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListDatabases -> Identity ListDatabases)
-> Maybe Text -> ListDatabases -> ListDatabases
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDatabases
ListDatabasesResponse
rs
ListDatabasesResponse
-> Getting (First Text) ListDatabasesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDatabasesResponse
-> Const (First Text) ListDatabasesResponse
Lens' ListDatabasesResponse (Maybe Text)
listDatabasesResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListDatabasesResponse
-> Const (First Text) ListDatabasesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDatabasesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListDatabases where
type
AWSResponse ListDatabases =
ListDatabasesResponse
request :: ListDatabases -> Request ListDatabases
request = Service -> ListDatabases -> Request ListDatabases
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListDatabases
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListDatabases)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListDatabases))
-> Logger
-> Service
-> Proxy ListDatabases
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListDatabases)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Maybe [Text] -> Int -> ListDatabasesResponse
ListDatabasesResponse'
(Maybe Text -> Maybe [Text] -> Int -> ListDatabasesResponse)
-> Either String (Maybe Text)
-> Either String (Maybe [Text] -> Int -> ListDatabasesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
Either String (Maybe [Text] -> Int -> ListDatabasesResponse)
-> Either String (Maybe [Text])
-> Either String (Int -> ListDatabasesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Databases" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> ListDatabasesResponse)
-> Either String Int -> Either String ListDatabasesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ListDatabases
instance Prelude.NFData ListDatabases
instance Core.ToHeaders ListDatabases where
toHeaders :: ListDatabases -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListDatabases -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"RedshiftData.ListDatabases" :: Prelude.ByteString),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON ListDatabases where
toJSON :: ListDatabases -> Value
toJSON ListDatabases' {Maybe Natural
Maybe Text
Text
database :: Text
clusterIdentifier :: Text
maxResults :: Maybe Natural
secretArn :: Maybe Text
nextToken :: Maybe Text
dbUser :: Maybe Text
$sel:database:ListDatabases' :: ListDatabases -> Text
$sel:clusterIdentifier:ListDatabases' :: ListDatabases -> Text
$sel:maxResults:ListDatabases' :: ListDatabases -> Maybe Natural
$sel:secretArn:ListDatabases' :: ListDatabases -> Maybe Text
$sel:nextToken:ListDatabases' :: ListDatabases -> Maybe Text
$sel:dbUser:ListDatabases' :: ListDatabases -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DbUser" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
dbUser,
(Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Text
"SecretArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
secretArn,
(Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ClusterIdentifier" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clusterIdentifier),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Database" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
database)
]
)
instance Core.ToPath ListDatabases where
toPath :: ListDatabases -> ByteString
toPath = ByteString -> ListDatabases -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListDatabases where
toQuery :: ListDatabases -> QueryString
toQuery = QueryString -> ListDatabases -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListDatabasesResponse = ListDatabasesResponse'
{
ListDatabasesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListDatabasesResponse -> Maybe [Text]
databases :: Prelude.Maybe [Prelude.Text],
ListDatabasesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListDatabasesResponse -> ListDatabasesResponse -> Bool
(ListDatabasesResponse -> ListDatabasesResponse -> Bool)
-> (ListDatabasesResponse -> ListDatabasesResponse -> Bool)
-> Eq ListDatabasesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDatabasesResponse -> ListDatabasesResponse -> Bool
$c/= :: ListDatabasesResponse -> ListDatabasesResponse -> Bool
== :: ListDatabasesResponse -> ListDatabasesResponse -> Bool
$c== :: ListDatabasesResponse -> ListDatabasesResponse -> Bool
Prelude.Eq, ReadPrec [ListDatabasesResponse]
ReadPrec ListDatabasesResponse
Int -> ReadS ListDatabasesResponse
ReadS [ListDatabasesResponse]
(Int -> ReadS ListDatabasesResponse)
-> ReadS [ListDatabasesResponse]
-> ReadPrec ListDatabasesResponse
-> ReadPrec [ListDatabasesResponse]
-> Read ListDatabasesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDatabasesResponse]
$creadListPrec :: ReadPrec [ListDatabasesResponse]
readPrec :: ReadPrec ListDatabasesResponse
$creadPrec :: ReadPrec ListDatabasesResponse
readList :: ReadS [ListDatabasesResponse]
$creadList :: ReadS [ListDatabasesResponse]
readsPrec :: Int -> ReadS ListDatabasesResponse
$creadsPrec :: Int -> ReadS ListDatabasesResponse
Prelude.Read, Int -> ListDatabasesResponse -> ShowS
[ListDatabasesResponse] -> ShowS
ListDatabasesResponse -> String
(Int -> ListDatabasesResponse -> ShowS)
-> (ListDatabasesResponse -> String)
-> ([ListDatabasesResponse] -> ShowS)
-> Show ListDatabasesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDatabasesResponse] -> ShowS
$cshowList :: [ListDatabasesResponse] -> ShowS
show :: ListDatabasesResponse -> String
$cshow :: ListDatabasesResponse -> String
showsPrec :: Int -> ListDatabasesResponse -> ShowS
$cshowsPrec :: Int -> ListDatabasesResponse -> ShowS
Prelude.Show, (forall x. ListDatabasesResponse -> Rep ListDatabasesResponse x)
-> (forall x. Rep ListDatabasesResponse x -> ListDatabasesResponse)
-> Generic ListDatabasesResponse
forall x. Rep ListDatabasesResponse x -> ListDatabasesResponse
forall x. ListDatabasesResponse -> Rep ListDatabasesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDatabasesResponse x -> ListDatabasesResponse
$cfrom :: forall x. ListDatabasesResponse -> Rep ListDatabasesResponse x
Prelude.Generic)
newListDatabasesResponse ::
Prelude.Int ->
ListDatabasesResponse
newListDatabasesResponse :: Int -> ListDatabasesResponse
newListDatabasesResponse Int
pHttpStatus_ =
ListDatabasesResponse' :: Maybe Text -> Maybe [Text] -> Int -> ListDatabasesResponse
ListDatabasesResponse'
{ $sel:nextToken:ListDatabasesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:databases:ListDatabasesResponse' :: Maybe [Text]
databases = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListDatabasesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listDatabasesResponse_nextToken :: Lens.Lens' ListDatabasesResponse (Prelude.Maybe Prelude.Text)
listDatabasesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDatabasesResponse -> f ListDatabasesResponse
listDatabasesResponse_nextToken = (ListDatabasesResponse -> Maybe Text)
-> (ListDatabasesResponse -> Maybe Text -> ListDatabasesResponse)
-> Lens' ListDatabasesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatabasesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDatabasesResponse' :: ListDatabasesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDatabasesResponse
s@ListDatabasesResponse' {} Maybe Text
a -> ListDatabasesResponse
s {$sel:nextToken:ListDatabasesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDatabasesResponse)
listDatabasesResponse_databases :: Lens.Lens' ListDatabasesResponse (Prelude.Maybe [Prelude.Text])
listDatabasesResponse_databases :: (Maybe [Text] -> f (Maybe [Text]))
-> ListDatabasesResponse -> f ListDatabasesResponse
listDatabasesResponse_databases = (ListDatabasesResponse -> Maybe [Text])
-> (ListDatabasesResponse -> Maybe [Text] -> ListDatabasesResponse)
-> Lens' ListDatabasesResponse (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatabasesResponse' {Maybe [Text]
databases :: Maybe [Text]
$sel:databases:ListDatabasesResponse' :: ListDatabasesResponse -> Maybe [Text]
databases} -> Maybe [Text]
databases) (\s :: ListDatabasesResponse
s@ListDatabasesResponse' {} Maybe [Text]
a -> ListDatabasesResponse
s {$sel:databases:ListDatabasesResponse' :: Maybe [Text]
databases = Maybe [Text]
a} :: ListDatabasesResponse) ((Maybe [Text] -> f (Maybe [Text]))
-> ListDatabasesResponse -> f ListDatabasesResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListDatabasesResponse
-> f ListDatabasesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listDatabasesResponse_httpStatus :: Lens.Lens' ListDatabasesResponse Prelude.Int
listDatabasesResponse_httpStatus :: (Int -> f Int) -> ListDatabasesResponse -> f ListDatabasesResponse
listDatabasesResponse_httpStatus = (ListDatabasesResponse -> Int)
-> (ListDatabasesResponse -> Int -> ListDatabasesResponse)
-> Lens ListDatabasesResponse ListDatabasesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatabasesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListDatabasesResponse' :: ListDatabasesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListDatabasesResponse
s@ListDatabasesResponse' {} Int
a -> ListDatabasesResponse
s {$sel:httpStatus:ListDatabasesResponse' :: Int
httpStatus = Int
a} :: ListDatabasesResponse)
instance Prelude.NFData ListDatabasesResponse