{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Glue.BatchGetPartition
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves partitions in a batch request.
module Amazonka.Glue.BatchGetPartition
  ( -- * Creating a Request
    BatchGetPartition (..),
    newBatchGetPartition,

    -- * Request Lenses
    batchGetPartition_catalogId,
    batchGetPartition_databaseName,
    batchGetPartition_tableName,
    batchGetPartition_partitionsToGet,

    -- * Destructuring the Response
    BatchGetPartitionResponse (..),
    newBatchGetPartitionResponse,

    -- * Response Lenses
    batchGetPartitionResponse_unprocessedKeys,
    batchGetPartitionResponse_partitions,
    batchGetPartitionResponse_httpStatus,
  )
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

-- | /See:/ 'newBatchGetPartition' smart constructor.
data BatchGetPartition = BatchGetPartition'
  { -- | The ID of the Data Catalog where the partitions in question reside. If
    -- none is supplied, the Amazon Web Services account ID is used by default.
    BatchGetPartition -> Maybe Text
catalogId :: Prelude.Maybe Prelude.Text,
    -- | The name of the catalog database where the partitions reside.
    BatchGetPartition -> Text
databaseName :: Prelude.Text,
    -- | The name of the partitions\' table.
    BatchGetPartition -> Text
tableName :: Prelude.Text,
    -- | A list of partition values identifying the partitions to retrieve.
    BatchGetPartition -> [PartitionValueList]
partitionsToGet :: [PartitionValueList]
  }
  deriving (BatchGetPartition -> BatchGetPartition -> Bool
(BatchGetPartition -> BatchGetPartition -> Bool)
-> (BatchGetPartition -> BatchGetPartition -> Bool)
-> Eq BatchGetPartition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetPartition -> BatchGetPartition -> Bool
$c/= :: BatchGetPartition -> BatchGetPartition -> Bool
== :: BatchGetPartition -> BatchGetPartition -> Bool
$c== :: BatchGetPartition -> BatchGetPartition -> Bool
Prelude.Eq, ReadPrec [BatchGetPartition]
ReadPrec BatchGetPartition
Int -> ReadS BatchGetPartition
ReadS [BatchGetPartition]
(Int -> ReadS BatchGetPartition)
-> ReadS [BatchGetPartition]
-> ReadPrec BatchGetPartition
-> ReadPrec [BatchGetPartition]
-> Read BatchGetPartition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetPartition]
$creadListPrec :: ReadPrec [BatchGetPartition]
readPrec :: ReadPrec BatchGetPartition
$creadPrec :: ReadPrec BatchGetPartition
readList :: ReadS [BatchGetPartition]
$creadList :: ReadS [BatchGetPartition]
readsPrec :: Int -> ReadS BatchGetPartition
$creadsPrec :: Int -> ReadS BatchGetPartition
Prelude.Read, Int -> BatchGetPartition -> ShowS
[BatchGetPartition] -> ShowS
BatchGetPartition -> String
(Int -> BatchGetPartition -> ShowS)
-> (BatchGetPartition -> String)
-> ([BatchGetPartition] -> ShowS)
-> Show BatchGetPartition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetPartition] -> ShowS
$cshowList :: [BatchGetPartition] -> ShowS
show :: BatchGetPartition -> String
$cshow :: BatchGetPartition -> String
showsPrec :: Int -> BatchGetPartition -> ShowS
$cshowsPrec :: Int -> BatchGetPartition -> ShowS
Prelude.Show, (forall x. BatchGetPartition -> Rep BatchGetPartition x)
-> (forall x. Rep BatchGetPartition x -> BatchGetPartition)
-> Generic BatchGetPartition
forall x. Rep BatchGetPartition x -> BatchGetPartition
forall x. BatchGetPartition -> Rep BatchGetPartition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchGetPartition x -> BatchGetPartition
$cfrom :: forall x. BatchGetPartition -> Rep BatchGetPartition x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetPartition' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'catalogId', 'batchGetPartition_catalogId' - The ID of the Data Catalog where the partitions in question reside. If
-- none is supplied, the Amazon Web Services account ID is used by default.
--
-- 'databaseName', 'batchGetPartition_databaseName' - The name of the catalog database where the partitions reside.
--
-- 'tableName', 'batchGetPartition_tableName' - The name of the partitions\' table.
--
-- 'partitionsToGet', 'batchGetPartition_partitionsToGet' - A list of partition values identifying the partitions to retrieve.
newBatchGetPartition ::
  -- | 'databaseName'
  Prelude.Text ->
  -- | 'tableName'
  Prelude.Text ->
  BatchGetPartition
newBatchGetPartition :: Text -> Text -> BatchGetPartition
newBatchGetPartition Text
pDatabaseName_ Text
pTableName_ =
  BatchGetPartition' :: Maybe Text
-> Text -> Text -> [PartitionValueList] -> BatchGetPartition
BatchGetPartition'
    { $sel:catalogId:BatchGetPartition' :: Maybe Text
catalogId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:databaseName:BatchGetPartition' :: Text
databaseName = Text
pDatabaseName_,
      $sel:tableName:BatchGetPartition' :: Text
tableName = Text
pTableName_,
      $sel:partitionsToGet:BatchGetPartition' :: [PartitionValueList]
partitionsToGet = [PartitionValueList]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The ID of the Data Catalog where the partitions in question reside. If
-- none is supplied, the Amazon Web Services account ID is used by default.
batchGetPartition_catalogId :: Lens.Lens' BatchGetPartition (Prelude.Maybe Prelude.Text)
batchGetPartition_catalogId :: (Maybe Text -> f (Maybe Text))
-> BatchGetPartition -> f BatchGetPartition
batchGetPartition_catalogId = (BatchGetPartition -> Maybe Text)
-> (BatchGetPartition -> Maybe Text -> BatchGetPartition)
-> Lens
     BatchGetPartition BatchGetPartition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetPartition' {Maybe Text
catalogId :: Maybe Text
$sel:catalogId:BatchGetPartition' :: BatchGetPartition -> Maybe Text
catalogId} -> Maybe Text
catalogId) (\s :: BatchGetPartition
s@BatchGetPartition' {} Maybe Text
a -> BatchGetPartition
s {$sel:catalogId:BatchGetPartition' :: Maybe Text
catalogId = Maybe Text
a} :: BatchGetPartition)

-- | The name of the catalog database where the partitions reside.
batchGetPartition_databaseName :: Lens.Lens' BatchGetPartition Prelude.Text
batchGetPartition_databaseName :: (Text -> f Text) -> BatchGetPartition -> f BatchGetPartition
batchGetPartition_databaseName = (BatchGetPartition -> Text)
-> (BatchGetPartition -> Text -> BatchGetPartition)
-> Lens BatchGetPartition BatchGetPartition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetPartition' {Text
databaseName :: Text
$sel:databaseName:BatchGetPartition' :: BatchGetPartition -> Text
databaseName} -> Text
databaseName) (\s :: BatchGetPartition
s@BatchGetPartition' {} Text
a -> BatchGetPartition
s {$sel:databaseName:BatchGetPartition' :: Text
databaseName = Text
a} :: BatchGetPartition)

-- | The name of the partitions\' table.
batchGetPartition_tableName :: Lens.Lens' BatchGetPartition Prelude.Text
batchGetPartition_tableName :: (Text -> f Text) -> BatchGetPartition -> f BatchGetPartition
batchGetPartition_tableName = (BatchGetPartition -> Text)
-> (BatchGetPartition -> Text -> BatchGetPartition)
-> Lens BatchGetPartition BatchGetPartition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetPartition' {Text
tableName :: Text
$sel:tableName:BatchGetPartition' :: BatchGetPartition -> Text
tableName} -> Text
tableName) (\s :: BatchGetPartition
s@BatchGetPartition' {} Text
a -> BatchGetPartition
s {$sel:tableName:BatchGetPartition' :: Text
tableName = Text
a} :: BatchGetPartition)

-- | A list of partition values identifying the partitions to retrieve.
batchGetPartition_partitionsToGet :: Lens.Lens' BatchGetPartition [PartitionValueList]
batchGetPartition_partitionsToGet :: ([PartitionValueList] -> f [PartitionValueList])
-> BatchGetPartition -> f BatchGetPartition
batchGetPartition_partitionsToGet = (BatchGetPartition -> [PartitionValueList])
-> (BatchGetPartition -> [PartitionValueList] -> BatchGetPartition)
-> Lens
     BatchGetPartition
     BatchGetPartition
     [PartitionValueList]
     [PartitionValueList]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetPartition' {[PartitionValueList]
partitionsToGet :: [PartitionValueList]
$sel:partitionsToGet:BatchGetPartition' :: BatchGetPartition -> [PartitionValueList]
partitionsToGet} -> [PartitionValueList]
partitionsToGet) (\s :: BatchGetPartition
s@BatchGetPartition' {} [PartitionValueList]
a -> BatchGetPartition
s {$sel:partitionsToGet:BatchGetPartition' :: [PartitionValueList]
partitionsToGet = [PartitionValueList]
a} :: BatchGetPartition) (([PartitionValueList] -> f [PartitionValueList])
 -> BatchGetPartition -> f BatchGetPartition)
-> (([PartitionValueList] -> f [PartitionValueList])
    -> [PartitionValueList] -> f [PartitionValueList])
-> ([PartitionValueList] -> f [PartitionValueList])
-> BatchGetPartition
-> f BatchGetPartition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([PartitionValueList] -> f [PartitionValueList])
-> [PartitionValueList] -> f [PartitionValueList]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest BatchGetPartition where
  type
    AWSResponse BatchGetPartition =
      BatchGetPartitionResponse
  request :: BatchGetPartition -> Request BatchGetPartition
request = Service -> BatchGetPartition -> Request BatchGetPartition
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy BatchGetPartition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchGetPartition)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse BatchGetPartition))
-> Logger
-> Service
-> Proxy BatchGetPartition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchGetPartition)))
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 [PartitionValueList]
-> Maybe [Partition] -> Int -> BatchGetPartitionResponse
BatchGetPartitionResponse'
            (Maybe [PartitionValueList]
 -> Maybe [Partition] -> Int -> BatchGetPartitionResponse)
-> Either String (Maybe [PartitionValueList])
-> Either
     String (Maybe [Partition] -> Int -> BatchGetPartitionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [PartitionValueList]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"UnprocessedKeys"
                            Either String (Maybe (Maybe [PartitionValueList]))
-> Maybe [PartitionValueList]
-> Either String (Maybe [PartitionValueList])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [PartitionValueList]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String (Maybe [Partition] -> Int -> BatchGetPartitionResponse)
-> Either String (Maybe [Partition])
-> Either String (Int -> BatchGetPartitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Partition]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Partitions" Either String (Maybe (Maybe [Partition]))
-> Maybe [Partition] -> Either String (Maybe [Partition])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Partition]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> BatchGetPartitionResponse)
-> Either String Int -> Either String BatchGetPartitionResponse
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 BatchGetPartition

instance Prelude.NFData BatchGetPartition

instance Core.ToHeaders BatchGetPartition where
  toHeaders :: BatchGetPartition -> ResponseHeaders
toHeaders =
    ResponseHeaders -> BatchGetPartition -> 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.BatchGetPartition" :: 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 BatchGetPartition where
  toJSON :: BatchGetPartition -> Value
toJSON BatchGetPartition' {[PartitionValueList]
Maybe Text
Text
partitionsToGet :: [PartitionValueList]
tableName :: Text
databaseName :: Text
catalogId :: Maybe Text
$sel:partitionsToGet:BatchGetPartition' :: BatchGetPartition -> [PartitionValueList]
$sel:tableName:BatchGetPartition' :: BatchGetPartition -> Text
$sel:databaseName:BatchGetPartition' :: BatchGetPartition -> Text
$sel:catalogId:BatchGetPartition' :: BatchGetPartition -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DatabaseName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
databaseName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TableName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
tableName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"PartitionsToGet" Text -> [PartitionValueList] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [PartitionValueList]
partitionsToGet)
          ]
      )

instance Core.ToPath BatchGetPartition where
  toPath :: BatchGetPartition -> ByteString
toPath = ByteString -> BatchGetPartition -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery BatchGetPartition where
  toQuery :: BatchGetPartition -> QueryString
toQuery = QueryString -> BatchGetPartition -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newBatchGetPartitionResponse' smart constructor.
data BatchGetPartitionResponse = BatchGetPartitionResponse'
  { -- | A list of the partition values in the request for which partitions were
    -- not returned.
    BatchGetPartitionResponse -> Maybe [PartitionValueList]
unprocessedKeys :: Prelude.Maybe [PartitionValueList],
    -- | A list of the requested partitions.
    BatchGetPartitionResponse -> Maybe [Partition]
partitions :: Prelude.Maybe [Partition],
    -- | The response's http status code.
    BatchGetPartitionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BatchGetPartitionResponse -> BatchGetPartitionResponse -> Bool
(BatchGetPartitionResponse -> BatchGetPartitionResponse -> Bool)
-> (BatchGetPartitionResponse -> BatchGetPartitionResponse -> Bool)
-> Eq BatchGetPartitionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetPartitionResponse -> BatchGetPartitionResponse -> Bool
$c/= :: BatchGetPartitionResponse -> BatchGetPartitionResponse -> Bool
== :: BatchGetPartitionResponse -> BatchGetPartitionResponse -> Bool
$c== :: BatchGetPartitionResponse -> BatchGetPartitionResponse -> Bool
Prelude.Eq, ReadPrec [BatchGetPartitionResponse]
ReadPrec BatchGetPartitionResponse
Int -> ReadS BatchGetPartitionResponse
ReadS [BatchGetPartitionResponse]
(Int -> ReadS BatchGetPartitionResponse)
-> ReadS [BatchGetPartitionResponse]
-> ReadPrec BatchGetPartitionResponse
-> ReadPrec [BatchGetPartitionResponse]
-> Read BatchGetPartitionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetPartitionResponse]
$creadListPrec :: ReadPrec [BatchGetPartitionResponse]
readPrec :: ReadPrec BatchGetPartitionResponse
$creadPrec :: ReadPrec BatchGetPartitionResponse
readList :: ReadS [BatchGetPartitionResponse]
$creadList :: ReadS [BatchGetPartitionResponse]
readsPrec :: Int -> ReadS BatchGetPartitionResponse
$creadsPrec :: Int -> ReadS BatchGetPartitionResponse
Prelude.Read, Int -> BatchGetPartitionResponse -> ShowS
[BatchGetPartitionResponse] -> ShowS
BatchGetPartitionResponse -> String
(Int -> BatchGetPartitionResponse -> ShowS)
-> (BatchGetPartitionResponse -> String)
-> ([BatchGetPartitionResponse] -> ShowS)
-> Show BatchGetPartitionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetPartitionResponse] -> ShowS
$cshowList :: [BatchGetPartitionResponse] -> ShowS
show :: BatchGetPartitionResponse -> String
$cshow :: BatchGetPartitionResponse -> String
showsPrec :: Int -> BatchGetPartitionResponse -> ShowS
$cshowsPrec :: Int -> BatchGetPartitionResponse -> ShowS
Prelude.Show, (forall x.
 BatchGetPartitionResponse -> Rep BatchGetPartitionResponse x)
-> (forall x.
    Rep BatchGetPartitionResponse x -> BatchGetPartitionResponse)
-> Generic BatchGetPartitionResponse
forall x.
Rep BatchGetPartitionResponse x -> BatchGetPartitionResponse
forall x.
BatchGetPartitionResponse -> Rep BatchGetPartitionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetPartitionResponse x -> BatchGetPartitionResponse
$cfrom :: forall x.
BatchGetPartitionResponse -> Rep BatchGetPartitionResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetPartitionResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'unprocessedKeys', 'batchGetPartitionResponse_unprocessedKeys' - A list of the partition values in the request for which partitions were
-- not returned.
--
-- 'partitions', 'batchGetPartitionResponse_partitions' - A list of the requested partitions.
--
-- 'httpStatus', 'batchGetPartitionResponse_httpStatus' - The response's http status code.
newBatchGetPartitionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchGetPartitionResponse
newBatchGetPartitionResponse :: Int -> BatchGetPartitionResponse
newBatchGetPartitionResponse Int
pHttpStatus_ =
  BatchGetPartitionResponse' :: Maybe [PartitionValueList]
-> Maybe [Partition] -> Int -> BatchGetPartitionResponse
BatchGetPartitionResponse'
    { $sel:unprocessedKeys:BatchGetPartitionResponse' :: Maybe [PartitionValueList]
unprocessedKeys =
        Maybe [PartitionValueList]
forall a. Maybe a
Prelude.Nothing,
      $sel:partitions:BatchGetPartitionResponse' :: Maybe [Partition]
partitions = Maybe [Partition]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:BatchGetPartitionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of the partition values in the request for which partitions were
-- not returned.
batchGetPartitionResponse_unprocessedKeys :: Lens.Lens' BatchGetPartitionResponse (Prelude.Maybe [PartitionValueList])
batchGetPartitionResponse_unprocessedKeys :: (Maybe [PartitionValueList] -> f (Maybe [PartitionValueList]))
-> BatchGetPartitionResponse -> f BatchGetPartitionResponse
batchGetPartitionResponse_unprocessedKeys = (BatchGetPartitionResponse -> Maybe [PartitionValueList])
-> (BatchGetPartitionResponse
    -> Maybe [PartitionValueList] -> BatchGetPartitionResponse)
-> Lens
     BatchGetPartitionResponse
     BatchGetPartitionResponse
     (Maybe [PartitionValueList])
     (Maybe [PartitionValueList])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetPartitionResponse' {Maybe [PartitionValueList]
unprocessedKeys :: Maybe [PartitionValueList]
$sel:unprocessedKeys:BatchGetPartitionResponse' :: BatchGetPartitionResponse -> Maybe [PartitionValueList]
unprocessedKeys} -> Maybe [PartitionValueList]
unprocessedKeys) (\s :: BatchGetPartitionResponse
s@BatchGetPartitionResponse' {} Maybe [PartitionValueList]
a -> BatchGetPartitionResponse
s {$sel:unprocessedKeys:BatchGetPartitionResponse' :: Maybe [PartitionValueList]
unprocessedKeys = Maybe [PartitionValueList]
a} :: BatchGetPartitionResponse) ((Maybe [PartitionValueList] -> f (Maybe [PartitionValueList]))
 -> BatchGetPartitionResponse -> f BatchGetPartitionResponse)
-> ((Maybe [PartitionValueList] -> f (Maybe [PartitionValueList]))
    -> Maybe [PartitionValueList] -> f (Maybe [PartitionValueList]))
-> (Maybe [PartitionValueList] -> f (Maybe [PartitionValueList]))
-> BatchGetPartitionResponse
-> f BatchGetPartitionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PartitionValueList]
  [PartitionValueList]
  [PartitionValueList]
  [PartitionValueList]
-> Iso
     (Maybe [PartitionValueList])
     (Maybe [PartitionValueList])
     (Maybe [PartitionValueList])
     (Maybe [PartitionValueList])
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
  [PartitionValueList]
  [PartitionValueList]
  [PartitionValueList]
  [PartitionValueList]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of the requested partitions.
batchGetPartitionResponse_partitions :: Lens.Lens' BatchGetPartitionResponse (Prelude.Maybe [Partition])
batchGetPartitionResponse_partitions :: (Maybe [Partition] -> f (Maybe [Partition]))
-> BatchGetPartitionResponse -> f BatchGetPartitionResponse
batchGetPartitionResponse_partitions = (BatchGetPartitionResponse -> Maybe [Partition])
-> (BatchGetPartitionResponse
    -> Maybe [Partition] -> BatchGetPartitionResponse)
-> Lens
     BatchGetPartitionResponse
     BatchGetPartitionResponse
     (Maybe [Partition])
     (Maybe [Partition])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetPartitionResponse' {Maybe [Partition]
partitions :: Maybe [Partition]
$sel:partitions:BatchGetPartitionResponse' :: BatchGetPartitionResponse -> Maybe [Partition]
partitions} -> Maybe [Partition]
partitions) (\s :: BatchGetPartitionResponse
s@BatchGetPartitionResponse' {} Maybe [Partition]
a -> BatchGetPartitionResponse
s {$sel:partitions:BatchGetPartitionResponse' :: Maybe [Partition]
partitions = Maybe [Partition]
a} :: BatchGetPartitionResponse) ((Maybe [Partition] -> f (Maybe [Partition]))
 -> BatchGetPartitionResponse -> f BatchGetPartitionResponse)
-> ((Maybe [Partition] -> f (Maybe [Partition]))
    -> Maybe [Partition] -> f (Maybe [Partition]))
-> (Maybe [Partition] -> f (Maybe [Partition]))
-> BatchGetPartitionResponse
-> f BatchGetPartitionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Partition] [Partition] [Partition] [Partition]
-> Iso
     (Maybe [Partition])
     (Maybe [Partition])
     (Maybe [Partition])
     (Maybe [Partition])
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 [Partition] [Partition] [Partition] [Partition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
batchGetPartitionResponse_httpStatus :: Lens.Lens' BatchGetPartitionResponse Prelude.Int
batchGetPartitionResponse_httpStatus :: (Int -> f Int)
-> BatchGetPartitionResponse -> f BatchGetPartitionResponse
batchGetPartitionResponse_httpStatus = (BatchGetPartitionResponse -> Int)
-> (BatchGetPartitionResponse -> Int -> BatchGetPartitionResponse)
-> Lens BatchGetPartitionResponse BatchGetPartitionResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetPartitionResponse' {Int
httpStatus :: Int
$sel:httpStatus:BatchGetPartitionResponse' :: BatchGetPartitionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: BatchGetPartitionResponse
s@BatchGetPartitionResponse' {} Int
a -> BatchGetPartitionResponse
s {$sel:httpStatus:BatchGetPartitionResponse' :: Int
httpStatus = Int
a} :: BatchGetPartitionResponse)

instance Prelude.NFData BatchGetPartitionResponse