{-# 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.SES.ListIdentities
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list containing all of the identities (email addresses and
-- domains) for your AWS account in the current AWS Region, regardless of
-- verification status.
--
-- You can execute this operation no more than once per second.
--
-- This operation returns paginated results.
module Amazonka.SES.ListIdentities
  ( -- * Creating a Request
    ListIdentities (..),
    newListIdentities,

    -- * Request Lenses
    listIdentities_identityType,
    listIdentities_nextToken,
    listIdentities_maxItems,

    -- * Destructuring the Response
    ListIdentitiesResponse (..),
    newListIdentitiesResponse,

    -- * Response Lenses
    listIdentitiesResponse_nextToken,
    listIdentitiesResponse_httpStatus,
    listIdentitiesResponse_identities,
  )
where

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
import Amazonka.SES.Types

-- | Represents a request to return a list of all identities (email addresses
-- and domains) that you have attempted to verify under your AWS account,
-- regardless of verification status.
--
-- /See:/ 'newListIdentities' smart constructor.
data ListIdentities = ListIdentities'
  { -- | The type of the identities to list. Possible values are \"EmailAddress\"
    -- and \"Domain\". If this parameter is omitted, then all identities will
    -- be listed.
    ListIdentities -> Maybe IdentityType
identityType :: Prelude.Maybe IdentityType,
    -- | The token to use for pagination.
    ListIdentities -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of identities per page. Possible values are 1-1000
    -- inclusive.
    ListIdentities -> Maybe Int
maxItems :: Prelude.Maybe Prelude.Int
  }
  deriving (ListIdentities -> ListIdentities -> Bool
(ListIdentities -> ListIdentities -> Bool)
-> (ListIdentities -> ListIdentities -> Bool) -> Eq ListIdentities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListIdentities -> ListIdentities -> Bool
$c/= :: ListIdentities -> ListIdentities -> Bool
== :: ListIdentities -> ListIdentities -> Bool
$c== :: ListIdentities -> ListIdentities -> Bool
Prelude.Eq, ReadPrec [ListIdentities]
ReadPrec ListIdentities
Int -> ReadS ListIdentities
ReadS [ListIdentities]
(Int -> ReadS ListIdentities)
-> ReadS [ListIdentities]
-> ReadPrec ListIdentities
-> ReadPrec [ListIdentities]
-> Read ListIdentities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListIdentities]
$creadListPrec :: ReadPrec [ListIdentities]
readPrec :: ReadPrec ListIdentities
$creadPrec :: ReadPrec ListIdentities
readList :: ReadS [ListIdentities]
$creadList :: ReadS [ListIdentities]
readsPrec :: Int -> ReadS ListIdentities
$creadsPrec :: Int -> ReadS ListIdentities
Prelude.Read, Int -> ListIdentities -> ShowS
[ListIdentities] -> ShowS
ListIdentities -> String
(Int -> ListIdentities -> ShowS)
-> (ListIdentities -> String)
-> ([ListIdentities] -> ShowS)
-> Show ListIdentities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListIdentities] -> ShowS
$cshowList :: [ListIdentities] -> ShowS
show :: ListIdentities -> String
$cshow :: ListIdentities -> String
showsPrec :: Int -> ListIdentities -> ShowS
$cshowsPrec :: Int -> ListIdentities -> ShowS
Prelude.Show, (forall x. ListIdentities -> Rep ListIdentities x)
-> (forall x. Rep ListIdentities x -> ListIdentities)
-> Generic ListIdentities
forall x. Rep ListIdentities x -> ListIdentities
forall x. ListIdentities -> Rep ListIdentities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListIdentities x -> ListIdentities
$cfrom :: forall x. ListIdentities -> Rep ListIdentities x
Prelude.Generic)

-- |
-- Create a value of 'ListIdentities' 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:
--
-- 'identityType', 'listIdentities_identityType' - The type of the identities to list. Possible values are \"EmailAddress\"
-- and \"Domain\". If this parameter is omitted, then all identities will
-- be listed.
--
-- 'nextToken', 'listIdentities_nextToken' - The token to use for pagination.
--
-- 'maxItems', 'listIdentities_maxItems' - The maximum number of identities per page. Possible values are 1-1000
-- inclusive.
newListIdentities ::
  ListIdentities
newListIdentities :: ListIdentities
newListIdentities =
  ListIdentities' :: Maybe IdentityType -> Maybe Text -> Maybe Int -> ListIdentities
ListIdentities'
    { $sel:identityType:ListIdentities' :: Maybe IdentityType
identityType = Maybe IdentityType
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListIdentities' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListIdentities' :: Maybe Int
maxItems = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The type of the identities to list. Possible values are \"EmailAddress\"
-- and \"Domain\". If this parameter is omitted, then all identities will
-- be listed.
listIdentities_identityType :: Lens.Lens' ListIdentities (Prelude.Maybe IdentityType)
listIdentities_identityType :: (Maybe IdentityType -> f (Maybe IdentityType))
-> ListIdentities -> f ListIdentities
listIdentities_identityType = (ListIdentities -> Maybe IdentityType)
-> (ListIdentities -> Maybe IdentityType -> ListIdentities)
-> Lens
     ListIdentities
     ListIdentities
     (Maybe IdentityType)
     (Maybe IdentityType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentities' {Maybe IdentityType
identityType :: Maybe IdentityType
$sel:identityType:ListIdentities' :: ListIdentities -> Maybe IdentityType
identityType} -> Maybe IdentityType
identityType) (\s :: ListIdentities
s@ListIdentities' {} Maybe IdentityType
a -> ListIdentities
s {$sel:identityType:ListIdentities' :: Maybe IdentityType
identityType = Maybe IdentityType
a} :: ListIdentities)

-- | The token to use for pagination.
listIdentities_nextToken :: Lens.Lens' ListIdentities (Prelude.Maybe Prelude.Text)
listIdentities_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListIdentities -> f ListIdentities
listIdentities_nextToken = (ListIdentities -> Maybe Text)
-> (ListIdentities -> Maybe Text -> ListIdentities)
-> Lens ListIdentities ListIdentities (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentities' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListIdentities' :: ListIdentities -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListIdentities
s@ListIdentities' {} Maybe Text
a -> ListIdentities
s {$sel:nextToken:ListIdentities' :: Maybe Text
nextToken = Maybe Text
a} :: ListIdentities)

-- | The maximum number of identities per page. Possible values are 1-1000
-- inclusive.
listIdentities_maxItems :: Lens.Lens' ListIdentities (Prelude.Maybe Prelude.Int)
listIdentities_maxItems :: (Maybe Int -> f (Maybe Int)) -> ListIdentities -> f ListIdentities
listIdentities_maxItems = (ListIdentities -> Maybe Int)
-> (ListIdentities -> Maybe Int -> ListIdentities)
-> Lens ListIdentities ListIdentities (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentities' {Maybe Int
maxItems :: Maybe Int
$sel:maxItems:ListIdentities' :: ListIdentities -> Maybe Int
maxItems} -> Maybe Int
maxItems) (\s :: ListIdentities
s@ListIdentities' {} Maybe Int
a -> ListIdentities
s {$sel:maxItems:ListIdentities' :: Maybe Int
maxItems = Maybe Int
a} :: ListIdentities)

instance Core.AWSPager ListIdentities where
  page :: ListIdentities
-> AWSResponse ListIdentities -> Maybe ListIdentities
page ListIdentities
rq AWSResponse ListIdentities
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListIdentities
ListIdentitiesResponse
rs
            ListIdentitiesResponse
-> Getting (First Text) ListIdentitiesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListIdentitiesResponse
-> Const (First Text) ListIdentitiesResponse
Lens' ListIdentitiesResponse (Maybe Text)
listIdentitiesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListIdentitiesResponse
 -> Const (First Text) ListIdentitiesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListIdentitiesResponse 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 ListIdentities
forall a. Maybe a
Prelude.Nothing
    | [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse ListIdentities
ListIdentitiesResponse
rs ListIdentitiesResponse
-> Getting [Text] ListIdentitiesResponse [Text] -> [Text]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [Text] ListIdentitiesResponse [Text]
Lens' ListIdentitiesResponse [Text]
listIdentitiesResponse_identities) =
      Maybe ListIdentities
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListIdentities -> Maybe ListIdentities
forall a. a -> Maybe a
Prelude.Just (ListIdentities -> Maybe ListIdentities)
-> ListIdentities -> Maybe ListIdentities
forall a b. (a -> b) -> a -> b
Prelude.$
        ListIdentities
rq
          ListIdentities
-> (ListIdentities -> ListIdentities) -> ListIdentities
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListIdentities -> Identity ListIdentities
Lens ListIdentities ListIdentities (Maybe Text) (Maybe Text)
listIdentities_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListIdentities -> Identity ListIdentities)
-> Maybe Text -> ListIdentities -> ListIdentities
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListIdentities
ListIdentitiesResponse
rs
          ListIdentitiesResponse
-> Getting (First Text) ListIdentitiesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListIdentitiesResponse
-> Const (First Text) ListIdentitiesResponse
Lens' ListIdentitiesResponse (Maybe Text)
listIdentitiesResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListIdentitiesResponse
 -> Const (First Text) ListIdentitiesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListIdentitiesResponse 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 ListIdentities where
  type
    AWSResponse ListIdentities =
      ListIdentitiesResponse
  request :: ListIdentities -> Request ListIdentities
request = Service -> ListIdentities -> Request ListIdentities
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ListIdentities
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListIdentities)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ListIdentities))
-> Logger
-> Service
-> Proxy ListIdentities
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListIdentities)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"ListIdentitiesResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text -> Int -> [Text] -> ListIdentitiesResponse
ListIdentitiesResponse'
            (Maybe Text -> Int -> [Text] -> ListIdentitiesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> [Text] -> ListIdentitiesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextToken")
            Either String (Int -> [Text] -> ListIdentitiesResponse)
-> Either String Int
-> Either String ([Text] -> ListIdentitiesResponse)
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))
            Either String ([Text] -> ListIdentitiesResponse)
-> Either String [Text] -> Either String ListIdentitiesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Identities" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String [Text]) -> Either String [Text]
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member"
                        )
      )

instance Prelude.Hashable ListIdentities

instance Prelude.NFData ListIdentities

instance Core.ToHeaders ListIdentities where
  toHeaders :: ListIdentities -> ResponseHeaders
toHeaders = ResponseHeaders -> ListIdentities -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance Core.ToQuery ListIdentities where
  toQuery :: ListIdentities -> QueryString
toQuery ListIdentities' {Maybe Int
Maybe Text
Maybe IdentityType
maxItems :: Maybe Int
nextToken :: Maybe Text
identityType :: Maybe IdentityType
$sel:maxItems:ListIdentities' :: ListIdentities -> Maybe Int
$sel:nextToken:ListIdentities' :: ListIdentities -> Maybe Text
$sel:identityType:ListIdentities' :: ListIdentities -> Maybe IdentityType
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ListIdentities" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
        ByteString
"IdentityType" ByteString -> Maybe IdentityType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe IdentityType
identityType,
        ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"MaxItems" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxItems
      ]

-- | A list of all identities that you have attempted to verify under your
-- AWS account, regardless of verification status.
--
-- /See:/ 'newListIdentitiesResponse' smart constructor.
data ListIdentitiesResponse = ListIdentitiesResponse'
  { -- | The token used for pagination.
    ListIdentitiesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListIdentitiesResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of identities.
    ListIdentitiesResponse -> [Text]
identities :: [Prelude.Text]
  }
  deriving (ListIdentitiesResponse -> ListIdentitiesResponse -> Bool
(ListIdentitiesResponse -> ListIdentitiesResponse -> Bool)
-> (ListIdentitiesResponse -> ListIdentitiesResponse -> Bool)
-> Eq ListIdentitiesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListIdentitiesResponse -> ListIdentitiesResponse -> Bool
$c/= :: ListIdentitiesResponse -> ListIdentitiesResponse -> Bool
== :: ListIdentitiesResponse -> ListIdentitiesResponse -> Bool
$c== :: ListIdentitiesResponse -> ListIdentitiesResponse -> Bool
Prelude.Eq, ReadPrec [ListIdentitiesResponse]
ReadPrec ListIdentitiesResponse
Int -> ReadS ListIdentitiesResponse
ReadS [ListIdentitiesResponse]
(Int -> ReadS ListIdentitiesResponse)
-> ReadS [ListIdentitiesResponse]
-> ReadPrec ListIdentitiesResponse
-> ReadPrec [ListIdentitiesResponse]
-> Read ListIdentitiesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListIdentitiesResponse]
$creadListPrec :: ReadPrec [ListIdentitiesResponse]
readPrec :: ReadPrec ListIdentitiesResponse
$creadPrec :: ReadPrec ListIdentitiesResponse
readList :: ReadS [ListIdentitiesResponse]
$creadList :: ReadS [ListIdentitiesResponse]
readsPrec :: Int -> ReadS ListIdentitiesResponse
$creadsPrec :: Int -> ReadS ListIdentitiesResponse
Prelude.Read, Int -> ListIdentitiesResponse -> ShowS
[ListIdentitiesResponse] -> ShowS
ListIdentitiesResponse -> String
(Int -> ListIdentitiesResponse -> ShowS)
-> (ListIdentitiesResponse -> String)
-> ([ListIdentitiesResponse] -> ShowS)
-> Show ListIdentitiesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListIdentitiesResponse] -> ShowS
$cshowList :: [ListIdentitiesResponse] -> ShowS
show :: ListIdentitiesResponse -> String
$cshow :: ListIdentitiesResponse -> String
showsPrec :: Int -> ListIdentitiesResponse -> ShowS
$cshowsPrec :: Int -> ListIdentitiesResponse -> ShowS
Prelude.Show, (forall x. ListIdentitiesResponse -> Rep ListIdentitiesResponse x)
-> (forall x.
    Rep ListIdentitiesResponse x -> ListIdentitiesResponse)
-> Generic ListIdentitiesResponse
forall x. Rep ListIdentitiesResponse x -> ListIdentitiesResponse
forall x. ListIdentitiesResponse -> Rep ListIdentitiesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListIdentitiesResponse x -> ListIdentitiesResponse
$cfrom :: forall x. ListIdentitiesResponse -> Rep ListIdentitiesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListIdentitiesResponse' 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', 'listIdentitiesResponse_nextToken' - The token used for pagination.
--
-- 'httpStatus', 'listIdentitiesResponse_httpStatus' - The response's http status code.
--
-- 'identities', 'listIdentitiesResponse_identities' - A list of identities.
newListIdentitiesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListIdentitiesResponse
newListIdentitiesResponse :: Int -> ListIdentitiesResponse
newListIdentitiesResponse Int
pHttpStatus_ =
  ListIdentitiesResponse' :: Maybe Text -> Int -> [Text] -> ListIdentitiesResponse
ListIdentitiesResponse'
    { $sel:nextToken:ListIdentitiesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListIdentitiesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:identities:ListIdentitiesResponse' :: [Text]
identities = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The token used for pagination.
listIdentitiesResponse_nextToken :: Lens.Lens' ListIdentitiesResponse (Prelude.Maybe Prelude.Text)
listIdentitiesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListIdentitiesResponse -> f ListIdentitiesResponse
listIdentitiesResponse_nextToken = (ListIdentitiesResponse -> Maybe Text)
-> (ListIdentitiesResponse -> Maybe Text -> ListIdentitiesResponse)
-> Lens' ListIdentitiesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentitiesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListIdentitiesResponse' :: ListIdentitiesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListIdentitiesResponse
s@ListIdentitiesResponse' {} Maybe Text
a -> ListIdentitiesResponse
s {$sel:nextToken:ListIdentitiesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListIdentitiesResponse)

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

-- | A list of identities.
listIdentitiesResponse_identities :: Lens.Lens' ListIdentitiesResponse [Prelude.Text]
listIdentitiesResponse_identities :: ([Text] -> f [Text])
-> ListIdentitiesResponse -> f ListIdentitiesResponse
listIdentitiesResponse_identities = (ListIdentitiesResponse -> [Text])
-> (ListIdentitiesResponse -> [Text] -> ListIdentitiesResponse)
-> Lens' ListIdentitiesResponse [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIdentitiesResponse' {[Text]
identities :: [Text]
$sel:identities:ListIdentitiesResponse' :: ListIdentitiesResponse -> [Text]
identities} -> [Text]
identities) (\s :: ListIdentitiesResponse
s@ListIdentitiesResponse' {} [Text]
a -> ListIdentitiesResponse
s {$sel:identities:ListIdentitiesResponse' :: [Text]
identities = [Text]
a} :: ListIdentitiesResponse) (([Text] -> f [Text])
 -> ListIdentitiesResponse -> f ListIdentitiesResponse)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ListIdentitiesResponse
-> f ListIdentitiesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListIdentitiesResponse