{-# 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.AppSync.ListGraphqlApis
-- 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 your GraphQL APIs.
--
-- This operation returns paginated results.
module Amazonka.AppSync.ListGraphqlApis
  ( -- * Creating a Request
    ListGraphqlApis (..),
    newListGraphqlApis,

    -- * Request Lenses
    listGraphqlApis_nextToken,
    listGraphqlApis_maxResults,

    -- * Destructuring the Response
    ListGraphqlApisResponse (..),
    newListGraphqlApisResponse,

    -- * Response Lenses
    listGraphqlApisResponse_nextToken,
    listGraphqlApisResponse_graphqlApis,
    listGraphqlApisResponse_httpStatus,
  )
where

import Amazonka.AppSync.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:/ 'newListGraphqlApis' smart constructor.
data ListGraphqlApis = ListGraphqlApis'
  { -- | An identifier that was returned from the previous call to this
    -- operation, which can be used to return the next set of items in the
    -- list.
    ListGraphqlApis -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results you want the request to return.
    ListGraphqlApis -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListGraphqlApis -> ListGraphqlApis -> Bool
(ListGraphqlApis -> ListGraphqlApis -> Bool)
-> (ListGraphqlApis -> ListGraphqlApis -> Bool)
-> Eq ListGraphqlApis
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListGraphqlApis -> ListGraphqlApis -> Bool
$c/= :: ListGraphqlApis -> ListGraphqlApis -> Bool
== :: ListGraphqlApis -> ListGraphqlApis -> Bool
$c== :: ListGraphqlApis -> ListGraphqlApis -> Bool
Prelude.Eq, ReadPrec [ListGraphqlApis]
ReadPrec ListGraphqlApis
Int -> ReadS ListGraphqlApis
ReadS [ListGraphqlApis]
(Int -> ReadS ListGraphqlApis)
-> ReadS [ListGraphqlApis]
-> ReadPrec ListGraphqlApis
-> ReadPrec [ListGraphqlApis]
-> Read ListGraphqlApis
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListGraphqlApis]
$creadListPrec :: ReadPrec [ListGraphqlApis]
readPrec :: ReadPrec ListGraphqlApis
$creadPrec :: ReadPrec ListGraphqlApis
readList :: ReadS [ListGraphqlApis]
$creadList :: ReadS [ListGraphqlApis]
readsPrec :: Int -> ReadS ListGraphqlApis
$creadsPrec :: Int -> ReadS ListGraphqlApis
Prelude.Read, Int -> ListGraphqlApis -> ShowS
[ListGraphqlApis] -> ShowS
ListGraphqlApis -> String
(Int -> ListGraphqlApis -> ShowS)
-> (ListGraphqlApis -> String)
-> ([ListGraphqlApis] -> ShowS)
-> Show ListGraphqlApis
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListGraphqlApis] -> ShowS
$cshowList :: [ListGraphqlApis] -> ShowS
show :: ListGraphqlApis -> String
$cshow :: ListGraphqlApis -> String
showsPrec :: Int -> ListGraphqlApis -> ShowS
$cshowsPrec :: Int -> ListGraphqlApis -> ShowS
Prelude.Show, (forall x. ListGraphqlApis -> Rep ListGraphqlApis x)
-> (forall x. Rep ListGraphqlApis x -> ListGraphqlApis)
-> Generic ListGraphqlApis
forall x. Rep ListGraphqlApis x -> ListGraphqlApis
forall x. ListGraphqlApis -> Rep ListGraphqlApis x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListGraphqlApis x -> ListGraphqlApis
$cfrom :: forall x. ListGraphqlApis -> Rep ListGraphqlApis x
Prelude.Generic)

-- |
-- Create a value of 'ListGraphqlApis' 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', 'listGraphqlApis_nextToken' - An identifier that was returned from the previous call to this
-- operation, which can be used to return the next set of items in the
-- list.
--
-- 'maxResults', 'listGraphqlApis_maxResults' - The maximum number of results you want the request to return.
newListGraphqlApis ::
  ListGraphqlApis
newListGraphqlApis :: ListGraphqlApis
newListGraphqlApis =
  ListGraphqlApis' :: Maybe Text -> Maybe Natural -> ListGraphqlApis
ListGraphqlApis'
    { $sel:nextToken:ListGraphqlApis' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListGraphqlApis' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | An identifier that was returned from the previous call to this
-- operation, which can be used to return the next set of items in the
-- list.
listGraphqlApis_nextToken :: Lens.Lens' ListGraphqlApis (Prelude.Maybe Prelude.Text)
listGraphqlApis_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListGraphqlApis -> f ListGraphqlApis
listGraphqlApis_nextToken = (ListGraphqlApis -> Maybe Text)
-> (ListGraphqlApis -> Maybe Text -> ListGraphqlApis)
-> Lens ListGraphqlApis ListGraphqlApis (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGraphqlApis' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListGraphqlApis' :: ListGraphqlApis -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListGraphqlApis
s@ListGraphqlApis' {} Maybe Text
a -> ListGraphqlApis
s {$sel:nextToken:ListGraphqlApis' :: Maybe Text
nextToken = Maybe Text
a} :: ListGraphqlApis)

-- | The maximum number of results you want the request to return.
listGraphqlApis_maxResults :: Lens.Lens' ListGraphqlApis (Prelude.Maybe Prelude.Natural)
listGraphqlApis_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListGraphqlApis -> f ListGraphqlApis
listGraphqlApis_maxResults = (ListGraphqlApis -> Maybe Natural)
-> (ListGraphqlApis -> Maybe Natural -> ListGraphqlApis)
-> Lens
     ListGraphqlApis ListGraphqlApis (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGraphqlApis' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListGraphqlApis' :: ListGraphqlApis -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListGraphqlApis
s@ListGraphqlApis' {} Maybe Natural
a -> ListGraphqlApis
s {$sel:maxResults:ListGraphqlApis' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListGraphqlApis)

instance Core.AWSPager ListGraphqlApis where
  page :: ListGraphqlApis
-> AWSResponse ListGraphqlApis -> Maybe ListGraphqlApis
page ListGraphqlApis
rq AWSResponse ListGraphqlApis
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListGraphqlApis
ListGraphqlApisResponse
rs
            ListGraphqlApisResponse
-> Getting (First Text) ListGraphqlApisResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListGraphqlApisResponse
-> Const (First Text) ListGraphqlApisResponse
Lens' ListGraphqlApisResponse (Maybe Text)
listGraphqlApisResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListGraphqlApisResponse
 -> Const (First Text) ListGraphqlApisResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListGraphqlApisResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListGraphqlApis
forall a. Maybe a
Prelude.Nothing
    | Maybe [GraphqlApi] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListGraphqlApis
ListGraphqlApisResponse
rs
            ListGraphqlApisResponse
-> Getting
     (First [GraphqlApi]) ListGraphqlApisResponse [GraphqlApi]
-> Maybe [GraphqlApi]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [GraphqlApi]
 -> Const (First [GraphqlApi]) (Maybe [GraphqlApi]))
-> ListGraphqlApisResponse
-> Const (First [GraphqlApi]) ListGraphqlApisResponse
Lens' ListGraphqlApisResponse (Maybe [GraphqlApi])
listGraphqlApisResponse_graphqlApis
              ((Maybe [GraphqlApi]
  -> Const (First [GraphqlApi]) (Maybe [GraphqlApi]))
 -> ListGraphqlApisResponse
 -> Const (First [GraphqlApi]) ListGraphqlApisResponse)
-> (([GraphqlApi] -> Const (First [GraphqlApi]) [GraphqlApi])
    -> Maybe [GraphqlApi]
    -> Const (First [GraphqlApi]) (Maybe [GraphqlApi]))
-> Getting
     (First [GraphqlApi]) ListGraphqlApisResponse [GraphqlApi]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([GraphqlApi] -> Const (First [GraphqlApi]) [GraphqlApi])
-> Maybe [GraphqlApi]
-> Const (First [GraphqlApi]) (Maybe [GraphqlApi])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListGraphqlApis
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListGraphqlApis -> Maybe ListGraphqlApis
forall a. a -> Maybe a
Prelude.Just (ListGraphqlApis -> Maybe ListGraphqlApis)
-> ListGraphqlApis -> Maybe ListGraphqlApis
forall a b. (a -> b) -> a -> b
Prelude.$
        ListGraphqlApis
rq
          ListGraphqlApis
-> (ListGraphqlApis -> ListGraphqlApis) -> ListGraphqlApis
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListGraphqlApis -> Identity ListGraphqlApis
Lens ListGraphqlApis ListGraphqlApis (Maybe Text) (Maybe Text)
listGraphqlApis_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListGraphqlApis -> Identity ListGraphqlApis)
-> Maybe Text -> ListGraphqlApis -> ListGraphqlApis
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListGraphqlApis
ListGraphqlApisResponse
rs
          ListGraphqlApisResponse
-> Getting (First Text) ListGraphqlApisResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListGraphqlApisResponse
-> Const (First Text) ListGraphqlApisResponse
Lens' ListGraphqlApisResponse (Maybe Text)
listGraphqlApisResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListGraphqlApisResponse
 -> Const (First Text) ListGraphqlApisResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListGraphqlApisResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.NFData ListGraphqlApis

instance Core.ToHeaders ListGraphqlApis where
  toHeaders :: ListGraphqlApis -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListGraphqlApis -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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.ToPath ListGraphqlApis where
  toPath :: ListGraphqlApis -> ByteString
toPath = ByteString -> ListGraphqlApis -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/apis"

instance Core.ToQuery ListGraphqlApis where
  toQuery :: ListGraphqlApis -> QueryString
toQuery ListGraphqlApis' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListGraphqlApis' :: ListGraphqlApis -> Maybe Natural
$sel:nextToken:ListGraphqlApis' :: ListGraphqlApis -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListGraphqlApisResponse' smart constructor.
data ListGraphqlApisResponse = ListGraphqlApisResponse'
  { -- | An identifier to be passed in the next request to this operation to
    -- return the next set of items in the list.
    ListGraphqlApisResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The @GraphqlApi@ objects.
    ListGraphqlApisResponse -> Maybe [GraphqlApi]
graphqlApis :: Prelude.Maybe [GraphqlApi],
    -- | The response's http status code.
    ListGraphqlApisResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListGraphqlApisResponse -> ListGraphqlApisResponse -> Bool
(ListGraphqlApisResponse -> ListGraphqlApisResponse -> Bool)
-> (ListGraphqlApisResponse -> ListGraphqlApisResponse -> Bool)
-> Eq ListGraphqlApisResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListGraphqlApisResponse -> ListGraphqlApisResponse -> Bool
$c/= :: ListGraphqlApisResponse -> ListGraphqlApisResponse -> Bool
== :: ListGraphqlApisResponse -> ListGraphqlApisResponse -> Bool
$c== :: ListGraphqlApisResponse -> ListGraphqlApisResponse -> Bool
Prelude.Eq, ReadPrec [ListGraphqlApisResponse]
ReadPrec ListGraphqlApisResponse
Int -> ReadS ListGraphqlApisResponse
ReadS [ListGraphqlApisResponse]
(Int -> ReadS ListGraphqlApisResponse)
-> ReadS [ListGraphqlApisResponse]
-> ReadPrec ListGraphqlApisResponse
-> ReadPrec [ListGraphqlApisResponse]
-> Read ListGraphqlApisResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListGraphqlApisResponse]
$creadListPrec :: ReadPrec [ListGraphqlApisResponse]
readPrec :: ReadPrec ListGraphqlApisResponse
$creadPrec :: ReadPrec ListGraphqlApisResponse
readList :: ReadS [ListGraphqlApisResponse]
$creadList :: ReadS [ListGraphqlApisResponse]
readsPrec :: Int -> ReadS ListGraphqlApisResponse
$creadsPrec :: Int -> ReadS ListGraphqlApisResponse
Prelude.Read, Int -> ListGraphqlApisResponse -> ShowS
[ListGraphqlApisResponse] -> ShowS
ListGraphqlApisResponse -> String
(Int -> ListGraphqlApisResponse -> ShowS)
-> (ListGraphqlApisResponse -> String)
-> ([ListGraphqlApisResponse] -> ShowS)
-> Show ListGraphqlApisResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListGraphqlApisResponse] -> ShowS
$cshowList :: [ListGraphqlApisResponse] -> ShowS
show :: ListGraphqlApisResponse -> String
$cshow :: ListGraphqlApisResponse -> String
showsPrec :: Int -> ListGraphqlApisResponse -> ShowS
$cshowsPrec :: Int -> ListGraphqlApisResponse -> ShowS
Prelude.Show, (forall x.
 ListGraphqlApisResponse -> Rep ListGraphqlApisResponse x)
-> (forall x.
    Rep ListGraphqlApisResponse x -> ListGraphqlApisResponse)
-> Generic ListGraphqlApisResponse
forall x. Rep ListGraphqlApisResponse x -> ListGraphqlApisResponse
forall x. ListGraphqlApisResponse -> Rep ListGraphqlApisResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListGraphqlApisResponse x -> ListGraphqlApisResponse
$cfrom :: forall x. ListGraphqlApisResponse -> Rep ListGraphqlApisResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListGraphqlApisResponse' 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', 'listGraphqlApisResponse_nextToken' - An identifier to be passed in the next request to this operation to
-- return the next set of items in the list.
--
-- 'graphqlApis', 'listGraphqlApisResponse_graphqlApis' - The @GraphqlApi@ objects.
--
-- 'httpStatus', 'listGraphqlApisResponse_httpStatus' - The response's http status code.
newListGraphqlApisResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListGraphqlApisResponse
newListGraphqlApisResponse :: Int -> ListGraphqlApisResponse
newListGraphqlApisResponse Int
pHttpStatus_ =
  ListGraphqlApisResponse' :: Maybe Text -> Maybe [GraphqlApi] -> Int -> ListGraphqlApisResponse
ListGraphqlApisResponse'
    { $sel:nextToken:ListGraphqlApisResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:graphqlApis:ListGraphqlApisResponse' :: Maybe [GraphqlApi]
graphqlApis = Maybe [GraphqlApi]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListGraphqlApisResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An identifier to be passed in the next request to this operation to
-- return the next set of items in the list.
listGraphqlApisResponse_nextToken :: Lens.Lens' ListGraphqlApisResponse (Prelude.Maybe Prelude.Text)
listGraphqlApisResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListGraphqlApisResponse -> f ListGraphqlApisResponse
listGraphqlApisResponse_nextToken = (ListGraphqlApisResponse -> Maybe Text)
-> (ListGraphqlApisResponse
    -> Maybe Text -> ListGraphqlApisResponse)
-> Lens' ListGraphqlApisResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGraphqlApisResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListGraphqlApisResponse' :: ListGraphqlApisResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListGraphqlApisResponse
s@ListGraphqlApisResponse' {} Maybe Text
a -> ListGraphqlApisResponse
s {$sel:nextToken:ListGraphqlApisResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListGraphqlApisResponse)

-- | The @GraphqlApi@ objects.
listGraphqlApisResponse_graphqlApis :: Lens.Lens' ListGraphqlApisResponse (Prelude.Maybe [GraphqlApi])
listGraphqlApisResponse_graphqlApis :: (Maybe [GraphqlApi] -> f (Maybe [GraphqlApi]))
-> ListGraphqlApisResponse -> f ListGraphqlApisResponse
listGraphqlApisResponse_graphqlApis = (ListGraphqlApisResponse -> Maybe [GraphqlApi])
-> (ListGraphqlApisResponse
    -> Maybe [GraphqlApi] -> ListGraphqlApisResponse)
-> Lens' ListGraphqlApisResponse (Maybe [GraphqlApi])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGraphqlApisResponse' {Maybe [GraphqlApi]
graphqlApis :: Maybe [GraphqlApi]
$sel:graphqlApis:ListGraphqlApisResponse' :: ListGraphqlApisResponse -> Maybe [GraphqlApi]
graphqlApis} -> Maybe [GraphqlApi]
graphqlApis) (\s :: ListGraphqlApisResponse
s@ListGraphqlApisResponse' {} Maybe [GraphqlApi]
a -> ListGraphqlApisResponse
s {$sel:graphqlApis:ListGraphqlApisResponse' :: Maybe [GraphqlApi]
graphqlApis = Maybe [GraphqlApi]
a} :: ListGraphqlApisResponse) ((Maybe [GraphqlApi] -> f (Maybe [GraphqlApi]))
 -> ListGraphqlApisResponse -> f ListGraphqlApisResponse)
-> ((Maybe [GraphqlApi] -> f (Maybe [GraphqlApi]))
    -> Maybe [GraphqlApi] -> f (Maybe [GraphqlApi]))
-> (Maybe [GraphqlApi] -> f (Maybe [GraphqlApi]))
-> ListGraphqlApisResponse
-> f ListGraphqlApisResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [GraphqlApi] [GraphqlApi] [GraphqlApi] [GraphqlApi]
-> Iso
     (Maybe [GraphqlApi])
     (Maybe [GraphqlApi])
     (Maybe [GraphqlApi])
     (Maybe [GraphqlApi])
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 [GraphqlApi] [GraphqlApi] [GraphqlApi] [GraphqlApi]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListGraphqlApisResponse