{-# 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.CognitoSync.ListIdentityPoolUsage
-- 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)
--
-- Gets a list of identity pools registered with Cognito.
--
-- ListIdentityPoolUsage can only be called with developer credentials. You
-- cannot make this API call with the temporary user credentials provided
-- by Cognito Identity.
module Amazonka.CognitoSync.ListIdentityPoolUsage
  ( -- * Creating a Request
    ListIdentityPoolUsage (..),
    newListIdentityPoolUsage,

    -- * Request Lenses
    listIdentityPoolUsage_nextToken,
    listIdentityPoolUsage_maxResults,

    -- * Destructuring the Response
    ListIdentityPoolUsageResponse (..),
    newListIdentityPoolUsageResponse,

    -- * Response Lenses
    listIdentityPoolUsageResponse_identityPoolUsages,
    listIdentityPoolUsageResponse_count,
    listIdentityPoolUsageResponse_nextToken,
    listIdentityPoolUsageResponse_maxResults,
    listIdentityPoolUsageResponse_httpStatus,
  )
where

import Amazonka.CognitoSync.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

-- | A request for usage information on an identity pool.
--
-- /See:/ 'newListIdentityPoolUsage' smart constructor.
data ListIdentityPoolUsage = ListIdentityPoolUsage'
  { -- | A pagination token for obtaining the next page of results.
    ListIdentityPoolUsage -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to be returned.
    ListIdentityPoolUsage -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
  }
  deriving (ListIdentityPoolUsage -> ListIdentityPoolUsage -> Bool
(ListIdentityPoolUsage -> ListIdentityPoolUsage -> Bool)
-> (ListIdentityPoolUsage -> ListIdentityPoolUsage -> Bool)
-> Eq ListIdentityPoolUsage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListIdentityPoolUsage -> ListIdentityPoolUsage -> Bool
$c/= :: ListIdentityPoolUsage -> ListIdentityPoolUsage -> Bool
== :: ListIdentityPoolUsage -> ListIdentityPoolUsage -> Bool
$c== :: ListIdentityPoolUsage -> ListIdentityPoolUsage -> Bool
Prelude.Eq, ReadPrec [ListIdentityPoolUsage]
ReadPrec ListIdentityPoolUsage
Int -> ReadS ListIdentityPoolUsage
ReadS [ListIdentityPoolUsage]
(Int -> ReadS ListIdentityPoolUsage)
-> ReadS [ListIdentityPoolUsage]
-> ReadPrec ListIdentityPoolUsage
-> ReadPrec [ListIdentityPoolUsage]
-> Read ListIdentityPoolUsage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListIdentityPoolUsage]
$creadListPrec :: ReadPrec [ListIdentityPoolUsage]
readPrec :: ReadPrec ListIdentityPoolUsage
$creadPrec :: ReadPrec ListIdentityPoolUsage
readList :: ReadS [ListIdentityPoolUsage]
$creadList :: ReadS [ListIdentityPoolUsage]
readsPrec :: Int -> ReadS ListIdentityPoolUsage
$creadsPrec :: Int -> ReadS ListIdentityPoolUsage
Prelude.Read, Int -> ListIdentityPoolUsage -> ShowS
[ListIdentityPoolUsage] -> ShowS
ListIdentityPoolUsage -> String
(Int -> ListIdentityPoolUsage -> ShowS)
-> (ListIdentityPoolUsage -> String)
-> ([ListIdentityPoolUsage] -> ShowS)
-> Show ListIdentityPoolUsage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListIdentityPoolUsage] -> ShowS
$cshowList :: [ListIdentityPoolUsage] -> ShowS
show :: ListIdentityPoolUsage -> String
$cshow :: ListIdentityPoolUsage -> String
showsPrec :: Int -> ListIdentityPoolUsage -> ShowS
$cshowsPrec :: Int -> ListIdentityPoolUsage -> ShowS
Prelude.Show, (forall x. ListIdentityPoolUsage -> Rep ListIdentityPoolUsage x)
-> (forall x. Rep ListIdentityPoolUsage x -> ListIdentityPoolUsage)
-> Generic ListIdentityPoolUsage
forall x. Rep ListIdentityPoolUsage x -> ListIdentityPoolUsage
forall x. ListIdentityPoolUsage -> Rep ListIdentityPoolUsage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListIdentityPoolUsage x -> ListIdentityPoolUsage
$cfrom :: forall x. ListIdentityPoolUsage -> Rep ListIdentityPoolUsage x
Prelude.Generic)

-- |
-- Create a value of 'ListIdentityPoolUsage' 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', 'listIdentityPoolUsage_nextToken' - A pagination token for obtaining the next page of results.
--
-- 'maxResults', 'listIdentityPoolUsage_maxResults' - The maximum number of results to be returned.
newListIdentityPoolUsage ::
  ListIdentityPoolUsage
newListIdentityPoolUsage :: ListIdentityPoolUsage
newListIdentityPoolUsage =
  ListIdentityPoolUsage' :: Maybe Text -> Maybe Int -> ListIdentityPoolUsage
ListIdentityPoolUsage'
    { $sel:nextToken:ListIdentityPoolUsage' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListIdentityPoolUsage' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | A pagination token for obtaining the next page of results.
listIdentityPoolUsage_nextToken :: Lens.Lens' ListIdentityPoolUsage (Prelude.Maybe Prelude.Text)
listIdentityPoolUsage_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListIdentityPoolUsage -> f ListIdentityPoolUsage
listIdentityPoolUsage_nextToken = (ListIdentityPoolUsage -> Maybe Text)
-> (ListIdentityPoolUsage -> Maybe Text -> ListIdentityPoolUsage)
-> Lens
     ListIdentityPoolUsage
     ListIdentityPoolUsage
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentityPoolUsage' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListIdentityPoolUsage' :: ListIdentityPoolUsage -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListIdentityPoolUsage
s@ListIdentityPoolUsage' {} Maybe Text
a -> ListIdentityPoolUsage
s {$sel:nextToken:ListIdentityPoolUsage' :: Maybe Text
nextToken = Maybe Text
a} :: ListIdentityPoolUsage)

-- | The maximum number of results to be returned.
listIdentityPoolUsage_maxResults :: Lens.Lens' ListIdentityPoolUsage (Prelude.Maybe Prelude.Int)
listIdentityPoolUsage_maxResults :: (Maybe Int -> f (Maybe Int))
-> ListIdentityPoolUsage -> f ListIdentityPoolUsage
listIdentityPoolUsage_maxResults = (ListIdentityPoolUsage -> Maybe Int)
-> (ListIdentityPoolUsage -> Maybe Int -> ListIdentityPoolUsage)
-> Lens
     ListIdentityPoolUsage ListIdentityPoolUsage (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentityPoolUsage' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListIdentityPoolUsage' :: ListIdentityPoolUsage -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListIdentityPoolUsage
s@ListIdentityPoolUsage' {} Maybe Int
a -> ListIdentityPoolUsage
s {$sel:maxResults:ListIdentityPoolUsage' :: Maybe Int
maxResults = Maybe Int
a} :: ListIdentityPoolUsage)

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

instance Prelude.NFData ListIdentityPoolUsage

instance Core.ToHeaders ListIdentityPoolUsage where
  toHeaders :: ListIdentityPoolUsage -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListIdentityPoolUsage -> 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 ListIdentityPoolUsage where
  toPath :: ListIdentityPoolUsage -> ByteString
toPath = ByteString -> ListIdentityPoolUsage -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/identitypools"

instance Core.ToQuery ListIdentityPoolUsage where
  toQuery :: ListIdentityPoolUsage -> QueryString
toQuery ListIdentityPoolUsage' {Maybe Int
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:maxResults:ListIdentityPoolUsage' :: ListIdentityPoolUsage -> Maybe Int
$sel:nextToken:ListIdentityPoolUsage' :: ListIdentityPoolUsage -> 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 Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxResults
      ]

-- | Returned for a successful ListIdentityPoolUsage request.
--
-- /See:/ 'newListIdentityPoolUsageResponse' smart constructor.
data ListIdentityPoolUsageResponse = ListIdentityPoolUsageResponse'
  { -- | Usage information for the identity pools.
    ListIdentityPoolUsageResponse -> Maybe [IdentityPoolUsage]
identityPoolUsages :: Prelude.Maybe [IdentityPoolUsage],
    -- | Total number of identities for the identity pool.
    ListIdentityPoolUsageResponse -> Maybe Int
count :: Prelude.Maybe Prelude.Int,
    -- | A pagination token for obtaining the next page of results.
    ListIdentityPoolUsageResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to be returned.
    ListIdentityPoolUsageResponse -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The response's http status code.
    ListIdentityPoolUsageResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListIdentityPoolUsageResponse
-> ListIdentityPoolUsageResponse -> Bool
(ListIdentityPoolUsageResponse
 -> ListIdentityPoolUsageResponse -> Bool)
-> (ListIdentityPoolUsageResponse
    -> ListIdentityPoolUsageResponse -> Bool)
-> Eq ListIdentityPoolUsageResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListIdentityPoolUsageResponse
-> ListIdentityPoolUsageResponse -> Bool
$c/= :: ListIdentityPoolUsageResponse
-> ListIdentityPoolUsageResponse -> Bool
== :: ListIdentityPoolUsageResponse
-> ListIdentityPoolUsageResponse -> Bool
$c== :: ListIdentityPoolUsageResponse
-> ListIdentityPoolUsageResponse -> Bool
Prelude.Eq, ReadPrec [ListIdentityPoolUsageResponse]
ReadPrec ListIdentityPoolUsageResponse
Int -> ReadS ListIdentityPoolUsageResponse
ReadS [ListIdentityPoolUsageResponse]
(Int -> ReadS ListIdentityPoolUsageResponse)
-> ReadS [ListIdentityPoolUsageResponse]
-> ReadPrec ListIdentityPoolUsageResponse
-> ReadPrec [ListIdentityPoolUsageResponse]
-> Read ListIdentityPoolUsageResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListIdentityPoolUsageResponse]
$creadListPrec :: ReadPrec [ListIdentityPoolUsageResponse]
readPrec :: ReadPrec ListIdentityPoolUsageResponse
$creadPrec :: ReadPrec ListIdentityPoolUsageResponse
readList :: ReadS [ListIdentityPoolUsageResponse]
$creadList :: ReadS [ListIdentityPoolUsageResponse]
readsPrec :: Int -> ReadS ListIdentityPoolUsageResponse
$creadsPrec :: Int -> ReadS ListIdentityPoolUsageResponse
Prelude.Read, Int -> ListIdentityPoolUsageResponse -> ShowS
[ListIdentityPoolUsageResponse] -> ShowS
ListIdentityPoolUsageResponse -> String
(Int -> ListIdentityPoolUsageResponse -> ShowS)
-> (ListIdentityPoolUsageResponse -> String)
-> ([ListIdentityPoolUsageResponse] -> ShowS)
-> Show ListIdentityPoolUsageResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListIdentityPoolUsageResponse] -> ShowS
$cshowList :: [ListIdentityPoolUsageResponse] -> ShowS
show :: ListIdentityPoolUsageResponse -> String
$cshow :: ListIdentityPoolUsageResponse -> String
showsPrec :: Int -> ListIdentityPoolUsageResponse -> ShowS
$cshowsPrec :: Int -> ListIdentityPoolUsageResponse -> ShowS
Prelude.Show, (forall x.
 ListIdentityPoolUsageResponse
 -> Rep ListIdentityPoolUsageResponse x)
-> (forall x.
    Rep ListIdentityPoolUsageResponse x
    -> ListIdentityPoolUsageResponse)
-> Generic ListIdentityPoolUsageResponse
forall x.
Rep ListIdentityPoolUsageResponse x
-> ListIdentityPoolUsageResponse
forall x.
ListIdentityPoolUsageResponse
-> Rep ListIdentityPoolUsageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListIdentityPoolUsageResponse x
-> ListIdentityPoolUsageResponse
$cfrom :: forall x.
ListIdentityPoolUsageResponse
-> Rep ListIdentityPoolUsageResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListIdentityPoolUsageResponse' 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:
--
-- 'identityPoolUsages', 'listIdentityPoolUsageResponse_identityPoolUsages' - Usage information for the identity pools.
--
-- 'count', 'listIdentityPoolUsageResponse_count' - Total number of identities for the identity pool.
--
-- 'nextToken', 'listIdentityPoolUsageResponse_nextToken' - A pagination token for obtaining the next page of results.
--
-- 'maxResults', 'listIdentityPoolUsageResponse_maxResults' - The maximum number of results to be returned.
--
-- 'httpStatus', 'listIdentityPoolUsageResponse_httpStatus' - The response's http status code.
newListIdentityPoolUsageResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListIdentityPoolUsageResponse
newListIdentityPoolUsageResponse :: Int -> ListIdentityPoolUsageResponse
newListIdentityPoolUsageResponse Int
pHttpStatus_ =
  ListIdentityPoolUsageResponse' :: Maybe [IdentityPoolUsage]
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Int
-> ListIdentityPoolUsageResponse
ListIdentityPoolUsageResponse'
    { $sel:identityPoolUsages:ListIdentityPoolUsageResponse' :: Maybe [IdentityPoolUsage]
identityPoolUsages =
        Maybe [IdentityPoolUsage]
forall a. Maybe a
Prelude.Nothing,
      $sel:count:ListIdentityPoolUsageResponse' :: Maybe Int
count = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListIdentityPoolUsageResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListIdentityPoolUsageResponse' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListIdentityPoolUsageResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Usage information for the identity pools.
listIdentityPoolUsageResponse_identityPoolUsages :: Lens.Lens' ListIdentityPoolUsageResponse (Prelude.Maybe [IdentityPoolUsage])
listIdentityPoolUsageResponse_identityPoolUsages :: (Maybe [IdentityPoolUsage] -> f (Maybe [IdentityPoolUsage]))
-> ListIdentityPoolUsageResponse -> f ListIdentityPoolUsageResponse
listIdentityPoolUsageResponse_identityPoolUsages = (ListIdentityPoolUsageResponse -> Maybe [IdentityPoolUsage])
-> (ListIdentityPoolUsageResponse
    -> Maybe [IdentityPoolUsage] -> ListIdentityPoolUsageResponse)
-> Lens
     ListIdentityPoolUsageResponse
     ListIdentityPoolUsageResponse
     (Maybe [IdentityPoolUsage])
     (Maybe [IdentityPoolUsage])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentityPoolUsageResponse' {Maybe [IdentityPoolUsage]
identityPoolUsages :: Maybe [IdentityPoolUsage]
$sel:identityPoolUsages:ListIdentityPoolUsageResponse' :: ListIdentityPoolUsageResponse -> Maybe [IdentityPoolUsage]
identityPoolUsages} -> Maybe [IdentityPoolUsage]
identityPoolUsages) (\s :: ListIdentityPoolUsageResponse
s@ListIdentityPoolUsageResponse' {} Maybe [IdentityPoolUsage]
a -> ListIdentityPoolUsageResponse
s {$sel:identityPoolUsages:ListIdentityPoolUsageResponse' :: Maybe [IdentityPoolUsage]
identityPoolUsages = Maybe [IdentityPoolUsage]
a} :: ListIdentityPoolUsageResponse) ((Maybe [IdentityPoolUsage] -> f (Maybe [IdentityPoolUsage]))
 -> ListIdentityPoolUsageResponse
 -> f ListIdentityPoolUsageResponse)
-> ((Maybe [IdentityPoolUsage] -> f (Maybe [IdentityPoolUsage]))
    -> Maybe [IdentityPoolUsage] -> f (Maybe [IdentityPoolUsage]))
-> (Maybe [IdentityPoolUsage] -> f (Maybe [IdentityPoolUsage]))
-> ListIdentityPoolUsageResponse
-> f ListIdentityPoolUsageResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [IdentityPoolUsage]
  [IdentityPoolUsage]
  [IdentityPoolUsage]
  [IdentityPoolUsage]
-> Iso
     (Maybe [IdentityPoolUsage])
     (Maybe [IdentityPoolUsage])
     (Maybe [IdentityPoolUsage])
     (Maybe [IdentityPoolUsage])
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
  [IdentityPoolUsage]
  [IdentityPoolUsage]
  [IdentityPoolUsage]
  [IdentityPoolUsage]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Total number of identities for the identity pool.
listIdentityPoolUsageResponse_count :: Lens.Lens' ListIdentityPoolUsageResponse (Prelude.Maybe Prelude.Int)
listIdentityPoolUsageResponse_count :: (Maybe Int -> f (Maybe Int))
-> ListIdentityPoolUsageResponse -> f ListIdentityPoolUsageResponse
listIdentityPoolUsageResponse_count = (ListIdentityPoolUsageResponse -> Maybe Int)
-> (ListIdentityPoolUsageResponse
    -> Maybe Int -> ListIdentityPoolUsageResponse)
-> Lens
     ListIdentityPoolUsageResponse
     ListIdentityPoolUsageResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentityPoolUsageResponse' {Maybe Int
count :: Maybe Int
$sel:count:ListIdentityPoolUsageResponse' :: ListIdentityPoolUsageResponse -> Maybe Int
count} -> Maybe Int
count) (\s :: ListIdentityPoolUsageResponse
s@ListIdentityPoolUsageResponse' {} Maybe Int
a -> ListIdentityPoolUsageResponse
s {$sel:count:ListIdentityPoolUsageResponse' :: Maybe Int
count = Maybe Int
a} :: ListIdentityPoolUsageResponse)

-- | A pagination token for obtaining the next page of results.
listIdentityPoolUsageResponse_nextToken :: Lens.Lens' ListIdentityPoolUsageResponse (Prelude.Maybe Prelude.Text)
listIdentityPoolUsageResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListIdentityPoolUsageResponse -> f ListIdentityPoolUsageResponse
listIdentityPoolUsageResponse_nextToken = (ListIdentityPoolUsageResponse -> Maybe Text)
-> (ListIdentityPoolUsageResponse
    -> Maybe Text -> ListIdentityPoolUsageResponse)
-> Lens
     ListIdentityPoolUsageResponse
     ListIdentityPoolUsageResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentityPoolUsageResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListIdentityPoolUsageResponse' :: ListIdentityPoolUsageResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListIdentityPoolUsageResponse
s@ListIdentityPoolUsageResponse' {} Maybe Text
a -> ListIdentityPoolUsageResponse
s {$sel:nextToken:ListIdentityPoolUsageResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListIdentityPoolUsageResponse)

-- | The maximum number of results to be returned.
listIdentityPoolUsageResponse_maxResults :: Lens.Lens' ListIdentityPoolUsageResponse (Prelude.Maybe Prelude.Int)
listIdentityPoolUsageResponse_maxResults :: (Maybe Int -> f (Maybe Int))
-> ListIdentityPoolUsageResponse -> f ListIdentityPoolUsageResponse
listIdentityPoolUsageResponse_maxResults = (ListIdentityPoolUsageResponse -> Maybe Int)
-> (ListIdentityPoolUsageResponse
    -> Maybe Int -> ListIdentityPoolUsageResponse)
-> Lens
     ListIdentityPoolUsageResponse
     ListIdentityPoolUsageResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentityPoolUsageResponse' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListIdentityPoolUsageResponse' :: ListIdentityPoolUsageResponse -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListIdentityPoolUsageResponse
s@ListIdentityPoolUsageResponse' {} Maybe Int
a -> ListIdentityPoolUsageResponse
s {$sel:maxResults:ListIdentityPoolUsageResponse' :: Maybe Int
maxResults = Maybe Int
a} :: ListIdentityPoolUsageResponse)

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

instance Prelude.NFData ListIdentityPoolUsageResponse