{-# 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.ListPreparedStatements
-- 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)
--
-- Lists the prepared statements in the specfied workgroup.
module Amazonka.Athena.ListPreparedStatements
  ( -- * Creating a Request
    ListPreparedStatements (..),
    newListPreparedStatements,

    -- * Request Lenses
    listPreparedStatements_nextToken,
    listPreparedStatements_maxResults,
    listPreparedStatements_workGroup,

    -- * Destructuring the Response
    ListPreparedStatementsResponse (..),
    newListPreparedStatementsResponse,

    -- * Response Lenses
    listPreparedStatementsResponse_preparedStatements,
    listPreparedStatementsResponse_nextToken,
    listPreparedStatementsResponse_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:/ 'newListPreparedStatements' smart constructor.
data ListPreparedStatements = ListPreparedStatements'
  { -- | A token generated by the Athena service that specifies where to continue
    -- pagination if a previous request was truncated. To obtain the next set
    -- of pages, pass in the @NextToken@ from the response object of the
    -- previous page call.
    ListPreparedStatements -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in this request.
    ListPreparedStatements -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The workgroup to list the prepared statements for.
    ListPreparedStatements -> Text
workGroup :: Prelude.Text
  }
  deriving (ListPreparedStatements -> ListPreparedStatements -> Bool
(ListPreparedStatements -> ListPreparedStatements -> Bool)
-> (ListPreparedStatements -> ListPreparedStatements -> Bool)
-> Eq ListPreparedStatements
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPreparedStatements -> ListPreparedStatements -> Bool
$c/= :: ListPreparedStatements -> ListPreparedStatements -> Bool
== :: ListPreparedStatements -> ListPreparedStatements -> Bool
$c== :: ListPreparedStatements -> ListPreparedStatements -> Bool
Prelude.Eq, ReadPrec [ListPreparedStatements]
ReadPrec ListPreparedStatements
Int -> ReadS ListPreparedStatements
ReadS [ListPreparedStatements]
(Int -> ReadS ListPreparedStatements)
-> ReadS [ListPreparedStatements]
-> ReadPrec ListPreparedStatements
-> ReadPrec [ListPreparedStatements]
-> Read ListPreparedStatements
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPreparedStatements]
$creadListPrec :: ReadPrec [ListPreparedStatements]
readPrec :: ReadPrec ListPreparedStatements
$creadPrec :: ReadPrec ListPreparedStatements
readList :: ReadS [ListPreparedStatements]
$creadList :: ReadS [ListPreparedStatements]
readsPrec :: Int -> ReadS ListPreparedStatements
$creadsPrec :: Int -> ReadS ListPreparedStatements
Prelude.Read, Int -> ListPreparedStatements -> ShowS
[ListPreparedStatements] -> ShowS
ListPreparedStatements -> String
(Int -> ListPreparedStatements -> ShowS)
-> (ListPreparedStatements -> String)
-> ([ListPreparedStatements] -> ShowS)
-> Show ListPreparedStatements
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPreparedStatements] -> ShowS
$cshowList :: [ListPreparedStatements] -> ShowS
show :: ListPreparedStatements -> String
$cshow :: ListPreparedStatements -> String
showsPrec :: Int -> ListPreparedStatements -> ShowS
$cshowsPrec :: Int -> ListPreparedStatements -> ShowS
Prelude.Show, (forall x. ListPreparedStatements -> Rep ListPreparedStatements x)
-> (forall x.
    Rep ListPreparedStatements x -> ListPreparedStatements)
-> Generic ListPreparedStatements
forall x. Rep ListPreparedStatements x -> ListPreparedStatements
forall x. ListPreparedStatements -> Rep ListPreparedStatements x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListPreparedStatements x -> ListPreparedStatements
$cfrom :: forall x. ListPreparedStatements -> Rep ListPreparedStatements x
Prelude.Generic)

-- |
-- Create a value of 'ListPreparedStatements' 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:
--
-- 'nextToken', 'listPreparedStatements_nextToken' - A token generated by the Athena service that specifies where to continue
-- pagination if a previous request was truncated. To obtain the next set
-- of pages, pass in the @NextToken@ from the response object of the
-- previous page call.
--
-- 'maxResults', 'listPreparedStatements_maxResults' - The maximum number of results to return in this request.
--
-- 'workGroup', 'listPreparedStatements_workGroup' - The workgroup to list the prepared statements for.
newListPreparedStatements ::
  -- | 'workGroup'
  Prelude.Text ->
  ListPreparedStatements
newListPreparedStatements :: Text -> ListPreparedStatements
newListPreparedStatements Text
pWorkGroup_ =
  ListPreparedStatements' :: Maybe Text -> Maybe Natural -> Text -> ListPreparedStatements
ListPreparedStatements'
    { $sel:nextToken:ListPreparedStatements' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListPreparedStatements' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:workGroup:ListPreparedStatements' :: Text
workGroup = Text
pWorkGroup_
    }

-- | A token generated by the Athena service that specifies where to continue
-- pagination if a previous request was truncated. To obtain the next set
-- of pages, pass in the @NextToken@ from the response object of the
-- previous page call.
listPreparedStatements_nextToken :: Lens.Lens' ListPreparedStatements (Prelude.Maybe Prelude.Text)
listPreparedStatements_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPreparedStatements -> f ListPreparedStatements
listPreparedStatements_nextToken = (ListPreparedStatements -> Maybe Text)
-> (ListPreparedStatements -> Maybe Text -> ListPreparedStatements)
-> Lens
     ListPreparedStatements
     ListPreparedStatements
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPreparedStatements' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPreparedStatements' :: ListPreparedStatements -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPreparedStatements
s@ListPreparedStatements' {} Maybe Text
a -> ListPreparedStatements
s {$sel:nextToken:ListPreparedStatements' :: Maybe Text
nextToken = Maybe Text
a} :: ListPreparedStatements)

-- | The maximum number of results to return in this request.
listPreparedStatements_maxResults :: Lens.Lens' ListPreparedStatements (Prelude.Maybe Prelude.Natural)
listPreparedStatements_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListPreparedStatements -> f ListPreparedStatements
listPreparedStatements_maxResults = (ListPreparedStatements -> Maybe Natural)
-> (ListPreparedStatements
    -> Maybe Natural -> ListPreparedStatements)
-> Lens
     ListPreparedStatements
     ListPreparedStatements
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPreparedStatements' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListPreparedStatements' :: ListPreparedStatements -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListPreparedStatements
s@ListPreparedStatements' {} Maybe Natural
a -> ListPreparedStatements
s {$sel:maxResults:ListPreparedStatements' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListPreparedStatements)

-- | The workgroup to list the prepared statements for.
listPreparedStatements_workGroup :: Lens.Lens' ListPreparedStatements Prelude.Text
listPreparedStatements_workGroup :: (Text -> f Text)
-> ListPreparedStatements -> f ListPreparedStatements
listPreparedStatements_workGroup = (ListPreparedStatements -> Text)
-> (ListPreparedStatements -> Text -> ListPreparedStatements)
-> Lens ListPreparedStatements ListPreparedStatements Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPreparedStatements' {Text
workGroup :: Text
$sel:workGroup:ListPreparedStatements' :: ListPreparedStatements -> Text
workGroup} -> Text
workGroup) (\s :: ListPreparedStatements
s@ListPreparedStatements' {} Text
a -> ListPreparedStatements
s {$sel:workGroup:ListPreparedStatements' :: Text
workGroup = Text
a} :: ListPreparedStatements)

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

instance Prelude.NFData ListPreparedStatements

instance Core.ToHeaders ListPreparedStatements where
  toHeaders :: ListPreparedStatements -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListPreparedStatements -> 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.ListPreparedStatements" ::
                          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 ListPreparedStatements where
  toJSON :: ListPreparedStatements -> Value
toJSON ListPreparedStatements' {Maybe Natural
Maybe Text
Text
workGroup :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:workGroup:ListPreparedStatements' :: ListPreparedStatements -> Text
$sel:maxResults:ListPreparedStatements' :: ListPreparedStatements -> Maybe Natural
$sel:nextToken:ListPreparedStatements' :: ListPreparedStatements -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"WorkGroup" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
workGroup)
          ]
      )

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

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

-- | /See:/ 'newListPreparedStatementsResponse' smart constructor.
data ListPreparedStatementsResponse = ListPreparedStatementsResponse'
  { -- | The list of prepared statements for the workgroup.
    ListPreparedStatementsResponse -> Maybe [PreparedStatementSummary]
preparedStatements :: Prelude.Maybe [PreparedStatementSummary],
    -- | A token generated by the Athena service that specifies where to continue
    -- pagination if a previous request was truncated. To obtain the next set
    -- of pages, pass in the @NextToken@ from the response object of the
    -- previous page call.
    ListPreparedStatementsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListPreparedStatementsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListPreparedStatementsResponse
-> ListPreparedStatementsResponse -> Bool
(ListPreparedStatementsResponse
 -> ListPreparedStatementsResponse -> Bool)
-> (ListPreparedStatementsResponse
    -> ListPreparedStatementsResponse -> Bool)
-> Eq ListPreparedStatementsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPreparedStatementsResponse
-> ListPreparedStatementsResponse -> Bool
$c/= :: ListPreparedStatementsResponse
-> ListPreparedStatementsResponse -> Bool
== :: ListPreparedStatementsResponse
-> ListPreparedStatementsResponse -> Bool
$c== :: ListPreparedStatementsResponse
-> ListPreparedStatementsResponse -> Bool
Prelude.Eq, ReadPrec [ListPreparedStatementsResponse]
ReadPrec ListPreparedStatementsResponse
Int -> ReadS ListPreparedStatementsResponse
ReadS [ListPreparedStatementsResponse]
(Int -> ReadS ListPreparedStatementsResponse)
-> ReadS [ListPreparedStatementsResponse]
-> ReadPrec ListPreparedStatementsResponse
-> ReadPrec [ListPreparedStatementsResponse]
-> Read ListPreparedStatementsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPreparedStatementsResponse]
$creadListPrec :: ReadPrec [ListPreparedStatementsResponse]
readPrec :: ReadPrec ListPreparedStatementsResponse
$creadPrec :: ReadPrec ListPreparedStatementsResponse
readList :: ReadS [ListPreparedStatementsResponse]
$creadList :: ReadS [ListPreparedStatementsResponse]
readsPrec :: Int -> ReadS ListPreparedStatementsResponse
$creadsPrec :: Int -> ReadS ListPreparedStatementsResponse
Prelude.Read, Int -> ListPreparedStatementsResponse -> ShowS
[ListPreparedStatementsResponse] -> ShowS
ListPreparedStatementsResponse -> String
(Int -> ListPreparedStatementsResponse -> ShowS)
-> (ListPreparedStatementsResponse -> String)
-> ([ListPreparedStatementsResponse] -> ShowS)
-> Show ListPreparedStatementsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPreparedStatementsResponse] -> ShowS
$cshowList :: [ListPreparedStatementsResponse] -> ShowS
show :: ListPreparedStatementsResponse -> String
$cshow :: ListPreparedStatementsResponse -> String
showsPrec :: Int -> ListPreparedStatementsResponse -> ShowS
$cshowsPrec :: Int -> ListPreparedStatementsResponse -> ShowS
Prelude.Show, (forall x.
 ListPreparedStatementsResponse
 -> Rep ListPreparedStatementsResponse x)
-> (forall x.
    Rep ListPreparedStatementsResponse x
    -> ListPreparedStatementsResponse)
-> Generic ListPreparedStatementsResponse
forall x.
Rep ListPreparedStatementsResponse x
-> ListPreparedStatementsResponse
forall x.
ListPreparedStatementsResponse
-> Rep ListPreparedStatementsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPreparedStatementsResponse x
-> ListPreparedStatementsResponse
$cfrom :: forall x.
ListPreparedStatementsResponse
-> Rep ListPreparedStatementsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListPreparedStatementsResponse' 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:
--
-- 'preparedStatements', 'listPreparedStatementsResponse_preparedStatements' - The list of prepared statements for the workgroup.
--
-- 'nextToken', 'listPreparedStatementsResponse_nextToken' - A token generated by the Athena service that specifies where to continue
-- pagination if a previous request was truncated. To obtain the next set
-- of pages, pass in the @NextToken@ from the response object of the
-- previous page call.
--
-- 'httpStatus', 'listPreparedStatementsResponse_httpStatus' - The response's http status code.
newListPreparedStatementsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPreparedStatementsResponse
newListPreparedStatementsResponse :: Int -> ListPreparedStatementsResponse
newListPreparedStatementsResponse Int
pHttpStatus_ =
  ListPreparedStatementsResponse' :: Maybe [PreparedStatementSummary]
-> Maybe Text -> Int -> ListPreparedStatementsResponse
ListPreparedStatementsResponse'
    { $sel:preparedStatements:ListPreparedStatementsResponse' :: Maybe [PreparedStatementSummary]
preparedStatements =
        Maybe [PreparedStatementSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListPreparedStatementsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPreparedStatementsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The list of prepared statements for the workgroup.
listPreparedStatementsResponse_preparedStatements :: Lens.Lens' ListPreparedStatementsResponse (Prelude.Maybe [PreparedStatementSummary])
listPreparedStatementsResponse_preparedStatements :: (Maybe [PreparedStatementSummary]
 -> f (Maybe [PreparedStatementSummary]))
-> ListPreparedStatementsResponse
-> f ListPreparedStatementsResponse
listPreparedStatementsResponse_preparedStatements = (ListPreparedStatementsResponse
 -> Maybe [PreparedStatementSummary])
-> (ListPreparedStatementsResponse
    -> Maybe [PreparedStatementSummary]
    -> ListPreparedStatementsResponse)
-> Lens
     ListPreparedStatementsResponse
     ListPreparedStatementsResponse
     (Maybe [PreparedStatementSummary])
     (Maybe [PreparedStatementSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPreparedStatementsResponse' {Maybe [PreparedStatementSummary]
preparedStatements :: Maybe [PreparedStatementSummary]
$sel:preparedStatements:ListPreparedStatementsResponse' :: ListPreparedStatementsResponse -> Maybe [PreparedStatementSummary]
preparedStatements} -> Maybe [PreparedStatementSummary]
preparedStatements) (\s :: ListPreparedStatementsResponse
s@ListPreparedStatementsResponse' {} Maybe [PreparedStatementSummary]
a -> ListPreparedStatementsResponse
s {$sel:preparedStatements:ListPreparedStatementsResponse' :: Maybe [PreparedStatementSummary]
preparedStatements = Maybe [PreparedStatementSummary]
a} :: ListPreparedStatementsResponse) ((Maybe [PreparedStatementSummary]
  -> f (Maybe [PreparedStatementSummary]))
 -> ListPreparedStatementsResponse
 -> f ListPreparedStatementsResponse)
-> ((Maybe [PreparedStatementSummary]
     -> f (Maybe [PreparedStatementSummary]))
    -> Maybe [PreparedStatementSummary]
    -> f (Maybe [PreparedStatementSummary]))
-> (Maybe [PreparedStatementSummary]
    -> f (Maybe [PreparedStatementSummary]))
-> ListPreparedStatementsResponse
-> f ListPreparedStatementsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PreparedStatementSummary]
  [PreparedStatementSummary]
  [PreparedStatementSummary]
  [PreparedStatementSummary]
-> Iso
     (Maybe [PreparedStatementSummary])
     (Maybe [PreparedStatementSummary])
     (Maybe [PreparedStatementSummary])
     (Maybe [PreparedStatementSummary])
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
  [PreparedStatementSummary]
  [PreparedStatementSummary]
  [PreparedStatementSummary]
  [PreparedStatementSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A token generated by the Athena service that specifies where to continue
-- pagination if a previous request was truncated. To obtain the next set
-- of pages, pass in the @NextToken@ from the response object of the
-- previous page call.
listPreparedStatementsResponse_nextToken :: Lens.Lens' ListPreparedStatementsResponse (Prelude.Maybe Prelude.Text)
listPreparedStatementsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPreparedStatementsResponse
-> f ListPreparedStatementsResponse
listPreparedStatementsResponse_nextToken = (ListPreparedStatementsResponse -> Maybe Text)
-> (ListPreparedStatementsResponse
    -> Maybe Text -> ListPreparedStatementsResponse)
-> Lens
     ListPreparedStatementsResponse
     ListPreparedStatementsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPreparedStatementsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPreparedStatementsResponse' :: ListPreparedStatementsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPreparedStatementsResponse
s@ListPreparedStatementsResponse' {} Maybe Text
a -> ListPreparedStatementsResponse
s {$sel:nextToken:ListPreparedStatementsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListPreparedStatementsResponse)

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

instance
  Prelude.NFData
    ListPreparedStatementsResponse