{-# 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.GetPartitions
(
GetPartitions (..),
newGetPartitions,
getPartitions_catalogId,
getPartitions_excludeColumnSchema,
getPartitions_expression,
getPartitions_maxResults,
getPartitions_nextToken,
getPartitions_queryAsOfTime,
getPartitions_segment,
getPartitions_transactionId,
getPartitions_databaseName,
getPartitions_tableName,
GetPartitionsResponse (..),
newGetPartitionsResponse,
getPartitionsResponse_nextToken,
getPartitionsResponse_partitions,
getPartitionsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Glue.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetPartitions = GetPartitions'
{
GetPartitions -> Maybe Text
catalogId :: Prelude.Maybe Prelude.Text,
GetPartitions -> Maybe Bool
excludeColumnSchema :: Prelude.Maybe Prelude.Bool,
GetPartitions -> Maybe Text
expression :: Prelude.Maybe Prelude.Text,
GetPartitions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetPartitions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetPartitions -> Maybe POSIX
queryAsOfTime :: Prelude.Maybe Data.POSIX,
GetPartitions -> Maybe Segment
segment :: Prelude.Maybe Segment,
GetPartitions -> Maybe Text
transactionId :: Prelude.Maybe Prelude.Text,
GetPartitions -> Text
databaseName :: Prelude.Text,
GetPartitions -> Text
tableName :: Prelude.Text
}
deriving (GetPartitions -> GetPartitions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPartitions -> GetPartitions -> Bool
$c/= :: GetPartitions -> GetPartitions -> Bool
== :: GetPartitions -> GetPartitions -> Bool
$c== :: GetPartitions -> GetPartitions -> Bool
Prelude.Eq, ReadPrec [GetPartitions]
ReadPrec GetPartitions
Int -> ReadS GetPartitions
ReadS [GetPartitions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetPartitions]
$creadListPrec :: ReadPrec [GetPartitions]
readPrec :: ReadPrec GetPartitions
$creadPrec :: ReadPrec GetPartitions
readList :: ReadS [GetPartitions]
$creadList :: ReadS [GetPartitions]
readsPrec :: Int -> ReadS GetPartitions
$creadsPrec :: Int -> ReadS GetPartitions
Prelude.Read, Int -> GetPartitions -> ShowS
[GetPartitions] -> ShowS
GetPartitions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPartitions] -> ShowS
$cshowList :: [GetPartitions] -> ShowS
show :: GetPartitions -> String
$cshow :: GetPartitions -> String
showsPrec :: Int -> GetPartitions -> ShowS
$cshowsPrec :: Int -> GetPartitions -> ShowS
Prelude.Show, forall x. Rep GetPartitions x -> GetPartitions
forall x. GetPartitions -> Rep GetPartitions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetPartitions x -> GetPartitions
$cfrom :: forall x. GetPartitions -> Rep GetPartitions x
Prelude.Generic)
newGetPartitions ::
Prelude.Text ->
Prelude.Text ->
GetPartitions
newGetPartitions :: Text -> Text -> GetPartitions
newGetPartitions Text
pDatabaseName_ Text
pTableName_ =
GetPartitions'
{ $sel:catalogId:GetPartitions' :: Maybe Text
catalogId = forall a. Maybe a
Prelude.Nothing,
$sel:excludeColumnSchema:GetPartitions' :: Maybe Bool
excludeColumnSchema = forall a. Maybe a
Prelude.Nothing,
$sel:expression:GetPartitions' :: Maybe Text
expression = forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetPartitions' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetPartitions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:queryAsOfTime:GetPartitions' :: Maybe POSIX
queryAsOfTime = forall a. Maybe a
Prelude.Nothing,
$sel:segment:GetPartitions' :: Maybe Segment
segment = forall a. Maybe a
Prelude.Nothing,
$sel:transactionId:GetPartitions' :: Maybe Text
transactionId = forall a. Maybe a
Prelude.Nothing,
$sel:databaseName:GetPartitions' :: Text
databaseName = Text
pDatabaseName_,
$sel:tableName:GetPartitions' :: Text
tableName = Text
pTableName_
}
getPartitions_catalogId :: Lens.Lens' GetPartitions (Prelude.Maybe Prelude.Text)
getPartitions_catalogId :: Lens' GetPartitions (Maybe Text)
getPartitions_catalogId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPartitions' {Maybe Text
catalogId :: Maybe Text
$sel:catalogId:GetPartitions' :: GetPartitions -> Maybe Text
catalogId} -> Maybe Text
catalogId) (\s :: GetPartitions
s@GetPartitions' {} Maybe Text
a -> GetPartitions
s {$sel:catalogId:GetPartitions' :: Maybe Text
catalogId = Maybe Text
a} :: GetPartitions)
getPartitions_excludeColumnSchema :: Lens.Lens' GetPartitions (Prelude.Maybe Prelude.Bool)
getPartitions_excludeColumnSchema :: Lens' GetPartitions (Maybe Bool)
getPartitions_excludeColumnSchema = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPartitions' {Maybe Bool
excludeColumnSchema :: Maybe Bool
$sel:excludeColumnSchema:GetPartitions' :: GetPartitions -> Maybe Bool
excludeColumnSchema} -> Maybe Bool
excludeColumnSchema) (\s :: GetPartitions
s@GetPartitions' {} Maybe Bool
a -> GetPartitions
s {$sel:excludeColumnSchema:GetPartitions' :: Maybe Bool
excludeColumnSchema = Maybe Bool
a} :: GetPartitions)
getPartitions_expression :: Lens.Lens' GetPartitions (Prelude.Maybe Prelude.Text)
getPartitions_expression :: Lens' GetPartitions (Maybe Text)
getPartitions_expression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPartitions' {Maybe Text
expression :: Maybe Text
$sel:expression:GetPartitions' :: GetPartitions -> Maybe Text
expression} -> Maybe Text
expression) (\s :: GetPartitions
s@GetPartitions' {} Maybe Text
a -> GetPartitions
s {$sel:expression:GetPartitions' :: Maybe Text
expression = Maybe Text
a} :: GetPartitions)
getPartitions_maxResults :: Lens.Lens' GetPartitions (Prelude.Maybe Prelude.Natural)
getPartitions_maxResults :: Lens' GetPartitions (Maybe Natural)
getPartitions_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPartitions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetPartitions' :: GetPartitions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetPartitions
s@GetPartitions' {} Maybe Natural
a -> GetPartitions
s {$sel:maxResults:GetPartitions' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetPartitions)
getPartitions_nextToken :: Lens.Lens' GetPartitions (Prelude.Maybe Prelude.Text)
getPartitions_nextToken :: Lens' GetPartitions (Maybe Text)
getPartitions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPartitions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetPartitions' :: GetPartitions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetPartitions
s@GetPartitions' {} Maybe Text
a -> GetPartitions
s {$sel:nextToken:GetPartitions' :: Maybe Text
nextToken = Maybe Text
a} :: GetPartitions)
getPartitions_queryAsOfTime :: Lens.Lens' GetPartitions (Prelude.Maybe Prelude.UTCTime)
getPartitions_queryAsOfTime :: Lens' GetPartitions (Maybe UTCTime)
getPartitions_queryAsOfTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPartitions' {Maybe POSIX
queryAsOfTime :: Maybe POSIX
$sel:queryAsOfTime:GetPartitions' :: GetPartitions -> Maybe POSIX
queryAsOfTime} -> Maybe POSIX
queryAsOfTime) (\s :: GetPartitions
s@GetPartitions' {} Maybe POSIX
a -> GetPartitions
s {$sel:queryAsOfTime:GetPartitions' :: Maybe POSIX
queryAsOfTime = Maybe POSIX
a} :: GetPartitions) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
getPartitions_segment :: Lens.Lens' GetPartitions (Prelude.Maybe Segment)
getPartitions_segment :: Lens' GetPartitions (Maybe Segment)
getPartitions_segment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPartitions' {Maybe Segment
segment :: Maybe Segment
$sel:segment:GetPartitions' :: GetPartitions -> Maybe Segment
segment} -> Maybe Segment
segment) (\s :: GetPartitions
s@GetPartitions' {} Maybe Segment
a -> GetPartitions
s {$sel:segment:GetPartitions' :: Maybe Segment
segment = Maybe Segment
a} :: GetPartitions)
getPartitions_transactionId :: Lens.Lens' GetPartitions (Prelude.Maybe Prelude.Text)
getPartitions_transactionId :: Lens' GetPartitions (Maybe Text)
getPartitions_transactionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPartitions' {Maybe Text
transactionId :: Maybe Text
$sel:transactionId:GetPartitions' :: GetPartitions -> Maybe Text
transactionId} -> Maybe Text
transactionId) (\s :: GetPartitions
s@GetPartitions' {} Maybe Text
a -> GetPartitions
s {$sel:transactionId:GetPartitions' :: Maybe Text
transactionId = Maybe Text
a} :: GetPartitions)
getPartitions_databaseName :: Lens.Lens' GetPartitions Prelude.Text
getPartitions_databaseName :: Lens' GetPartitions Text
getPartitions_databaseName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPartitions' {Text
databaseName :: Text
$sel:databaseName:GetPartitions' :: GetPartitions -> Text
databaseName} -> Text
databaseName) (\s :: GetPartitions
s@GetPartitions' {} Text
a -> GetPartitions
s {$sel:databaseName:GetPartitions' :: Text
databaseName = Text
a} :: GetPartitions)
getPartitions_tableName :: Lens.Lens' GetPartitions Prelude.Text
getPartitions_tableName :: Lens' GetPartitions Text
getPartitions_tableName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPartitions' {Text
tableName :: Text
$sel:tableName:GetPartitions' :: GetPartitions -> Text
tableName} -> Text
tableName) (\s :: GetPartitions
s@GetPartitions' {} Text
a -> GetPartitions
s {$sel:tableName:GetPartitions' :: Text
tableName = Text
a} :: GetPartitions)
instance Core.AWSPager GetPartitions where
page :: GetPartitions -> AWSResponse GetPartitions -> Maybe GetPartitions
page GetPartitions
rq AWSResponse GetPartitions
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetPartitions
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetPartitionsResponse (Maybe Text)
getPartitionsResponse_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 GetPartitions
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetPartitionsResponse (Maybe [Partition])
getPartitionsResponse_partitions
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.$ GetPartitions
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetPartitions (Maybe Text)
getPartitions_nextToken
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetPartitions
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetPartitionsResponse (Maybe Text)
getPartitionsResponse_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 GetPartitions where
type
AWSResponse GetPartitions =
GetPartitionsResponse
request :: (Service -> Service) -> GetPartitions -> Request GetPartitions
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 GetPartitions
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetPartitions)))
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 [Partition] -> Int -> GetPartitionsResponse
GetPartitionsResponse'
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
"Partitions" 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 GetPartitions where
hashWithSalt :: Int -> GetPartitions -> Int
hashWithSalt Int
_salt GetPartitions' {Maybe Bool
Maybe Natural
Maybe Text
Maybe POSIX
Maybe Segment
Text
tableName :: Text
databaseName :: Text
transactionId :: Maybe Text
segment :: Maybe Segment
queryAsOfTime :: Maybe POSIX
nextToken :: Maybe Text
maxResults :: Maybe Natural
expression :: Maybe Text
excludeColumnSchema :: Maybe Bool
catalogId :: Maybe Text
$sel:tableName:GetPartitions' :: GetPartitions -> Text
$sel:databaseName:GetPartitions' :: GetPartitions -> Text
$sel:transactionId:GetPartitions' :: GetPartitions -> Maybe Text
$sel:segment:GetPartitions' :: GetPartitions -> Maybe Segment
$sel:queryAsOfTime:GetPartitions' :: GetPartitions -> Maybe POSIX
$sel:nextToken:GetPartitions' :: GetPartitions -> Maybe Text
$sel:maxResults:GetPartitions' :: GetPartitions -> Maybe Natural
$sel:expression:GetPartitions' :: GetPartitions -> Maybe Text
$sel:excludeColumnSchema:GetPartitions' :: GetPartitions -> Maybe Bool
$sel:catalogId:GetPartitions' :: GetPartitions -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
catalogId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
excludeColumnSchema
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
expression
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 POSIX
queryAsOfTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Segment
segment
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
transactionId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
databaseName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
tableName
instance Prelude.NFData GetPartitions where
rnf :: GetPartitions -> ()
rnf GetPartitions' {Maybe Bool
Maybe Natural
Maybe Text
Maybe POSIX
Maybe Segment
Text
tableName :: Text
databaseName :: Text
transactionId :: Maybe Text
segment :: Maybe Segment
queryAsOfTime :: Maybe POSIX
nextToken :: Maybe Text
maxResults :: Maybe Natural
expression :: Maybe Text
excludeColumnSchema :: Maybe Bool
catalogId :: Maybe Text
$sel:tableName:GetPartitions' :: GetPartitions -> Text
$sel:databaseName:GetPartitions' :: GetPartitions -> Text
$sel:transactionId:GetPartitions' :: GetPartitions -> Maybe Text
$sel:segment:GetPartitions' :: GetPartitions -> Maybe Segment
$sel:queryAsOfTime:GetPartitions' :: GetPartitions -> Maybe POSIX
$sel:nextToken:GetPartitions' :: GetPartitions -> Maybe Text
$sel:maxResults:GetPartitions' :: GetPartitions -> Maybe Natural
$sel:expression:GetPartitions' :: GetPartitions -> Maybe Text
$sel:excludeColumnSchema:GetPartitions' :: GetPartitions -> Maybe Bool
$sel:catalogId:GetPartitions' :: GetPartitions -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
catalogId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
excludeColumnSchema
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
expression
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 POSIX
queryAsOfTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Segment
segment
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
transactionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
databaseName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
tableName
instance Data.ToHeaders GetPartitions where
toHeaders :: GetPartitions -> 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
"AWSGlue.GetPartitions" :: 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 GetPartitions where
toJSON :: GetPartitions -> Value
toJSON GetPartitions' {Maybe Bool
Maybe Natural
Maybe Text
Maybe POSIX
Maybe Segment
Text
tableName :: Text
databaseName :: Text
transactionId :: Maybe Text
segment :: Maybe Segment
queryAsOfTime :: Maybe POSIX
nextToken :: Maybe Text
maxResults :: Maybe Natural
expression :: Maybe Text
excludeColumnSchema :: Maybe Bool
catalogId :: Maybe Text
$sel:tableName:GetPartitions' :: GetPartitions -> Text
$sel:databaseName:GetPartitions' :: GetPartitions -> Text
$sel:transactionId:GetPartitions' :: GetPartitions -> Maybe Text
$sel:segment:GetPartitions' :: GetPartitions -> Maybe Segment
$sel:queryAsOfTime:GetPartitions' :: GetPartitions -> Maybe POSIX
$sel:nextToken:GetPartitions' :: GetPartitions -> Maybe Text
$sel:maxResults:GetPartitions' :: GetPartitions -> Maybe Natural
$sel:expression:GetPartitions' :: GetPartitions -> Maybe Text
$sel:excludeColumnSchema:GetPartitions' :: GetPartitions -> Maybe Bool
$sel:catalogId:GetPartitions' :: GetPartitions -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"CatalogId" 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
catalogId,
(Key
"ExcludeColumnSchema" 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 Bool
excludeColumnSchema,
(Key
"Expression" 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
expression,
(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
"QueryAsOfTime" 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 POSIX
queryAsOfTime,
(Key
"Segment" 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 Segment
segment,
(Key
"TransactionId" 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
transactionId,
forall a. a -> Maybe a
Prelude.Just (Key
"DatabaseName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
databaseName),
forall a. a -> Maybe a
Prelude.Just (Key
"TableName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
tableName)
]
)
instance Data.ToPath GetPartitions where
toPath :: GetPartitions -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery GetPartitions where
toQuery :: GetPartitions -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetPartitionsResponse = GetPartitionsResponse'
{
GetPartitionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetPartitionsResponse -> Maybe [Partition]
partitions :: Prelude.Maybe [Partition],
GetPartitionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetPartitionsResponse -> GetPartitionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPartitionsResponse -> GetPartitionsResponse -> Bool
$c/= :: GetPartitionsResponse -> GetPartitionsResponse -> Bool
== :: GetPartitionsResponse -> GetPartitionsResponse -> Bool
$c== :: GetPartitionsResponse -> GetPartitionsResponse -> Bool
Prelude.Eq, ReadPrec [GetPartitionsResponse]
ReadPrec GetPartitionsResponse
Int -> ReadS GetPartitionsResponse
ReadS [GetPartitionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetPartitionsResponse]
$creadListPrec :: ReadPrec [GetPartitionsResponse]
readPrec :: ReadPrec GetPartitionsResponse
$creadPrec :: ReadPrec GetPartitionsResponse
readList :: ReadS [GetPartitionsResponse]
$creadList :: ReadS [GetPartitionsResponse]
readsPrec :: Int -> ReadS GetPartitionsResponse
$creadsPrec :: Int -> ReadS GetPartitionsResponse
Prelude.Read, Int -> GetPartitionsResponse -> ShowS
[GetPartitionsResponse] -> ShowS
GetPartitionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPartitionsResponse] -> ShowS
$cshowList :: [GetPartitionsResponse] -> ShowS
show :: GetPartitionsResponse -> String
$cshow :: GetPartitionsResponse -> String
showsPrec :: Int -> GetPartitionsResponse -> ShowS
$cshowsPrec :: Int -> GetPartitionsResponse -> ShowS
Prelude.Show, forall x. Rep GetPartitionsResponse x -> GetPartitionsResponse
forall x. GetPartitionsResponse -> Rep GetPartitionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetPartitionsResponse x -> GetPartitionsResponse
$cfrom :: forall x. GetPartitionsResponse -> Rep GetPartitionsResponse x
Prelude.Generic)
newGetPartitionsResponse ::
Prelude.Int ->
GetPartitionsResponse
newGetPartitionsResponse :: Int -> GetPartitionsResponse
newGetPartitionsResponse Int
pHttpStatus_ =
GetPartitionsResponse'
{ $sel:nextToken:GetPartitionsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:partitions:GetPartitionsResponse' :: Maybe [Partition]
partitions = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetPartitionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getPartitionsResponse_nextToken :: Lens.Lens' GetPartitionsResponse (Prelude.Maybe Prelude.Text)
getPartitionsResponse_nextToken :: Lens' GetPartitionsResponse (Maybe Text)
getPartitionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPartitionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetPartitionsResponse' :: GetPartitionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetPartitionsResponse
s@GetPartitionsResponse' {} Maybe Text
a -> GetPartitionsResponse
s {$sel:nextToken:GetPartitionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetPartitionsResponse)
getPartitionsResponse_partitions :: Lens.Lens' GetPartitionsResponse (Prelude.Maybe [Partition])
getPartitionsResponse_partitions :: Lens' GetPartitionsResponse (Maybe [Partition])
getPartitionsResponse_partitions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPartitionsResponse' {Maybe [Partition]
partitions :: Maybe [Partition]
$sel:partitions:GetPartitionsResponse' :: GetPartitionsResponse -> Maybe [Partition]
partitions} -> Maybe [Partition]
partitions) (\s :: GetPartitionsResponse
s@GetPartitionsResponse' {} Maybe [Partition]
a -> GetPartitionsResponse
s {$sel:partitions:GetPartitionsResponse' :: Maybe [Partition]
partitions = Maybe [Partition]
a} :: GetPartitionsResponse) 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
getPartitionsResponse_httpStatus :: Lens.Lens' GetPartitionsResponse Prelude.Int
getPartitionsResponse_httpStatus :: Lens' GetPartitionsResponse Int
getPartitionsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPartitionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetPartitionsResponse' :: GetPartitionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetPartitionsResponse
s@GetPartitionsResponse' {} Int
a -> GetPartitionsResponse
s {$sel:httpStatus:GetPartitionsResponse' :: Int
httpStatus = Int
a} :: GetPartitionsResponse)
instance Prelude.NFData GetPartitionsResponse where
rnf :: GetPartitionsResponse -> ()
rnf GetPartitionsResponse' {Int
Maybe [Partition]
Maybe Text
httpStatus :: Int
partitions :: Maybe [Partition]
nextToken :: Maybe Text
$sel:httpStatus:GetPartitionsResponse' :: GetPartitionsResponse -> Int
$sel:partitions:GetPartitionsResponse' :: GetPartitionsResponse -> Maybe [Partition]
$sel:nextToken:GetPartitionsResponse' :: GetPartitionsResponse -> 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 [Partition]
partitions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus