{-# 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.Glue.GetDatabases
(
GetDatabases (..),
newGetDatabases,
getDatabases_resourceShareType,
getDatabases_catalogId,
getDatabases_nextToken,
getDatabases_maxResults,
GetDatabasesResponse (..),
newGetDatabasesResponse,
getDatabasesResponse_nextToken,
getDatabasesResponse_httpStatus,
getDatabasesResponse_databaseList,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Glue.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetDatabases = GetDatabases'
{
GetDatabases -> Maybe ResourceShareType
resourceShareType :: Prelude.Maybe ResourceShareType,
GetDatabases -> Maybe Text
catalogId :: Prelude.Maybe Prelude.Text,
GetDatabases -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetDatabases -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (GetDatabases -> GetDatabases -> Bool
(GetDatabases -> GetDatabases -> Bool)
-> (GetDatabases -> GetDatabases -> Bool) -> Eq GetDatabases
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDatabases -> GetDatabases -> Bool
$c/= :: GetDatabases -> GetDatabases -> Bool
== :: GetDatabases -> GetDatabases -> Bool
$c== :: GetDatabases -> GetDatabases -> Bool
Prelude.Eq, ReadPrec [GetDatabases]
ReadPrec GetDatabases
Int -> ReadS GetDatabases
ReadS [GetDatabases]
(Int -> ReadS GetDatabases)
-> ReadS [GetDatabases]
-> ReadPrec GetDatabases
-> ReadPrec [GetDatabases]
-> Read GetDatabases
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDatabases]
$creadListPrec :: ReadPrec [GetDatabases]
readPrec :: ReadPrec GetDatabases
$creadPrec :: ReadPrec GetDatabases
readList :: ReadS [GetDatabases]
$creadList :: ReadS [GetDatabases]
readsPrec :: Int -> ReadS GetDatabases
$creadsPrec :: Int -> ReadS GetDatabases
Prelude.Read, Int -> GetDatabases -> ShowS
[GetDatabases] -> ShowS
GetDatabases -> String
(Int -> GetDatabases -> ShowS)
-> (GetDatabases -> String)
-> ([GetDatabases] -> ShowS)
-> Show GetDatabases
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDatabases] -> ShowS
$cshowList :: [GetDatabases] -> ShowS
show :: GetDatabases -> String
$cshow :: GetDatabases -> String
showsPrec :: Int -> GetDatabases -> ShowS
$cshowsPrec :: Int -> GetDatabases -> ShowS
Prelude.Show, (forall x. GetDatabases -> Rep GetDatabases x)
-> (forall x. Rep GetDatabases x -> GetDatabases)
-> Generic GetDatabases
forall x. Rep GetDatabases x -> GetDatabases
forall x. GetDatabases -> Rep GetDatabases x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDatabases x -> GetDatabases
$cfrom :: forall x. GetDatabases -> Rep GetDatabases x
Prelude.Generic)
newGetDatabases ::
GetDatabases
newGetDatabases :: GetDatabases
newGetDatabases =
GetDatabases' :: Maybe ResourceShareType
-> Maybe Text -> Maybe Text -> Maybe Natural -> GetDatabases
GetDatabases'
{ $sel:resourceShareType:GetDatabases' :: Maybe ResourceShareType
resourceShareType = Maybe ResourceShareType
forall a. Maybe a
Prelude.Nothing,
$sel:catalogId:GetDatabases' :: Maybe Text
catalogId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetDatabases' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetDatabases' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
getDatabases_resourceShareType :: Lens.Lens' GetDatabases (Prelude.Maybe ResourceShareType)
getDatabases_resourceShareType :: (Maybe ResourceShareType -> f (Maybe ResourceShareType))
-> GetDatabases -> f GetDatabases
getDatabases_resourceShareType = (GetDatabases -> Maybe ResourceShareType)
-> (GetDatabases -> Maybe ResourceShareType -> GetDatabases)
-> Lens
GetDatabases
GetDatabases
(Maybe ResourceShareType)
(Maybe ResourceShareType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDatabases' {Maybe ResourceShareType
resourceShareType :: Maybe ResourceShareType
$sel:resourceShareType:GetDatabases' :: GetDatabases -> Maybe ResourceShareType
resourceShareType} -> Maybe ResourceShareType
resourceShareType) (\s :: GetDatabases
s@GetDatabases' {} Maybe ResourceShareType
a -> GetDatabases
s {$sel:resourceShareType:GetDatabases' :: Maybe ResourceShareType
resourceShareType = Maybe ResourceShareType
a} :: GetDatabases)
getDatabases_catalogId :: Lens.Lens' GetDatabases (Prelude.Maybe Prelude.Text)
getDatabases_catalogId :: (Maybe Text -> f (Maybe Text)) -> GetDatabases -> f GetDatabases
getDatabases_catalogId = (GetDatabases -> Maybe Text)
-> (GetDatabases -> Maybe Text -> GetDatabases)
-> Lens GetDatabases GetDatabases (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDatabases' {Maybe Text
catalogId :: Maybe Text
$sel:catalogId:GetDatabases' :: GetDatabases -> Maybe Text
catalogId} -> Maybe Text
catalogId) (\s :: GetDatabases
s@GetDatabases' {} Maybe Text
a -> GetDatabases
s {$sel:catalogId:GetDatabases' :: Maybe Text
catalogId = Maybe Text
a} :: GetDatabases)
getDatabases_nextToken :: Lens.Lens' GetDatabases (Prelude.Maybe Prelude.Text)
getDatabases_nextToken :: (Maybe Text -> f (Maybe Text)) -> GetDatabases -> f GetDatabases
getDatabases_nextToken = (GetDatabases -> Maybe Text)
-> (GetDatabases -> Maybe Text -> GetDatabases)
-> Lens GetDatabases GetDatabases (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDatabases' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetDatabases' :: GetDatabases -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetDatabases
s@GetDatabases' {} Maybe Text
a -> GetDatabases
s {$sel:nextToken:GetDatabases' :: Maybe Text
nextToken = Maybe Text
a} :: GetDatabases)
getDatabases_maxResults :: Lens.Lens' GetDatabases (Prelude.Maybe Prelude.Natural)
getDatabases_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetDatabases -> f GetDatabases
getDatabases_maxResults = (GetDatabases -> Maybe Natural)
-> (GetDatabases -> Maybe Natural -> GetDatabases)
-> Lens GetDatabases GetDatabases (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDatabases' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetDatabases' :: GetDatabases -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetDatabases
s@GetDatabases' {} Maybe Natural
a -> GetDatabases
s {$sel:maxResults:GetDatabases' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetDatabases)
instance Core.AWSPager GetDatabases where
page :: GetDatabases -> AWSResponse GetDatabases -> Maybe GetDatabases
page GetDatabases
rq AWSResponse GetDatabases
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetDatabases
GetDatabasesResponse
rs
GetDatabasesResponse
-> Getting (First Text) GetDatabasesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetDatabasesResponse -> Const (First Text) GetDatabasesResponse
Lens' GetDatabasesResponse (Maybe Text)
getDatabasesResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> GetDatabasesResponse -> Const (First Text) GetDatabasesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetDatabasesResponse 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 GetDatabases
forall a. Maybe a
Prelude.Nothing
| [Database] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
(AWSResponse GetDatabases
GetDatabasesResponse
rs GetDatabasesResponse
-> Getting [Database] GetDatabasesResponse [Database] -> [Database]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [Database] GetDatabasesResponse [Database]
Lens' GetDatabasesResponse [Database]
getDatabasesResponse_databaseList) =
Maybe GetDatabases
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
GetDatabases -> Maybe GetDatabases
forall a. a -> Maybe a
Prelude.Just (GetDatabases -> Maybe GetDatabases)
-> GetDatabases -> Maybe GetDatabases
forall a b. (a -> b) -> a -> b
Prelude.$
GetDatabases
rq
GetDatabases -> (GetDatabases -> GetDatabases) -> GetDatabases
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetDatabases -> Identity GetDatabases
Lens GetDatabases GetDatabases (Maybe Text) (Maybe Text)
getDatabases_nextToken
((Maybe Text -> Identity (Maybe Text))
-> GetDatabases -> Identity GetDatabases)
-> Maybe Text -> GetDatabases -> GetDatabases
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetDatabases
GetDatabasesResponse
rs
GetDatabasesResponse
-> Getting (First Text) GetDatabasesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetDatabasesResponse -> Const (First Text) GetDatabasesResponse
Lens' GetDatabasesResponse (Maybe Text)
getDatabasesResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> GetDatabasesResponse -> Const (First Text) GetDatabasesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetDatabasesResponse 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 GetDatabases where
type AWSResponse GetDatabases = GetDatabasesResponse
request :: GetDatabases -> Request GetDatabases
request = Service -> GetDatabases -> Request GetDatabases
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetDatabases
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDatabases)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetDatabases))
-> Logger
-> Service
-> Proxy GetDatabases
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDatabases)))
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 -> Int -> [Database] -> GetDatabasesResponse
GetDatabasesResponse'
(Maybe Text -> Int -> [Database] -> GetDatabasesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> [Database] -> GetDatabasesResponse)
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 (Int -> [Database] -> GetDatabasesResponse)
-> Either String Int
-> Either String ([Database] -> GetDatabasesResponse)
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))
Either String ([Database] -> GetDatabasesResponse)
-> Either String [Database] -> Either String GetDatabasesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [Database])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DatabaseList" Either String (Maybe [Database])
-> [Database] -> Either String [Database]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Database]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable GetDatabases
instance Prelude.NFData GetDatabases
instance Core.ToHeaders GetDatabases where
toHeaders :: GetDatabases -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetDatabases -> 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
"AWSGlue.GetDatabases" :: 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 GetDatabases where
toJSON :: GetDatabases -> Value
toJSON GetDatabases' {Maybe Natural
Maybe Text
Maybe ResourceShareType
maxResults :: Maybe Natural
nextToken :: Maybe Text
catalogId :: Maybe Text
resourceShareType :: Maybe ResourceShareType
$sel:maxResults:GetDatabases' :: GetDatabases -> Maybe Natural
$sel:nextToken:GetDatabases' :: GetDatabases -> Maybe Text
$sel:catalogId:GetDatabases' :: GetDatabases -> Maybe Text
$sel:resourceShareType:GetDatabases' :: GetDatabases -> Maybe ResourceShareType
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ResourceShareType" Text -> ResourceShareType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ResourceShareType -> Pair)
-> Maybe ResourceShareType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ResourceShareType
resourceShareType,
(Text
"CatalogId" 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
catalogId,
(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
"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
]
)
instance Core.ToPath GetDatabases where
toPath :: GetDatabases -> ByteString
toPath = ByteString -> GetDatabases -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetDatabases where
toQuery :: GetDatabases -> QueryString
toQuery = QueryString -> GetDatabases -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetDatabasesResponse = GetDatabasesResponse'
{
GetDatabasesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetDatabasesResponse -> Int
httpStatus :: Prelude.Int,
GetDatabasesResponse -> [Database]
databaseList :: [Database]
}
deriving (GetDatabasesResponse -> GetDatabasesResponse -> Bool
(GetDatabasesResponse -> GetDatabasesResponse -> Bool)
-> (GetDatabasesResponse -> GetDatabasesResponse -> Bool)
-> Eq GetDatabasesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDatabasesResponse -> GetDatabasesResponse -> Bool
$c/= :: GetDatabasesResponse -> GetDatabasesResponse -> Bool
== :: GetDatabasesResponse -> GetDatabasesResponse -> Bool
$c== :: GetDatabasesResponse -> GetDatabasesResponse -> Bool
Prelude.Eq, ReadPrec [GetDatabasesResponse]
ReadPrec GetDatabasesResponse
Int -> ReadS GetDatabasesResponse
ReadS [GetDatabasesResponse]
(Int -> ReadS GetDatabasesResponse)
-> ReadS [GetDatabasesResponse]
-> ReadPrec GetDatabasesResponse
-> ReadPrec [GetDatabasesResponse]
-> Read GetDatabasesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDatabasesResponse]
$creadListPrec :: ReadPrec [GetDatabasesResponse]
readPrec :: ReadPrec GetDatabasesResponse
$creadPrec :: ReadPrec GetDatabasesResponse
readList :: ReadS [GetDatabasesResponse]
$creadList :: ReadS [GetDatabasesResponse]
readsPrec :: Int -> ReadS GetDatabasesResponse
$creadsPrec :: Int -> ReadS GetDatabasesResponse
Prelude.Read, Int -> GetDatabasesResponse -> ShowS
[GetDatabasesResponse] -> ShowS
GetDatabasesResponse -> String
(Int -> GetDatabasesResponse -> ShowS)
-> (GetDatabasesResponse -> String)
-> ([GetDatabasesResponse] -> ShowS)
-> Show GetDatabasesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDatabasesResponse] -> ShowS
$cshowList :: [GetDatabasesResponse] -> ShowS
show :: GetDatabasesResponse -> String
$cshow :: GetDatabasesResponse -> String
showsPrec :: Int -> GetDatabasesResponse -> ShowS
$cshowsPrec :: Int -> GetDatabasesResponse -> ShowS
Prelude.Show, (forall x. GetDatabasesResponse -> Rep GetDatabasesResponse x)
-> (forall x. Rep GetDatabasesResponse x -> GetDatabasesResponse)
-> Generic GetDatabasesResponse
forall x. Rep GetDatabasesResponse x -> GetDatabasesResponse
forall x. GetDatabasesResponse -> Rep GetDatabasesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDatabasesResponse x -> GetDatabasesResponse
$cfrom :: forall x. GetDatabasesResponse -> Rep GetDatabasesResponse x
Prelude.Generic)
newGetDatabasesResponse ::
Prelude.Int ->
GetDatabasesResponse
newGetDatabasesResponse :: Int -> GetDatabasesResponse
newGetDatabasesResponse Int
pHttpStatus_ =
GetDatabasesResponse' :: Maybe Text -> Int -> [Database] -> GetDatabasesResponse
GetDatabasesResponse'
{ $sel:nextToken:GetDatabasesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetDatabasesResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:databaseList:GetDatabasesResponse' :: [Database]
databaseList = [Database]
forall a. Monoid a => a
Prelude.mempty
}
getDatabasesResponse_nextToken :: Lens.Lens' GetDatabasesResponse (Prelude.Maybe Prelude.Text)
getDatabasesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetDatabasesResponse -> f GetDatabasesResponse
getDatabasesResponse_nextToken = (GetDatabasesResponse -> Maybe Text)
-> (GetDatabasesResponse -> Maybe Text -> GetDatabasesResponse)
-> Lens' GetDatabasesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDatabasesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetDatabasesResponse' :: GetDatabasesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetDatabasesResponse
s@GetDatabasesResponse' {} Maybe Text
a -> GetDatabasesResponse
s {$sel:nextToken:GetDatabasesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetDatabasesResponse)
getDatabasesResponse_httpStatus :: Lens.Lens' GetDatabasesResponse Prelude.Int
getDatabasesResponse_httpStatus :: (Int -> f Int) -> GetDatabasesResponse -> f GetDatabasesResponse
getDatabasesResponse_httpStatus = (GetDatabasesResponse -> Int)
-> (GetDatabasesResponse -> Int -> GetDatabasesResponse)
-> Lens GetDatabasesResponse GetDatabasesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDatabasesResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDatabasesResponse' :: GetDatabasesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDatabasesResponse
s@GetDatabasesResponse' {} Int
a -> GetDatabasesResponse
s {$sel:httpStatus:GetDatabasesResponse' :: Int
httpStatus = Int
a} :: GetDatabasesResponse)
getDatabasesResponse_databaseList :: Lens.Lens' GetDatabasesResponse [Database]
getDatabasesResponse_databaseList :: ([Database] -> f [Database])
-> GetDatabasesResponse -> f GetDatabasesResponse
getDatabasesResponse_databaseList = (GetDatabasesResponse -> [Database])
-> (GetDatabasesResponse -> [Database] -> GetDatabasesResponse)
-> Lens' GetDatabasesResponse [Database]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDatabasesResponse' {[Database]
databaseList :: [Database]
$sel:databaseList:GetDatabasesResponse' :: GetDatabasesResponse -> [Database]
databaseList} -> [Database]
databaseList) (\s :: GetDatabasesResponse
s@GetDatabasesResponse' {} [Database]
a -> GetDatabasesResponse
s {$sel:databaseList:GetDatabasesResponse' :: [Database]
databaseList = [Database]
a} :: GetDatabasesResponse) (([Database] -> f [Database])
-> GetDatabasesResponse -> f GetDatabasesResponse)
-> (([Database] -> f [Database]) -> [Database] -> f [Database])
-> ([Database] -> f [Database])
-> GetDatabasesResponse
-> f GetDatabasesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Database] -> f [Database]) -> [Database] -> f [Database]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.NFData GetDatabasesResponse