{-# 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.LicenseManager.ListTokens
-- 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 tokens.
module Amazonka.LicenseManager.ListTokens
  ( -- * Creating a Request
    ListTokens (..),
    newListTokens,

    -- * Request Lenses
    listTokens_tokenIds,
    listTokens_filters,
    listTokens_nextToken,
    listTokens_maxResults,

    -- * Destructuring the Response
    ListTokensResponse (..),
    newListTokensResponse,

    -- * Response Lenses
    listTokensResponse_tokens,
    listTokensResponse_nextToken,
    listTokensResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LicenseManager.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListTokens' smart constructor.
data ListTokens = ListTokens'
  { -- | Token IDs.
    ListTokens -> Maybe [Text]
tokenIds :: Prelude.Maybe [Prelude.Text],
    -- | Filters to scope the results. The following filter is supported:
    --
    -- -   @LicenseArns@
    ListTokens -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | Token for the next set of results.
    ListTokens -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Maximum number of results to return in a single call.
    ListTokens -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListTokens -> ListTokens -> Bool
(ListTokens -> ListTokens -> Bool)
-> (ListTokens -> ListTokens -> Bool) -> Eq ListTokens
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTokens -> ListTokens -> Bool
$c/= :: ListTokens -> ListTokens -> Bool
== :: ListTokens -> ListTokens -> Bool
$c== :: ListTokens -> ListTokens -> Bool
Prelude.Eq, ReadPrec [ListTokens]
ReadPrec ListTokens
Int -> ReadS ListTokens
ReadS [ListTokens]
(Int -> ReadS ListTokens)
-> ReadS [ListTokens]
-> ReadPrec ListTokens
-> ReadPrec [ListTokens]
-> Read ListTokens
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTokens]
$creadListPrec :: ReadPrec [ListTokens]
readPrec :: ReadPrec ListTokens
$creadPrec :: ReadPrec ListTokens
readList :: ReadS [ListTokens]
$creadList :: ReadS [ListTokens]
readsPrec :: Int -> ReadS ListTokens
$creadsPrec :: Int -> ReadS ListTokens
Prelude.Read, Int -> ListTokens -> ShowS
[ListTokens] -> ShowS
ListTokens -> String
(Int -> ListTokens -> ShowS)
-> (ListTokens -> String)
-> ([ListTokens] -> ShowS)
-> Show ListTokens
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTokens] -> ShowS
$cshowList :: [ListTokens] -> ShowS
show :: ListTokens -> String
$cshow :: ListTokens -> String
showsPrec :: Int -> ListTokens -> ShowS
$cshowsPrec :: Int -> ListTokens -> ShowS
Prelude.Show, (forall x. ListTokens -> Rep ListTokens x)
-> (forall x. Rep ListTokens x -> ListTokens) -> Generic ListTokens
forall x. Rep ListTokens x -> ListTokens
forall x. ListTokens -> Rep ListTokens x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTokens x -> ListTokens
$cfrom :: forall x. ListTokens -> Rep ListTokens x
Prelude.Generic)

-- |
-- Create a value of 'ListTokens' 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:
--
-- 'tokenIds', 'listTokens_tokenIds' - Token IDs.
--
-- 'filters', 'listTokens_filters' - Filters to scope the results. The following filter is supported:
--
-- -   @LicenseArns@
--
-- 'nextToken', 'listTokens_nextToken' - Token for the next set of results.
--
-- 'maxResults', 'listTokens_maxResults' - Maximum number of results to return in a single call.
newListTokens ::
  ListTokens
newListTokens :: ListTokens
newListTokens =
  ListTokens' :: Maybe [Text]
-> Maybe [Filter] -> Maybe Text -> Maybe Natural -> ListTokens
ListTokens'
    { $sel:tokenIds:ListTokens' :: Maybe [Text]
tokenIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:filters:ListTokens' :: Maybe [Filter]
filters = Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTokens' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListTokens' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Token IDs.
listTokens_tokenIds :: Lens.Lens' ListTokens (Prelude.Maybe [Prelude.Text])
listTokens_tokenIds :: (Maybe [Text] -> f (Maybe [Text])) -> ListTokens -> f ListTokens
listTokens_tokenIds = (ListTokens -> Maybe [Text])
-> (ListTokens -> Maybe [Text] -> ListTokens)
-> Lens ListTokens ListTokens (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTokens' {Maybe [Text]
tokenIds :: Maybe [Text]
$sel:tokenIds:ListTokens' :: ListTokens -> Maybe [Text]
tokenIds} -> Maybe [Text]
tokenIds) (\s :: ListTokens
s@ListTokens' {} Maybe [Text]
a -> ListTokens
s {$sel:tokenIds:ListTokens' :: Maybe [Text]
tokenIds = Maybe [Text]
a} :: ListTokens) ((Maybe [Text] -> f (Maybe [Text])) -> ListTokens -> f ListTokens)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListTokens
-> f ListTokens
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Filters to scope the results. The following filter is supported:
--
-- -   @LicenseArns@
listTokens_filters :: Lens.Lens' ListTokens (Prelude.Maybe [Filter])
listTokens_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> ListTokens -> f ListTokens
listTokens_filters = (ListTokens -> Maybe [Filter])
-> (ListTokens -> Maybe [Filter] -> ListTokens)
-> Lens ListTokens ListTokens (Maybe [Filter]) (Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTokens' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListTokens' :: ListTokens -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListTokens
s@ListTokens' {} Maybe [Filter]
a -> ListTokens
s {$sel:filters:ListTokens' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListTokens) ((Maybe [Filter] -> f (Maybe [Filter]))
 -> ListTokens -> f ListTokens)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
    -> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> ListTokens
-> f ListTokens
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
     (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
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 [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Token for the next set of results.
listTokens_nextToken :: Lens.Lens' ListTokens (Prelude.Maybe Prelude.Text)
listTokens_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListTokens -> f ListTokens
listTokens_nextToken = (ListTokens -> Maybe Text)
-> (ListTokens -> Maybe Text -> ListTokens)
-> Lens ListTokens ListTokens (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTokens' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTokens' :: ListTokens -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTokens
s@ListTokens' {} Maybe Text
a -> ListTokens
s {$sel:nextToken:ListTokens' :: Maybe Text
nextToken = Maybe Text
a} :: ListTokens)

-- | Maximum number of results to return in a single call.
listTokens_maxResults :: Lens.Lens' ListTokens (Prelude.Maybe Prelude.Natural)
listTokens_maxResults :: (Maybe Natural -> f (Maybe Natural)) -> ListTokens -> f ListTokens
listTokens_maxResults = (ListTokens -> Maybe Natural)
-> (ListTokens -> Maybe Natural -> ListTokens)
-> Lens ListTokens ListTokens (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTokens' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListTokens' :: ListTokens -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListTokens
s@ListTokens' {} Maybe Natural
a -> ListTokens
s {$sel:maxResults:ListTokens' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListTokens)

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

instance Prelude.NFData ListTokens

instance Core.ToHeaders ListTokens where
  toHeaders :: ListTokens -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListTokens -> 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
"AWSLicenseManager.ListTokens" ::
                          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 ListTokens where
  toJSON :: ListTokens -> Value
toJSON ListTokens' {Maybe Natural
Maybe [Text]
Maybe [Filter]
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
filters :: Maybe [Filter]
tokenIds :: Maybe [Text]
$sel:maxResults:ListTokens' :: ListTokens -> Maybe Natural
$sel:nextToken:ListTokens' :: ListTokens -> Maybe Text
$sel:filters:ListTokens' :: ListTokens -> Maybe [Filter]
$sel:tokenIds:ListTokens' :: ListTokens -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"TokenIds" 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]
tokenIds,
            (Text
"Filters" Text -> [Filter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Filter] -> Pair) -> Maybe [Filter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
            (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
          ]
      )

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

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

-- | /See:/ 'newListTokensResponse' smart constructor.
data ListTokensResponse = ListTokensResponse'
  { -- | Received token details.
    ListTokensResponse -> Maybe [TokenData]
tokens :: Prelude.Maybe [TokenData],
    -- | Token for the next set of results.
    ListTokensResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListTokensResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListTokensResponse -> ListTokensResponse -> Bool
(ListTokensResponse -> ListTokensResponse -> Bool)
-> (ListTokensResponse -> ListTokensResponse -> Bool)
-> Eq ListTokensResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTokensResponse -> ListTokensResponse -> Bool
$c/= :: ListTokensResponse -> ListTokensResponse -> Bool
== :: ListTokensResponse -> ListTokensResponse -> Bool
$c== :: ListTokensResponse -> ListTokensResponse -> Bool
Prelude.Eq, ReadPrec [ListTokensResponse]
ReadPrec ListTokensResponse
Int -> ReadS ListTokensResponse
ReadS [ListTokensResponse]
(Int -> ReadS ListTokensResponse)
-> ReadS [ListTokensResponse]
-> ReadPrec ListTokensResponse
-> ReadPrec [ListTokensResponse]
-> Read ListTokensResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTokensResponse]
$creadListPrec :: ReadPrec [ListTokensResponse]
readPrec :: ReadPrec ListTokensResponse
$creadPrec :: ReadPrec ListTokensResponse
readList :: ReadS [ListTokensResponse]
$creadList :: ReadS [ListTokensResponse]
readsPrec :: Int -> ReadS ListTokensResponse
$creadsPrec :: Int -> ReadS ListTokensResponse
Prelude.Read, Int -> ListTokensResponse -> ShowS
[ListTokensResponse] -> ShowS
ListTokensResponse -> String
(Int -> ListTokensResponse -> ShowS)
-> (ListTokensResponse -> String)
-> ([ListTokensResponse] -> ShowS)
-> Show ListTokensResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTokensResponse] -> ShowS
$cshowList :: [ListTokensResponse] -> ShowS
show :: ListTokensResponse -> String
$cshow :: ListTokensResponse -> String
showsPrec :: Int -> ListTokensResponse -> ShowS
$cshowsPrec :: Int -> ListTokensResponse -> ShowS
Prelude.Show, (forall x. ListTokensResponse -> Rep ListTokensResponse x)
-> (forall x. Rep ListTokensResponse x -> ListTokensResponse)
-> Generic ListTokensResponse
forall x. Rep ListTokensResponse x -> ListTokensResponse
forall x. ListTokensResponse -> Rep ListTokensResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTokensResponse x -> ListTokensResponse
$cfrom :: forall x. ListTokensResponse -> Rep ListTokensResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListTokensResponse' 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:
--
-- 'tokens', 'listTokensResponse_tokens' - Received token details.
--
-- 'nextToken', 'listTokensResponse_nextToken' - Token for the next set of results.
--
-- 'httpStatus', 'listTokensResponse_httpStatus' - The response's http status code.
newListTokensResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListTokensResponse
newListTokensResponse :: Int -> ListTokensResponse
newListTokensResponse Int
pHttpStatus_ =
  ListTokensResponse' :: Maybe [TokenData] -> Maybe Text -> Int -> ListTokensResponse
ListTokensResponse'
    { $sel:tokens:ListTokensResponse' :: Maybe [TokenData]
tokens = Maybe [TokenData]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTokensResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListTokensResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Received token details.
listTokensResponse_tokens :: Lens.Lens' ListTokensResponse (Prelude.Maybe [TokenData])
listTokensResponse_tokens :: (Maybe [TokenData] -> f (Maybe [TokenData]))
-> ListTokensResponse -> f ListTokensResponse
listTokensResponse_tokens = (ListTokensResponse -> Maybe [TokenData])
-> (ListTokensResponse -> Maybe [TokenData] -> ListTokensResponse)
-> Lens
     ListTokensResponse
     ListTokensResponse
     (Maybe [TokenData])
     (Maybe [TokenData])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTokensResponse' {Maybe [TokenData]
tokens :: Maybe [TokenData]
$sel:tokens:ListTokensResponse' :: ListTokensResponse -> Maybe [TokenData]
tokens} -> Maybe [TokenData]
tokens) (\s :: ListTokensResponse
s@ListTokensResponse' {} Maybe [TokenData]
a -> ListTokensResponse
s {$sel:tokens:ListTokensResponse' :: Maybe [TokenData]
tokens = Maybe [TokenData]
a} :: ListTokensResponse) ((Maybe [TokenData] -> f (Maybe [TokenData]))
 -> ListTokensResponse -> f ListTokensResponse)
-> ((Maybe [TokenData] -> f (Maybe [TokenData]))
    -> Maybe [TokenData] -> f (Maybe [TokenData]))
-> (Maybe [TokenData] -> f (Maybe [TokenData]))
-> ListTokensResponse
-> f ListTokensResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [TokenData] [TokenData] [TokenData] [TokenData]
-> Iso
     (Maybe [TokenData])
     (Maybe [TokenData])
     (Maybe [TokenData])
     (Maybe [TokenData])
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 [TokenData] [TokenData] [TokenData] [TokenData]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Token for the next set of results.
listTokensResponse_nextToken :: Lens.Lens' ListTokensResponse (Prelude.Maybe Prelude.Text)
listTokensResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTokensResponse -> f ListTokensResponse
listTokensResponse_nextToken = (ListTokensResponse -> Maybe Text)
-> (ListTokensResponse -> Maybe Text -> ListTokensResponse)
-> Lens
     ListTokensResponse ListTokensResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTokensResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTokensResponse' :: ListTokensResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTokensResponse
s@ListTokensResponse' {} Maybe Text
a -> ListTokensResponse
s {$sel:nextToken:ListTokensResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListTokensResponse)

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

instance Prelude.NFData ListTokensResponse