{-# 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.BatchGetNamedQuery
-- 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 named query or a list of up to 50
-- queries, which you provide as an array of query ID strings. Requires you
-- to have access to the workgroup in which the queries were saved. Use
-- ListNamedQueriesInput to get the list of named query IDs in the
-- specified workgroup. If information could not be retrieved for a
-- submitted query ID, information about the query ID submitted is listed
-- under UnprocessedNamedQueryId. Named queries differ from executed
-- queries. Use BatchGetQueryExecutionInput to get details about each
-- unique query execution, and ListQueryExecutionsInput to get a list of
-- query execution IDs.
module Amazonka.Athena.BatchGetNamedQuery
  ( -- * Creating a Request
    BatchGetNamedQuery (..),
    newBatchGetNamedQuery,

    -- * Request Lenses
    batchGetNamedQuery_namedQueryIds,

    -- * Destructuring the Response
    BatchGetNamedQueryResponse (..),
    newBatchGetNamedQueryResponse,

    -- * Response Lenses
    batchGetNamedQueryResponse_namedQueries,
    batchGetNamedQueryResponse_unprocessedNamedQueryIds,
    batchGetNamedQueryResponse_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:/ 'newBatchGetNamedQuery' smart constructor.
data BatchGetNamedQuery = BatchGetNamedQuery'
  { -- | An array of query IDs.
    BatchGetNamedQuery -> NonEmpty Text
namedQueryIds :: Prelude.NonEmpty Prelude.Text
  }
  deriving (BatchGetNamedQuery -> BatchGetNamedQuery -> Bool
(BatchGetNamedQuery -> BatchGetNamedQuery -> Bool)
-> (BatchGetNamedQuery -> BatchGetNamedQuery -> Bool)
-> Eq BatchGetNamedQuery
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetNamedQuery -> BatchGetNamedQuery -> Bool
$c/= :: BatchGetNamedQuery -> BatchGetNamedQuery -> Bool
== :: BatchGetNamedQuery -> BatchGetNamedQuery -> Bool
$c== :: BatchGetNamedQuery -> BatchGetNamedQuery -> Bool
Prelude.Eq, ReadPrec [BatchGetNamedQuery]
ReadPrec BatchGetNamedQuery
Int -> ReadS BatchGetNamedQuery
ReadS [BatchGetNamedQuery]
(Int -> ReadS BatchGetNamedQuery)
-> ReadS [BatchGetNamedQuery]
-> ReadPrec BatchGetNamedQuery
-> ReadPrec [BatchGetNamedQuery]
-> Read BatchGetNamedQuery
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetNamedQuery]
$creadListPrec :: ReadPrec [BatchGetNamedQuery]
readPrec :: ReadPrec BatchGetNamedQuery
$creadPrec :: ReadPrec BatchGetNamedQuery
readList :: ReadS [BatchGetNamedQuery]
$creadList :: ReadS [BatchGetNamedQuery]
readsPrec :: Int -> ReadS BatchGetNamedQuery
$creadsPrec :: Int -> ReadS BatchGetNamedQuery
Prelude.Read, Int -> BatchGetNamedQuery -> ShowS
[BatchGetNamedQuery] -> ShowS
BatchGetNamedQuery -> String
(Int -> BatchGetNamedQuery -> ShowS)
-> (BatchGetNamedQuery -> String)
-> ([BatchGetNamedQuery] -> ShowS)
-> Show BatchGetNamedQuery
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetNamedQuery] -> ShowS
$cshowList :: [BatchGetNamedQuery] -> ShowS
show :: BatchGetNamedQuery -> String
$cshow :: BatchGetNamedQuery -> String
showsPrec :: Int -> BatchGetNamedQuery -> ShowS
$cshowsPrec :: Int -> BatchGetNamedQuery -> ShowS
Prelude.Show, (forall x. BatchGetNamedQuery -> Rep BatchGetNamedQuery x)
-> (forall x. Rep BatchGetNamedQuery x -> BatchGetNamedQuery)
-> Generic BatchGetNamedQuery
forall x. Rep BatchGetNamedQuery x -> BatchGetNamedQuery
forall x. BatchGetNamedQuery -> Rep BatchGetNamedQuery x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchGetNamedQuery x -> BatchGetNamedQuery
$cfrom :: forall x. BatchGetNamedQuery -> Rep BatchGetNamedQuery x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetNamedQuery' 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:
--
-- 'namedQueryIds', 'batchGetNamedQuery_namedQueryIds' - An array of query IDs.
newBatchGetNamedQuery ::
  -- | 'namedQueryIds'
  Prelude.NonEmpty Prelude.Text ->
  BatchGetNamedQuery
newBatchGetNamedQuery :: NonEmpty Text -> BatchGetNamedQuery
newBatchGetNamedQuery NonEmpty Text
pNamedQueryIds_ =
  BatchGetNamedQuery' :: NonEmpty Text -> BatchGetNamedQuery
BatchGetNamedQuery'
    { $sel:namedQueryIds:BatchGetNamedQuery' :: NonEmpty Text
namedQueryIds =
        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
pNamedQueryIds_
    }

-- | An array of query IDs.
batchGetNamedQuery_namedQueryIds :: Lens.Lens' BatchGetNamedQuery (Prelude.NonEmpty Prelude.Text)
batchGetNamedQuery_namedQueryIds :: (NonEmpty Text -> f (NonEmpty Text))
-> BatchGetNamedQuery -> f BatchGetNamedQuery
batchGetNamedQuery_namedQueryIds = (BatchGetNamedQuery -> NonEmpty Text)
-> (BatchGetNamedQuery -> NonEmpty Text -> BatchGetNamedQuery)
-> Lens
     BatchGetNamedQuery
     BatchGetNamedQuery
     (NonEmpty Text)
     (NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetNamedQuery' {NonEmpty Text
namedQueryIds :: NonEmpty Text
$sel:namedQueryIds:BatchGetNamedQuery' :: BatchGetNamedQuery -> NonEmpty Text
namedQueryIds} -> NonEmpty Text
namedQueryIds) (\s :: BatchGetNamedQuery
s@BatchGetNamedQuery' {} NonEmpty Text
a -> BatchGetNamedQuery
s {$sel:namedQueryIds:BatchGetNamedQuery' :: NonEmpty Text
namedQueryIds = NonEmpty Text
a} :: BatchGetNamedQuery) ((NonEmpty Text -> f (NonEmpty Text))
 -> BatchGetNamedQuery -> f BatchGetNamedQuery)
-> ((NonEmpty Text -> f (NonEmpty Text))
    -> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> BatchGetNamedQuery
-> f BatchGetNamedQuery
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 BatchGetNamedQuery where
  type
    AWSResponse BatchGetNamedQuery =
      BatchGetNamedQueryResponse
  request :: BatchGetNamedQuery -> Request BatchGetNamedQuery
request = Service -> BatchGetNamedQuery -> Request BatchGetNamedQuery
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy BatchGetNamedQuery
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchGetNamedQuery)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse BatchGetNamedQuery))
-> Logger
-> Service
-> Proxy BatchGetNamedQuery
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchGetNamedQuery)))
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 [NamedQuery]
-> Maybe [UnprocessedNamedQueryId]
-> Int
-> BatchGetNamedQueryResponse
BatchGetNamedQueryResponse'
            (Maybe [NamedQuery]
 -> Maybe [UnprocessedNamedQueryId]
 -> Int
 -> BatchGetNamedQueryResponse)
-> Either String (Maybe [NamedQuery])
-> Either
     String
     (Maybe [UnprocessedNamedQueryId]
      -> Int -> BatchGetNamedQueryResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [NamedQuery]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NamedQueries" Either String (Maybe (Maybe [NamedQuery]))
-> Maybe [NamedQuery] -> Either String (Maybe [NamedQuery])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [NamedQuery]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe [UnprocessedNamedQueryId]
   -> Int -> BatchGetNamedQueryResponse)
-> Either String (Maybe [UnprocessedNamedQueryId])
-> Either String (Int -> BatchGetNamedQueryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [UnprocessedNamedQueryId]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"UnprocessedNamedQueryIds"
                            Either String (Maybe (Maybe [UnprocessedNamedQueryId]))
-> Maybe [UnprocessedNamedQueryId]
-> Either String (Maybe [UnprocessedNamedQueryId])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [UnprocessedNamedQueryId]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> BatchGetNamedQueryResponse)
-> Either String Int -> Either String BatchGetNamedQueryResponse
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 BatchGetNamedQuery

instance Prelude.NFData BatchGetNamedQuery

instance Core.ToHeaders BatchGetNamedQuery where
  toHeaders :: BatchGetNamedQuery -> ResponseHeaders
toHeaders =
    ResponseHeaders -> BatchGetNamedQuery -> 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.BatchGetNamedQuery" ::
                          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 BatchGetNamedQuery where
  toJSON :: BatchGetNamedQuery -> Value
toJSON BatchGetNamedQuery' {NonEmpty Text
namedQueryIds :: NonEmpty Text
$sel:namedQueryIds:BatchGetNamedQuery' :: BatchGetNamedQuery -> 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
"NamedQueryIds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
namedQueryIds)
          ]
      )

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

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

-- | /See:/ 'newBatchGetNamedQueryResponse' smart constructor.
data BatchGetNamedQueryResponse = BatchGetNamedQueryResponse'
  { -- | Information about the named query IDs submitted.
    BatchGetNamedQueryResponse -> Maybe [NamedQuery]
namedQueries :: Prelude.Maybe [NamedQuery],
    -- | Information about provided query IDs.
    BatchGetNamedQueryResponse -> Maybe [UnprocessedNamedQueryId]
unprocessedNamedQueryIds :: Prelude.Maybe [UnprocessedNamedQueryId],
    -- | The response's http status code.
    BatchGetNamedQueryResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BatchGetNamedQueryResponse -> BatchGetNamedQueryResponse -> Bool
(BatchGetNamedQueryResponse -> BatchGetNamedQueryResponse -> Bool)
-> (BatchGetNamedQueryResponse
    -> BatchGetNamedQueryResponse -> Bool)
-> Eq BatchGetNamedQueryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetNamedQueryResponse -> BatchGetNamedQueryResponse -> Bool
$c/= :: BatchGetNamedQueryResponse -> BatchGetNamedQueryResponse -> Bool
== :: BatchGetNamedQueryResponse -> BatchGetNamedQueryResponse -> Bool
$c== :: BatchGetNamedQueryResponse -> BatchGetNamedQueryResponse -> Bool
Prelude.Eq, ReadPrec [BatchGetNamedQueryResponse]
ReadPrec BatchGetNamedQueryResponse
Int -> ReadS BatchGetNamedQueryResponse
ReadS [BatchGetNamedQueryResponse]
(Int -> ReadS BatchGetNamedQueryResponse)
-> ReadS [BatchGetNamedQueryResponse]
-> ReadPrec BatchGetNamedQueryResponse
-> ReadPrec [BatchGetNamedQueryResponse]
-> Read BatchGetNamedQueryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetNamedQueryResponse]
$creadListPrec :: ReadPrec [BatchGetNamedQueryResponse]
readPrec :: ReadPrec BatchGetNamedQueryResponse
$creadPrec :: ReadPrec BatchGetNamedQueryResponse
readList :: ReadS [BatchGetNamedQueryResponse]
$creadList :: ReadS [BatchGetNamedQueryResponse]
readsPrec :: Int -> ReadS BatchGetNamedQueryResponse
$creadsPrec :: Int -> ReadS BatchGetNamedQueryResponse
Prelude.Read, Int -> BatchGetNamedQueryResponse -> ShowS
[BatchGetNamedQueryResponse] -> ShowS
BatchGetNamedQueryResponse -> String
(Int -> BatchGetNamedQueryResponse -> ShowS)
-> (BatchGetNamedQueryResponse -> String)
-> ([BatchGetNamedQueryResponse] -> ShowS)
-> Show BatchGetNamedQueryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetNamedQueryResponse] -> ShowS
$cshowList :: [BatchGetNamedQueryResponse] -> ShowS
show :: BatchGetNamedQueryResponse -> String
$cshow :: BatchGetNamedQueryResponse -> String
showsPrec :: Int -> BatchGetNamedQueryResponse -> ShowS
$cshowsPrec :: Int -> BatchGetNamedQueryResponse -> ShowS
Prelude.Show, (forall x.
 BatchGetNamedQueryResponse -> Rep BatchGetNamedQueryResponse x)
-> (forall x.
    Rep BatchGetNamedQueryResponse x -> BatchGetNamedQueryResponse)
-> Generic BatchGetNamedQueryResponse
forall x.
Rep BatchGetNamedQueryResponse x -> BatchGetNamedQueryResponse
forall x.
BatchGetNamedQueryResponse -> Rep BatchGetNamedQueryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetNamedQueryResponse x -> BatchGetNamedQueryResponse
$cfrom :: forall x.
BatchGetNamedQueryResponse -> Rep BatchGetNamedQueryResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetNamedQueryResponse' 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:
--
-- 'namedQueries', 'batchGetNamedQueryResponse_namedQueries' - Information about the named query IDs submitted.
--
-- 'unprocessedNamedQueryIds', 'batchGetNamedQueryResponse_unprocessedNamedQueryIds' - Information about provided query IDs.
--
-- 'httpStatus', 'batchGetNamedQueryResponse_httpStatus' - The response's http status code.
newBatchGetNamedQueryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchGetNamedQueryResponse
newBatchGetNamedQueryResponse :: Int -> BatchGetNamedQueryResponse
newBatchGetNamedQueryResponse Int
pHttpStatus_ =
  BatchGetNamedQueryResponse' :: Maybe [NamedQuery]
-> Maybe [UnprocessedNamedQueryId]
-> Int
-> BatchGetNamedQueryResponse
BatchGetNamedQueryResponse'
    { $sel:namedQueries:BatchGetNamedQueryResponse' :: Maybe [NamedQuery]
namedQueries =
        Maybe [NamedQuery]
forall a. Maybe a
Prelude.Nothing,
      $sel:unprocessedNamedQueryIds:BatchGetNamedQueryResponse' :: Maybe [UnprocessedNamedQueryId]
unprocessedNamedQueryIds = Maybe [UnprocessedNamedQueryId]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:BatchGetNamedQueryResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the named query IDs submitted.
batchGetNamedQueryResponse_namedQueries :: Lens.Lens' BatchGetNamedQueryResponse (Prelude.Maybe [NamedQuery])
batchGetNamedQueryResponse_namedQueries :: (Maybe [NamedQuery] -> f (Maybe [NamedQuery]))
-> BatchGetNamedQueryResponse -> f BatchGetNamedQueryResponse
batchGetNamedQueryResponse_namedQueries = (BatchGetNamedQueryResponse -> Maybe [NamedQuery])
-> (BatchGetNamedQueryResponse
    -> Maybe [NamedQuery] -> BatchGetNamedQueryResponse)
-> Lens
     BatchGetNamedQueryResponse
     BatchGetNamedQueryResponse
     (Maybe [NamedQuery])
     (Maybe [NamedQuery])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetNamedQueryResponse' {Maybe [NamedQuery]
namedQueries :: Maybe [NamedQuery]
$sel:namedQueries:BatchGetNamedQueryResponse' :: BatchGetNamedQueryResponse -> Maybe [NamedQuery]
namedQueries} -> Maybe [NamedQuery]
namedQueries) (\s :: BatchGetNamedQueryResponse
s@BatchGetNamedQueryResponse' {} Maybe [NamedQuery]
a -> BatchGetNamedQueryResponse
s {$sel:namedQueries:BatchGetNamedQueryResponse' :: Maybe [NamedQuery]
namedQueries = Maybe [NamedQuery]
a} :: BatchGetNamedQueryResponse) ((Maybe [NamedQuery] -> f (Maybe [NamedQuery]))
 -> BatchGetNamedQueryResponse -> f BatchGetNamedQueryResponse)
-> ((Maybe [NamedQuery] -> f (Maybe [NamedQuery]))
    -> Maybe [NamedQuery] -> f (Maybe [NamedQuery]))
-> (Maybe [NamedQuery] -> f (Maybe [NamedQuery]))
-> BatchGetNamedQueryResponse
-> f BatchGetNamedQueryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [NamedQuery] [NamedQuery] [NamedQuery] [NamedQuery]
-> Iso
     (Maybe [NamedQuery])
     (Maybe [NamedQuery])
     (Maybe [NamedQuery])
     (Maybe [NamedQuery])
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 [NamedQuery] [NamedQuery] [NamedQuery] [NamedQuery]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about provided query IDs.
batchGetNamedQueryResponse_unprocessedNamedQueryIds :: Lens.Lens' BatchGetNamedQueryResponse (Prelude.Maybe [UnprocessedNamedQueryId])
batchGetNamedQueryResponse_unprocessedNamedQueryIds :: (Maybe [UnprocessedNamedQueryId]
 -> f (Maybe [UnprocessedNamedQueryId]))
-> BatchGetNamedQueryResponse -> f BatchGetNamedQueryResponse
batchGetNamedQueryResponse_unprocessedNamedQueryIds = (BatchGetNamedQueryResponse -> Maybe [UnprocessedNamedQueryId])
-> (BatchGetNamedQueryResponse
    -> Maybe [UnprocessedNamedQueryId] -> BatchGetNamedQueryResponse)
-> Lens
     BatchGetNamedQueryResponse
     BatchGetNamedQueryResponse
     (Maybe [UnprocessedNamedQueryId])
     (Maybe [UnprocessedNamedQueryId])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetNamedQueryResponse' {Maybe [UnprocessedNamedQueryId]
unprocessedNamedQueryIds :: Maybe [UnprocessedNamedQueryId]
$sel:unprocessedNamedQueryIds:BatchGetNamedQueryResponse' :: BatchGetNamedQueryResponse -> Maybe [UnprocessedNamedQueryId]
unprocessedNamedQueryIds} -> Maybe [UnprocessedNamedQueryId]
unprocessedNamedQueryIds) (\s :: BatchGetNamedQueryResponse
s@BatchGetNamedQueryResponse' {} Maybe [UnprocessedNamedQueryId]
a -> BatchGetNamedQueryResponse
s {$sel:unprocessedNamedQueryIds:BatchGetNamedQueryResponse' :: Maybe [UnprocessedNamedQueryId]
unprocessedNamedQueryIds = Maybe [UnprocessedNamedQueryId]
a} :: BatchGetNamedQueryResponse) ((Maybe [UnprocessedNamedQueryId]
  -> f (Maybe [UnprocessedNamedQueryId]))
 -> BatchGetNamedQueryResponse -> f BatchGetNamedQueryResponse)
-> ((Maybe [UnprocessedNamedQueryId]
     -> f (Maybe [UnprocessedNamedQueryId]))
    -> Maybe [UnprocessedNamedQueryId]
    -> f (Maybe [UnprocessedNamedQueryId]))
-> (Maybe [UnprocessedNamedQueryId]
    -> f (Maybe [UnprocessedNamedQueryId]))
-> BatchGetNamedQueryResponse
-> f BatchGetNamedQueryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [UnprocessedNamedQueryId]
  [UnprocessedNamedQueryId]
  [UnprocessedNamedQueryId]
  [UnprocessedNamedQueryId]
-> Iso
     (Maybe [UnprocessedNamedQueryId])
     (Maybe [UnprocessedNamedQueryId])
     (Maybe [UnprocessedNamedQueryId])
     (Maybe [UnprocessedNamedQueryId])
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
  [UnprocessedNamedQueryId]
  [UnprocessedNamedQueryId]
  [UnprocessedNamedQueryId]
  [UnprocessedNamedQueryId]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData BatchGetNamedQueryResponse