{-# 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.SDB.ListDomains
-- 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)
--
-- The @ListDomains@ operation lists all domains associated with the Access
-- Key ID. It returns domain names up to the limit set by
-- <#MaxNumberOfDomains MaxNumberOfDomains>. A <#NextToken NextToken> is
-- returned if there are more than @MaxNumberOfDomains@ domains. Calling
-- @ListDomains@ successive times with the @NextToken@ provided by the
-- operation returns up to @MaxNumberOfDomains@ more domain names with each
-- successive operation call.
--
-- This operation returns paginated results.
module Amazonka.SDB.ListDomains
  ( -- * Creating a Request
    ListDomains (..),
    newListDomains,

    -- * Request Lenses
    listDomains_maxNumberOfDomains,
    listDomains_nextToken,

    -- * Destructuring the Response
    ListDomainsResponse (..),
    newListDomainsResponse,

    -- * Response Lenses
    listDomainsResponse_domainNames,
    listDomainsResponse_nextToken,
    listDomainsResponse_httpStatus,
  )
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.SDB.Types

-- | /See:/ 'newListDomains' smart constructor.
data ListDomains = ListDomains'
  { -- | The maximum number of domain names you want returned. The range is 1 to
    -- 100. The default setting is 100.
    ListDomains -> Maybe Int
maxNumberOfDomains :: Prelude.Maybe Prelude.Int,
    -- | A string informing Amazon SimpleDB where to start the next list of
    -- domain names.
    ListDomains -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListDomains -> ListDomains -> Bool
(ListDomains -> ListDomains -> Bool)
-> (ListDomains -> ListDomains -> Bool) -> Eq ListDomains
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDomains -> ListDomains -> Bool
$c/= :: ListDomains -> ListDomains -> Bool
== :: ListDomains -> ListDomains -> Bool
$c== :: ListDomains -> ListDomains -> Bool
Prelude.Eq, ReadPrec [ListDomains]
ReadPrec ListDomains
Int -> ReadS ListDomains
ReadS [ListDomains]
(Int -> ReadS ListDomains)
-> ReadS [ListDomains]
-> ReadPrec ListDomains
-> ReadPrec [ListDomains]
-> Read ListDomains
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDomains]
$creadListPrec :: ReadPrec [ListDomains]
readPrec :: ReadPrec ListDomains
$creadPrec :: ReadPrec ListDomains
readList :: ReadS [ListDomains]
$creadList :: ReadS [ListDomains]
readsPrec :: Int -> ReadS ListDomains
$creadsPrec :: Int -> ReadS ListDomains
Prelude.Read, Int -> ListDomains -> ShowS
[ListDomains] -> ShowS
ListDomains -> String
(Int -> ListDomains -> ShowS)
-> (ListDomains -> String)
-> ([ListDomains] -> ShowS)
-> Show ListDomains
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDomains] -> ShowS
$cshowList :: [ListDomains] -> ShowS
show :: ListDomains -> String
$cshow :: ListDomains -> String
showsPrec :: Int -> ListDomains -> ShowS
$cshowsPrec :: Int -> ListDomains -> ShowS
Prelude.Show, (forall x. ListDomains -> Rep ListDomains x)
-> (forall x. Rep ListDomains x -> ListDomains)
-> Generic ListDomains
forall x. Rep ListDomains x -> ListDomains
forall x. ListDomains -> Rep ListDomains x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDomains x -> ListDomains
$cfrom :: forall x. ListDomains -> Rep ListDomains x
Prelude.Generic)

-- |
-- Create a value of 'ListDomains' 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:
--
-- 'maxNumberOfDomains', 'listDomains_maxNumberOfDomains' - The maximum number of domain names you want returned. The range is 1 to
-- 100. The default setting is 100.
--
-- 'nextToken', 'listDomains_nextToken' - A string informing Amazon SimpleDB where to start the next list of
-- domain names.
newListDomains ::
  ListDomains
newListDomains :: ListDomains
newListDomains =
  ListDomains' :: Maybe Int -> Maybe Text -> ListDomains
ListDomains'
    { $sel:maxNumberOfDomains:ListDomains' :: Maybe Int
maxNumberOfDomains = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDomains' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of domain names you want returned. The range is 1 to
-- 100. The default setting is 100.
listDomains_maxNumberOfDomains :: Lens.Lens' ListDomains (Prelude.Maybe Prelude.Int)
listDomains_maxNumberOfDomains :: (Maybe Int -> f (Maybe Int)) -> ListDomains -> f ListDomains
listDomains_maxNumberOfDomains = (ListDomains -> Maybe Int)
-> (ListDomains -> Maybe Int -> ListDomains)
-> Lens ListDomains ListDomains (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDomains' {Maybe Int
maxNumberOfDomains :: Maybe Int
$sel:maxNumberOfDomains:ListDomains' :: ListDomains -> Maybe Int
maxNumberOfDomains} -> Maybe Int
maxNumberOfDomains) (\s :: ListDomains
s@ListDomains' {} Maybe Int
a -> ListDomains
s {$sel:maxNumberOfDomains:ListDomains' :: Maybe Int
maxNumberOfDomains = Maybe Int
a} :: ListDomains)

-- | A string informing Amazon SimpleDB where to start the next list of
-- domain names.
listDomains_nextToken :: Lens.Lens' ListDomains (Prelude.Maybe Prelude.Text)
listDomains_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListDomains -> f ListDomains
listDomains_nextToken = (ListDomains -> Maybe Text)
-> (ListDomains -> Maybe Text -> ListDomains)
-> Lens ListDomains ListDomains (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDomains' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDomains' :: ListDomains -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDomains
s@ListDomains' {} Maybe Text
a -> ListDomains
s {$sel:nextToken:ListDomains' :: Maybe Text
nextToken = Maybe Text
a} :: ListDomains)

instance Core.AWSPager ListDomains where
  page :: ListDomains -> AWSResponse ListDomains -> Maybe ListDomains
page ListDomains
rq AWSResponse ListDomains
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDomains
ListDomainsResponse
rs
            ListDomainsResponse
-> Getting (First Text) ListDomainsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDomainsResponse -> Const (First Text) ListDomainsResponse
Lens' ListDomainsResponse (Maybe Text)
listDomainsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDomainsResponse -> Const (First Text) ListDomainsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDomainsResponse 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 ListDomains
forall a. Maybe a
Prelude.Nothing
    | Maybe [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDomains
ListDomainsResponse
rs
            ListDomainsResponse
-> Getting (First [Text]) ListDomainsResponse [Text]
-> Maybe [Text]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> ListDomainsResponse -> Const (First [Text]) ListDomainsResponse
Lens' ListDomainsResponse (Maybe [Text])
listDomainsResponse_domainNames ((Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
 -> ListDomainsResponse -> Const (First [Text]) ListDomainsResponse)
-> (([Text] -> Const (First [Text]) [Text])
    -> Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> Getting (First [Text]) ListDomainsResponse [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 ListDomains
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListDomains -> Maybe ListDomains
forall a. a -> Maybe a
Prelude.Just (ListDomains -> Maybe ListDomains)
-> ListDomains -> Maybe ListDomains
forall a b. (a -> b) -> a -> b
Prelude.$
        ListDomains
rq
          ListDomains -> (ListDomains -> ListDomains) -> ListDomains
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListDomains -> Identity ListDomains
Lens ListDomains ListDomains (Maybe Text) (Maybe Text)
listDomains_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListDomains -> Identity ListDomains)
-> Maybe Text -> ListDomains -> ListDomains
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDomains
ListDomainsResponse
rs
          ListDomainsResponse
-> Getting (First Text) ListDomainsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDomainsResponse -> Const (First Text) ListDomainsResponse
Lens' ListDomainsResponse (Maybe Text)
listDomainsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDomainsResponse -> Const (First Text) ListDomainsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDomainsResponse 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 ListDomains where
  type AWSResponse ListDomains = ListDomainsResponse
  request :: ListDomains -> Request ListDomains
request = Service -> ListDomains -> Request ListDomains
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ListDomains
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListDomains)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ListDomains))
-> Logger
-> Service
-> Proxy ListDomains
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListDomains)))
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
"ListDomainsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [Text] -> Maybe Text -> Int -> ListDomainsResponse
ListDomainsResponse'
            (Maybe [Text] -> Maybe Text -> Int -> ListDomainsResponse)
-> Either String (Maybe [Text])
-> Either String (Maybe Text -> Int -> ListDomainsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"DomainName") [Node]
x)
            Either String (Maybe Text -> Int -> ListDomainsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListDomainsResponse)
forall (f :: * -> *) a b. Applicative f => 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 -> ListDomainsResponse)
-> Either String Int -> Either String ListDomainsResponse
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 ListDomains

instance Prelude.NFData ListDomains

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

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

instance Core.ToQuery ListDomains where
  toQuery :: ListDomains -> QueryString
toQuery ListDomains' {Maybe Int
Maybe Text
nextToken :: Maybe Text
maxNumberOfDomains :: Maybe Int
$sel:nextToken:ListDomains' :: ListDomains -> Maybe Text
$sel:maxNumberOfDomains:ListDomains' :: ListDomains -> Maybe Int
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ListDomains" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2009-04-15" :: Prelude.ByteString),
        ByteString
"MaxNumberOfDomains" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxNumberOfDomains,
        ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newListDomainsResponse' smart constructor.
data ListDomainsResponse = ListDomainsResponse'
  { -- | A list of domain names that match the expression.
    ListDomainsResponse -> Maybe [Text]
domainNames :: Prelude.Maybe [Prelude.Text],
    -- | An opaque token indicating that there are more domains than the
    -- specified @MaxNumberOfDomains@ still available.
    ListDomainsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListDomainsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDomainsResponse -> ListDomainsResponse -> Bool
(ListDomainsResponse -> ListDomainsResponse -> Bool)
-> (ListDomainsResponse -> ListDomainsResponse -> Bool)
-> Eq ListDomainsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDomainsResponse -> ListDomainsResponse -> Bool
$c/= :: ListDomainsResponse -> ListDomainsResponse -> Bool
== :: ListDomainsResponse -> ListDomainsResponse -> Bool
$c== :: ListDomainsResponse -> ListDomainsResponse -> Bool
Prelude.Eq, ReadPrec [ListDomainsResponse]
ReadPrec ListDomainsResponse
Int -> ReadS ListDomainsResponse
ReadS [ListDomainsResponse]
(Int -> ReadS ListDomainsResponse)
-> ReadS [ListDomainsResponse]
-> ReadPrec ListDomainsResponse
-> ReadPrec [ListDomainsResponse]
-> Read ListDomainsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDomainsResponse]
$creadListPrec :: ReadPrec [ListDomainsResponse]
readPrec :: ReadPrec ListDomainsResponse
$creadPrec :: ReadPrec ListDomainsResponse
readList :: ReadS [ListDomainsResponse]
$creadList :: ReadS [ListDomainsResponse]
readsPrec :: Int -> ReadS ListDomainsResponse
$creadsPrec :: Int -> ReadS ListDomainsResponse
Prelude.Read, Int -> ListDomainsResponse -> ShowS
[ListDomainsResponse] -> ShowS
ListDomainsResponse -> String
(Int -> ListDomainsResponse -> ShowS)
-> (ListDomainsResponse -> String)
-> ([ListDomainsResponse] -> ShowS)
-> Show ListDomainsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDomainsResponse] -> ShowS
$cshowList :: [ListDomainsResponse] -> ShowS
show :: ListDomainsResponse -> String
$cshow :: ListDomainsResponse -> String
showsPrec :: Int -> ListDomainsResponse -> ShowS
$cshowsPrec :: Int -> ListDomainsResponse -> ShowS
Prelude.Show, (forall x. ListDomainsResponse -> Rep ListDomainsResponse x)
-> (forall x. Rep ListDomainsResponse x -> ListDomainsResponse)
-> Generic ListDomainsResponse
forall x. Rep ListDomainsResponse x -> ListDomainsResponse
forall x. ListDomainsResponse -> Rep ListDomainsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDomainsResponse x -> ListDomainsResponse
$cfrom :: forall x. ListDomainsResponse -> Rep ListDomainsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDomainsResponse' 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:
--
-- 'domainNames', 'listDomainsResponse_domainNames' - A list of domain names that match the expression.
--
-- 'nextToken', 'listDomainsResponse_nextToken' - An opaque token indicating that there are more domains than the
-- specified @MaxNumberOfDomains@ still available.
--
-- 'httpStatus', 'listDomainsResponse_httpStatus' - The response's http status code.
newListDomainsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDomainsResponse
newListDomainsResponse :: Int -> ListDomainsResponse
newListDomainsResponse Int
pHttpStatus_ =
  ListDomainsResponse' :: Maybe [Text] -> Maybe Text -> Int -> ListDomainsResponse
ListDomainsResponse'
    { $sel:domainNames:ListDomainsResponse' :: Maybe [Text]
domainNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDomainsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDomainsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of domain names that match the expression.
listDomainsResponse_domainNames :: Lens.Lens' ListDomainsResponse (Prelude.Maybe [Prelude.Text])
listDomainsResponse_domainNames :: (Maybe [Text] -> f (Maybe [Text]))
-> ListDomainsResponse -> f ListDomainsResponse
listDomainsResponse_domainNames = (ListDomainsResponse -> Maybe [Text])
-> (ListDomainsResponse -> Maybe [Text] -> ListDomainsResponse)
-> Lens' ListDomainsResponse (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDomainsResponse' {Maybe [Text]
domainNames :: Maybe [Text]
$sel:domainNames:ListDomainsResponse' :: ListDomainsResponse -> Maybe [Text]
domainNames} -> Maybe [Text]
domainNames) (\s :: ListDomainsResponse
s@ListDomainsResponse' {} Maybe [Text]
a -> ListDomainsResponse
s {$sel:domainNames:ListDomainsResponse' :: Maybe [Text]
domainNames = Maybe [Text]
a} :: ListDomainsResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ListDomainsResponse -> f ListDomainsResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListDomainsResponse
-> f ListDomainsResponse
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

-- | An opaque token indicating that there are more domains than the
-- specified @MaxNumberOfDomains@ still available.
listDomainsResponse_nextToken :: Lens.Lens' ListDomainsResponse (Prelude.Maybe Prelude.Text)
listDomainsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDomainsResponse -> f ListDomainsResponse
listDomainsResponse_nextToken = (ListDomainsResponse -> Maybe Text)
-> (ListDomainsResponse -> Maybe Text -> ListDomainsResponse)
-> Lens' ListDomainsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDomainsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDomainsResponse' :: ListDomainsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDomainsResponse
s@ListDomainsResponse' {} Maybe Text
a -> ListDomainsResponse
s {$sel:nextToken:ListDomainsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDomainsResponse)

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

instance Prelude.NFData ListDomainsResponse