{-# 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.Athena.BatchGetQueryExecution
-- 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)
--
-- Returns the details of a single query execution or a list of up to 50
-- query executions, which you provide as an array of query execution ID
-- strings. Requires you to have access to the workgroup in which the
-- queries ran. To get a list of query execution IDs, use
-- ListQueryExecutionsInput$WorkGroup. Query executions differ from named
-- (saved) queries. Use BatchGetNamedQueryInput to get details about named
-- queries.
module Amazonka.Athena.BatchGetQueryExecution
  ( -- * Creating a Request
    BatchGetQueryExecution (..),
    newBatchGetQueryExecution,

    -- * Request Lenses
    batchGetQueryExecution_queryExecutionIds,

    -- * Destructuring the Response
    BatchGetQueryExecutionResponse (..),
    newBatchGetQueryExecutionResponse,

    -- * Response Lenses
    batchGetQueryExecutionResponse_unprocessedQueryExecutionIds,
    batchGetQueryExecutionResponse_queryExecutions,
    batchGetQueryExecutionResponse_httpStatus,
  )
where

import Amazonka.Athena.Types
import qualified Amazonka.Core as Core
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:/ 'newBatchGetQueryExecution' smart constructor.
data BatchGetQueryExecution = BatchGetQueryExecution'
  { -- | An array of query execution IDs.
    BatchGetQueryExecution -> NonEmpty Text
queryExecutionIds :: Prelude.NonEmpty Prelude.Text
  }
  deriving (BatchGetQueryExecution -> BatchGetQueryExecution -> Bool
(BatchGetQueryExecution -> BatchGetQueryExecution -> Bool)
-> (BatchGetQueryExecution -> BatchGetQueryExecution -> Bool)
-> Eq BatchGetQueryExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetQueryExecution -> BatchGetQueryExecution -> Bool
$c/= :: BatchGetQueryExecution -> BatchGetQueryExecution -> Bool
== :: BatchGetQueryExecution -> BatchGetQueryExecution -> Bool
$c== :: BatchGetQueryExecution -> BatchGetQueryExecution -> Bool
Prelude.Eq, ReadPrec [BatchGetQueryExecution]
ReadPrec BatchGetQueryExecution
Int -> ReadS BatchGetQueryExecution
ReadS [BatchGetQueryExecution]
(Int -> ReadS BatchGetQueryExecution)
-> ReadS [BatchGetQueryExecution]
-> ReadPrec BatchGetQueryExecution
-> ReadPrec [BatchGetQueryExecution]
-> Read BatchGetQueryExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetQueryExecution]
$creadListPrec :: ReadPrec [BatchGetQueryExecution]
readPrec :: ReadPrec BatchGetQueryExecution
$creadPrec :: ReadPrec BatchGetQueryExecution
readList :: ReadS [BatchGetQueryExecution]
$creadList :: ReadS [BatchGetQueryExecution]
readsPrec :: Int -> ReadS BatchGetQueryExecution
$creadsPrec :: Int -> ReadS BatchGetQueryExecution
Prelude.Read, Int -> BatchGetQueryExecution -> ShowS
[BatchGetQueryExecution] -> ShowS
BatchGetQueryExecution -> String
(Int -> BatchGetQueryExecution -> ShowS)
-> (BatchGetQueryExecution -> String)
-> ([BatchGetQueryExecution] -> ShowS)
-> Show BatchGetQueryExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetQueryExecution] -> ShowS
$cshowList :: [BatchGetQueryExecution] -> ShowS
show :: BatchGetQueryExecution -> String
$cshow :: BatchGetQueryExecution -> String
showsPrec :: Int -> BatchGetQueryExecution -> ShowS
$cshowsPrec :: Int -> BatchGetQueryExecution -> ShowS
Prelude.Show, (forall x. BatchGetQueryExecution -> Rep BatchGetQueryExecution x)
-> (forall x.
    Rep BatchGetQueryExecution x -> BatchGetQueryExecution)
-> Generic BatchGetQueryExecution
forall x. Rep BatchGetQueryExecution x -> BatchGetQueryExecution
forall x. BatchGetQueryExecution -> Rep BatchGetQueryExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchGetQueryExecution x -> BatchGetQueryExecution
$cfrom :: forall x. BatchGetQueryExecution -> Rep BatchGetQueryExecution x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetQueryExecution' 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:
--
-- 'queryExecutionIds', 'batchGetQueryExecution_queryExecutionIds' - An array of query execution IDs.
newBatchGetQueryExecution ::
  -- | 'queryExecutionIds'
  Prelude.NonEmpty Prelude.Text ->
  BatchGetQueryExecution
newBatchGetQueryExecution :: NonEmpty Text -> BatchGetQueryExecution
newBatchGetQueryExecution NonEmpty Text
pQueryExecutionIds_ =
  BatchGetQueryExecution' :: NonEmpty Text -> BatchGetQueryExecution
BatchGetQueryExecution'
    { $sel:queryExecutionIds:BatchGetQueryExecution' :: NonEmpty Text
queryExecutionIds =
        Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
 -> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pQueryExecutionIds_
    }

-- | An array of query execution IDs.
batchGetQueryExecution_queryExecutionIds :: Lens.Lens' BatchGetQueryExecution (Prelude.NonEmpty Prelude.Text)
batchGetQueryExecution_queryExecutionIds :: (NonEmpty Text -> f (NonEmpty Text))
-> BatchGetQueryExecution -> f BatchGetQueryExecution
batchGetQueryExecution_queryExecutionIds = (BatchGetQueryExecution -> NonEmpty Text)
-> (BatchGetQueryExecution
    -> NonEmpty Text -> BatchGetQueryExecution)
-> Lens
     BatchGetQueryExecution
     BatchGetQueryExecution
     (NonEmpty Text)
     (NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetQueryExecution' {NonEmpty Text
queryExecutionIds :: NonEmpty Text
$sel:queryExecutionIds:BatchGetQueryExecution' :: BatchGetQueryExecution -> NonEmpty Text
queryExecutionIds} -> NonEmpty Text
queryExecutionIds) (\s :: BatchGetQueryExecution
s@BatchGetQueryExecution' {} NonEmpty Text
a -> BatchGetQueryExecution
s {$sel:queryExecutionIds:BatchGetQueryExecution' :: NonEmpty Text
queryExecutionIds = NonEmpty Text
a} :: BatchGetQueryExecution) ((NonEmpty Text -> f (NonEmpty Text))
 -> BatchGetQueryExecution -> f BatchGetQueryExecution)
-> ((NonEmpty Text -> f (NonEmpty Text))
    -> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> BatchGetQueryExecution
-> f BatchGetQueryExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData BatchGetQueryExecution

instance Core.ToHeaders BatchGetQueryExecution where
  toHeaders :: BatchGetQueryExecution -> ResponseHeaders
toHeaders =
    ResponseHeaders -> BatchGetQueryExecution -> 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
"AmazonAthena.BatchGetQueryExecution" ::
                          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 BatchGetQueryExecution where
  toJSON :: BatchGetQueryExecution -> Value
toJSON BatchGetQueryExecution' {NonEmpty Text
queryExecutionIds :: NonEmpty Text
$sel:queryExecutionIds:BatchGetQueryExecution' :: BatchGetQueryExecution -> NonEmpty Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"QueryExecutionIds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
queryExecutionIds)
          ]
      )

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

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

-- | /See:/ 'newBatchGetQueryExecutionResponse' smart constructor.
data BatchGetQueryExecutionResponse = BatchGetQueryExecutionResponse'
  { -- | Information about the query executions that failed to run.
    BatchGetQueryExecutionResponse
-> Maybe [UnprocessedQueryExecutionId]
unprocessedQueryExecutionIds :: Prelude.Maybe [UnprocessedQueryExecutionId],
    -- | Information about a query execution.
    BatchGetQueryExecutionResponse -> Maybe [QueryExecution]
queryExecutions :: Prelude.Maybe [QueryExecution],
    -- | The response's http status code.
    BatchGetQueryExecutionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BatchGetQueryExecutionResponse
-> BatchGetQueryExecutionResponse -> Bool
(BatchGetQueryExecutionResponse
 -> BatchGetQueryExecutionResponse -> Bool)
-> (BatchGetQueryExecutionResponse
    -> BatchGetQueryExecutionResponse -> Bool)
-> Eq BatchGetQueryExecutionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetQueryExecutionResponse
-> BatchGetQueryExecutionResponse -> Bool
$c/= :: BatchGetQueryExecutionResponse
-> BatchGetQueryExecutionResponse -> Bool
== :: BatchGetQueryExecutionResponse
-> BatchGetQueryExecutionResponse -> Bool
$c== :: BatchGetQueryExecutionResponse
-> BatchGetQueryExecutionResponse -> Bool
Prelude.Eq, ReadPrec [BatchGetQueryExecutionResponse]
ReadPrec BatchGetQueryExecutionResponse
Int -> ReadS BatchGetQueryExecutionResponse
ReadS [BatchGetQueryExecutionResponse]
(Int -> ReadS BatchGetQueryExecutionResponse)
-> ReadS [BatchGetQueryExecutionResponse]
-> ReadPrec BatchGetQueryExecutionResponse
-> ReadPrec [BatchGetQueryExecutionResponse]
-> Read BatchGetQueryExecutionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetQueryExecutionResponse]
$creadListPrec :: ReadPrec [BatchGetQueryExecutionResponse]
readPrec :: ReadPrec BatchGetQueryExecutionResponse
$creadPrec :: ReadPrec BatchGetQueryExecutionResponse
readList :: ReadS [BatchGetQueryExecutionResponse]
$creadList :: ReadS [BatchGetQueryExecutionResponse]
readsPrec :: Int -> ReadS BatchGetQueryExecutionResponse
$creadsPrec :: Int -> ReadS BatchGetQueryExecutionResponse
Prelude.Read, Int -> BatchGetQueryExecutionResponse -> ShowS
[BatchGetQueryExecutionResponse] -> ShowS
BatchGetQueryExecutionResponse -> String
(Int -> BatchGetQueryExecutionResponse -> ShowS)
-> (BatchGetQueryExecutionResponse -> String)
-> ([BatchGetQueryExecutionResponse] -> ShowS)
-> Show BatchGetQueryExecutionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetQueryExecutionResponse] -> ShowS
$cshowList :: [BatchGetQueryExecutionResponse] -> ShowS
show :: BatchGetQueryExecutionResponse -> String
$cshow :: BatchGetQueryExecutionResponse -> String
showsPrec :: Int -> BatchGetQueryExecutionResponse -> ShowS
$cshowsPrec :: Int -> BatchGetQueryExecutionResponse -> ShowS
Prelude.Show, (forall x.
 BatchGetQueryExecutionResponse
 -> Rep BatchGetQueryExecutionResponse x)
-> (forall x.
    Rep BatchGetQueryExecutionResponse x
    -> BatchGetQueryExecutionResponse)
-> Generic BatchGetQueryExecutionResponse
forall x.
Rep BatchGetQueryExecutionResponse x
-> BatchGetQueryExecutionResponse
forall x.
BatchGetQueryExecutionResponse
-> Rep BatchGetQueryExecutionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetQueryExecutionResponse x
-> BatchGetQueryExecutionResponse
$cfrom :: forall x.
BatchGetQueryExecutionResponse
-> Rep BatchGetQueryExecutionResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetQueryExecutionResponse' 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:
--
-- 'unprocessedQueryExecutionIds', 'batchGetQueryExecutionResponse_unprocessedQueryExecutionIds' - Information about the query executions that failed to run.
--
-- 'queryExecutions', 'batchGetQueryExecutionResponse_queryExecutions' - Information about a query execution.
--
-- 'httpStatus', 'batchGetQueryExecutionResponse_httpStatus' - The response's http status code.
newBatchGetQueryExecutionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchGetQueryExecutionResponse
newBatchGetQueryExecutionResponse :: Int -> BatchGetQueryExecutionResponse
newBatchGetQueryExecutionResponse Int
pHttpStatus_ =
  BatchGetQueryExecutionResponse' :: Maybe [UnprocessedQueryExecutionId]
-> Maybe [QueryExecution] -> Int -> BatchGetQueryExecutionResponse
BatchGetQueryExecutionResponse'
    { $sel:unprocessedQueryExecutionIds:BatchGetQueryExecutionResponse' :: Maybe [UnprocessedQueryExecutionId]
unprocessedQueryExecutionIds =
        Maybe [UnprocessedQueryExecutionId]
forall a. Maybe a
Prelude.Nothing,
      $sel:queryExecutions:BatchGetQueryExecutionResponse' :: Maybe [QueryExecution]
queryExecutions = Maybe [QueryExecution]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:BatchGetQueryExecutionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the query executions that failed to run.
batchGetQueryExecutionResponse_unprocessedQueryExecutionIds :: Lens.Lens' BatchGetQueryExecutionResponse (Prelude.Maybe [UnprocessedQueryExecutionId])
batchGetQueryExecutionResponse_unprocessedQueryExecutionIds :: (Maybe [UnprocessedQueryExecutionId]
 -> f (Maybe [UnprocessedQueryExecutionId]))
-> BatchGetQueryExecutionResponse
-> f BatchGetQueryExecutionResponse
batchGetQueryExecutionResponse_unprocessedQueryExecutionIds = (BatchGetQueryExecutionResponse
 -> Maybe [UnprocessedQueryExecutionId])
-> (BatchGetQueryExecutionResponse
    -> Maybe [UnprocessedQueryExecutionId]
    -> BatchGetQueryExecutionResponse)
-> Lens
     BatchGetQueryExecutionResponse
     BatchGetQueryExecutionResponse
     (Maybe [UnprocessedQueryExecutionId])
     (Maybe [UnprocessedQueryExecutionId])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetQueryExecutionResponse' {Maybe [UnprocessedQueryExecutionId]
unprocessedQueryExecutionIds :: Maybe [UnprocessedQueryExecutionId]
$sel:unprocessedQueryExecutionIds:BatchGetQueryExecutionResponse' :: BatchGetQueryExecutionResponse
-> Maybe [UnprocessedQueryExecutionId]
unprocessedQueryExecutionIds} -> Maybe [UnprocessedQueryExecutionId]
unprocessedQueryExecutionIds) (\s :: BatchGetQueryExecutionResponse
s@BatchGetQueryExecutionResponse' {} Maybe [UnprocessedQueryExecutionId]
a -> BatchGetQueryExecutionResponse
s {$sel:unprocessedQueryExecutionIds:BatchGetQueryExecutionResponse' :: Maybe [UnprocessedQueryExecutionId]
unprocessedQueryExecutionIds = Maybe [UnprocessedQueryExecutionId]
a} :: BatchGetQueryExecutionResponse) ((Maybe [UnprocessedQueryExecutionId]
  -> f (Maybe [UnprocessedQueryExecutionId]))
 -> BatchGetQueryExecutionResponse
 -> f BatchGetQueryExecutionResponse)
-> ((Maybe [UnprocessedQueryExecutionId]
     -> f (Maybe [UnprocessedQueryExecutionId]))
    -> Maybe [UnprocessedQueryExecutionId]
    -> f (Maybe [UnprocessedQueryExecutionId]))
-> (Maybe [UnprocessedQueryExecutionId]
    -> f (Maybe [UnprocessedQueryExecutionId]))
-> BatchGetQueryExecutionResponse
-> f BatchGetQueryExecutionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [UnprocessedQueryExecutionId]
  [UnprocessedQueryExecutionId]
  [UnprocessedQueryExecutionId]
  [UnprocessedQueryExecutionId]
-> Iso
     (Maybe [UnprocessedQueryExecutionId])
     (Maybe [UnprocessedQueryExecutionId])
     (Maybe [UnprocessedQueryExecutionId])
     (Maybe [UnprocessedQueryExecutionId])
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
  [UnprocessedQueryExecutionId]
  [UnprocessedQueryExecutionId]
  [UnprocessedQueryExecutionId]
  [UnprocessedQueryExecutionId]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about a query execution.
batchGetQueryExecutionResponse_queryExecutions :: Lens.Lens' BatchGetQueryExecutionResponse (Prelude.Maybe [QueryExecution])
batchGetQueryExecutionResponse_queryExecutions :: (Maybe [QueryExecution] -> f (Maybe [QueryExecution]))
-> BatchGetQueryExecutionResponse
-> f BatchGetQueryExecutionResponse
batchGetQueryExecutionResponse_queryExecutions = (BatchGetQueryExecutionResponse -> Maybe [QueryExecution])
-> (BatchGetQueryExecutionResponse
    -> Maybe [QueryExecution] -> BatchGetQueryExecutionResponse)
-> Lens
     BatchGetQueryExecutionResponse
     BatchGetQueryExecutionResponse
     (Maybe [QueryExecution])
     (Maybe [QueryExecution])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetQueryExecutionResponse' {Maybe [QueryExecution]
queryExecutions :: Maybe [QueryExecution]
$sel:queryExecutions:BatchGetQueryExecutionResponse' :: BatchGetQueryExecutionResponse -> Maybe [QueryExecution]
queryExecutions} -> Maybe [QueryExecution]
queryExecutions) (\s :: BatchGetQueryExecutionResponse
s@BatchGetQueryExecutionResponse' {} Maybe [QueryExecution]
a -> BatchGetQueryExecutionResponse
s {$sel:queryExecutions:BatchGetQueryExecutionResponse' :: Maybe [QueryExecution]
queryExecutions = Maybe [QueryExecution]
a} :: BatchGetQueryExecutionResponse) ((Maybe [QueryExecution] -> f (Maybe [QueryExecution]))
 -> BatchGetQueryExecutionResponse
 -> f BatchGetQueryExecutionResponse)
-> ((Maybe [QueryExecution] -> f (Maybe [QueryExecution]))
    -> Maybe [QueryExecution] -> f (Maybe [QueryExecution]))
-> (Maybe [QueryExecution] -> f (Maybe [QueryExecution]))
-> BatchGetQueryExecutionResponse
-> f BatchGetQueryExecutionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [QueryExecution] [QueryExecution] [QueryExecution] [QueryExecution]
-> Iso
     (Maybe [QueryExecution])
     (Maybe [QueryExecution])
     (Maybe [QueryExecution])
     (Maybe [QueryExecution])
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
  [QueryExecution] [QueryExecution] [QueryExecution] [QueryExecution]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    BatchGetQueryExecutionResponse