{-# 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.Route53.ListReusableDelegationSets
-- 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)
--
-- Retrieves a list of the reusable delegation sets that are associated
-- with the current Amazon Web Services account.
module Amazonka.Route53.ListReusableDelegationSets
  ( -- * Creating a Request
    ListReusableDelegationSets (..),
    newListReusableDelegationSets,

    -- * Request Lenses
    listReusableDelegationSets_marker,
    listReusableDelegationSets_maxItems,

    -- * Destructuring the Response
    ListReusableDelegationSetsResponse (..),
    newListReusableDelegationSetsResponse,

    -- * Response Lenses
    listReusableDelegationSetsResponse_nextMarker,
    listReusableDelegationSetsResponse_httpStatus,
    listReusableDelegationSetsResponse_delegationSets,
    listReusableDelegationSetsResponse_marker,
    listReusableDelegationSetsResponse_isTruncated,
    listReusableDelegationSetsResponse_maxItems,
  )
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.Route53.Types

-- | A request to get a list of the reusable delegation sets that are
-- associated with the current Amazon Web Services account.
--
-- /See:/ 'newListReusableDelegationSets' smart constructor.
data ListReusableDelegationSets = ListReusableDelegationSets'
  { -- | If the value of @IsTruncated@ in the previous response was @true@, you
    -- have more reusable delegation sets. To get another group, submit another
    -- @ListReusableDelegationSets@ request.
    --
    -- For the value of @marker@, specify the value of @NextMarker@ from the
    -- previous response, which is the ID of the first reusable delegation set
    -- that Amazon Route 53 will return if you submit another request.
    --
    -- If the value of @IsTruncated@ in the previous response was @false@,
    -- there are no more reusable delegation sets to get.
    ListReusableDelegationSets -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The number of reusable delegation sets that you want Amazon Route 53 to
    -- return in the response to this request. If you specify a value greater
    -- than 100, Route 53 returns only the first 100 reusable delegation sets.
    ListReusableDelegationSets -> Maybe Text
maxItems :: Prelude.Maybe Prelude.Text
  }
  deriving (ListReusableDelegationSets -> ListReusableDelegationSets -> Bool
(ListReusableDelegationSets -> ListReusableDelegationSets -> Bool)
-> (ListReusableDelegationSets
    -> ListReusableDelegationSets -> Bool)
-> Eq ListReusableDelegationSets
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReusableDelegationSets -> ListReusableDelegationSets -> Bool
$c/= :: ListReusableDelegationSets -> ListReusableDelegationSets -> Bool
== :: ListReusableDelegationSets -> ListReusableDelegationSets -> Bool
$c== :: ListReusableDelegationSets -> ListReusableDelegationSets -> Bool
Prelude.Eq, ReadPrec [ListReusableDelegationSets]
ReadPrec ListReusableDelegationSets
Int -> ReadS ListReusableDelegationSets
ReadS [ListReusableDelegationSets]
(Int -> ReadS ListReusableDelegationSets)
-> ReadS [ListReusableDelegationSets]
-> ReadPrec ListReusableDelegationSets
-> ReadPrec [ListReusableDelegationSets]
-> Read ListReusableDelegationSets
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReusableDelegationSets]
$creadListPrec :: ReadPrec [ListReusableDelegationSets]
readPrec :: ReadPrec ListReusableDelegationSets
$creadPrec :: ReadPrec ListReusableDelegationSets
readList :: ReadS [ListReusableDelegationSets]
$creadList :: ReadS [ListReusableDelegationSets]
readsPrec :: Int -> ReadS ListReusableDelegationSets
$creadsPrec :: Int -> ReadS ListReusableDelegationSets
Prelude.Read, Int -> ListReusableDelegationSets -> ShowS
[ListReusableDelegationSets] -> ShowS
ListReusableDelegationSets -> String
(Int -> ListReusableDelegationSets -> ShowS)
-> (ListReusableDelegationSets -> String)
-> ([ListReusableDelegationSets] -> ShowS)
-> Show ListReusableDelegationSets
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReusableDelegationSets] -> ShowS
$cshowList :: [ListReusableDelegationSets] -> ShowS
show :: ListReusableDelegationSets -> String
$cshow :: ListReusableDelegationSets -> String
showsPrec :: Int -> ListReusableDelegationSets -> ShowS
$cshowsPrec :: Int -> ListReusableDelegationSets -> ShowS
Prelude.Show, (forall x.
 ListReusableDelegationSets -> Rep ListReusableDelegationSets x)
-> (forall x.
    Rep ListReusableDelegationSets x -> ListReusableDelegationSets)
-> Generic ListReusableDelegationSets
forall x.
Rep ListReusableDelegationSets x -> ListReusableDelegationSets
forall x.
ListReusableDelegationSets -> Rep ListReusableDelegationSets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListReusableDelegationSets x -> ListReusableDelegationSets
$cfrom :: forall x.
ListReusableDelegationSets -> Rep ListReusableDelegationSets x
Prelude.Generic)

-- |
-- Create a value of 'ListReusableDelegationSets' 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:
--
-- 'marker', 'listReusableDelegationSets_marker' - If the value of @IsTruncated@ in the previous response was @true@, you
-- have more reusable delegation sets. To get another group, submit another
-- @ListReusableDelegationSets@ request.
--
-- For the value of @marker@, specify the value of @NextMarker@ from the
-- previous response, which is the ID of the first reusable delegation set
-- that Amazon Route 53 will return if you submit another request.
--
-- If the value of @IsTruncated@ in the previous response was @false@,
-- there are no more reusable delegation sets to get.
--
-- 'maxItems', 'listReusableDelegationSets_maxItems' - The number of reusable delegation sets that you want Amazon Route 53 to
-- return in the response to this request. If you specify a value greater
-- than 100, Route 53 returns only the first 100 reusable delegation sets.
newListReusableDelegationSets ::
  ListReusableDelegationSets
newListReusableDelegationSets :: ListReusableDelegationSets
newListReusableDelegationSets =
  ListReusableDelegationSets' :: Maybe Text -> Maybe Text -> ListReusableDelegationSets
ListReusableDelegationSets'
    { $sel:marker:ListReusableDelegationSets' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListReusableDelegationSets' :: Maybe Text
maxItems = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | If the value of @IsTruncated@ in the previous response was @true@, you
-- have more reusable delegation sets. To get another group, submit another
-- @ListReusableDelegationSets@ request.
--
-- For the value of @marker@, specify the value of @NextMarker@ from the
-- previous response, which is the ID of the first reusable delegation set
-- that Amazon Route 53 will return if you submit another request.
--
-- If the value of @IsTruncated@ in the previous response was @false@,
-- there are no more reusable delegation sets to get.
listReusableDelegationSets_marker :: Lens.Lens' ListReusableDelegationSets (Prelude.Maybe Prelude.Text)
listReusableDelegationSets_marker :: (Maybe Text -> f (Maybe Text))
-> ListReusableDelegationSets -> f ListReusableDelegationSets
listReusableDelegationSets_marker = (ListReusableDelegationSets -> Maybe Text)
-> (ListReusableDelegationSets
    -> Maybe Text -> ListReusableDelegationSets)
-> Lens
     ListReusableDelegationSets
     ListReusableDelegationSets
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReusableDelegationSets' {Maybe Text
marker :: Maybe Text
$sel:marker:ListReusableDelegationSets' :: ListReusableDelegationSets -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListReusableDelegationSets
s@ListReusableDelegationSets' {} Maybe Text
a -> ListReusableDelegationSets
s {$sel:marker:ListReusableDelegationSets' :: Maybe Text
marker = Maybe Text
a} :: ListReusableDelegationSets)

-- | The number of reusable delegation sets that you want Amazon Route 53 to
-- return in the response to this request. If you specify a value greater
-- than 100, Route 53 returns only the first 100 reusable delegation sets.
listReusableDelegationSets_maxItems :: Lens.Lens' ListReusableDelegationSets (Prelude.Maybe Prelude.Text)
listReusableDelegationSets_maxItems :: (Maybe Text -> f (Maybe Text))
-> ListReusableDelegationSets -> f ListReusableDelegationSets
listReusableDelegationSets_maxItems = (ListReusableDelegationSets -> Maybe Text)
-> (ListReusableDelegationSets
    -> Maybe Text -> ListReusableDelegationSets)
-> Lens
     ListReusableDelegationSets
     ListReusableDelegationSets
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReusableDelegationSets' {Maybe Text
maxItems :: Maybe Text
$sel:maxItems:ListReusableDelegationSets' :: ListReusableDelegationSets -> Maybe Text
maxItems} -> Maybe Text
maxItems) (\s :: ListReusableDelegationSets
s@ListReusableDelegationSets' {} Maybe Text
a -> ListReusableDelegationSets
s {$sel:maxItems:ListReusableDelegationSets' :: Maybe Text
maxItems = Maybe Text
a} :: ListReusableDelegationSets)

instance Core.AWSRequest ListReusableDelegationSets where
  type
    AWSResponse ListReusableDelegationSets =
      ListReusableDelegationSetsResponse
  request :: ListReusableDelegationSets -> Request ListReusableDelegationSets
request = Service
-> ListReusableDelegationSets -> Request ListReusableDelegationSets
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListReusableDelegationSets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListReusableDelegationSets)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse ListReusableDelegationSets))
-> Logger
-> Service
-> Proxy ListReusableDelegationSets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListReusableDelegationSets)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Int
-> [DelegationSet]
-> Text
-> Bool
-> Text
-> ListReusableDelegationSetsResponse
ListReusableDelegationSetsResponse'
            (Maybe Text
 -> Int
 -> [DelegationSet]
 -> Text
 -> Bool
 -> Text
 -> ListReusableDelegationSetsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Int
      -> [DelegationSet]
      -> Text
      -> Bool
      -> Text
      -> ListReusableDelegationSetsResponse)
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
"NextMarker")
            Either
  String
  (Int
   -> [DelegationSet]
   -> Text
   -> Bool
   -> Text
   -> ListReusableDelegationSetsResponse)
-> Either String Int
-> Either
     String
     ([DelegationSet]
      -> Text -> Bool -> Text -> ListReusableDelegationSetsResponse)
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
  ([DelegationSet]
   -> Text -> Bool -> Text -> ListReusableDelegationSetsResponse)
-> Either String [DelegationSet]
-> Either
     String (Text -> Bool -> Text -> ListReusableDelegationSetsResponse)
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
"DelegationSets" 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 [DelegationSet])
-> Either String [DelegationSet]
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= Text -> [Node] -> Either String [DelegationSet]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"DelegationSet"
                        )
            Either
  String (Text -> Bool -> Text -> ListReusableDelegationSetsResponse)
-> Either String Text
-> Either
     String (Bool -> Text -> ListReusableDelegationSetsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Marker")
            Either String (Bool -> Text -> ListReusableDelegationSetsResponse)
-> Either String Bool
-> Either String (Text -> ListReusableDelegationSetsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Bool
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"IsTruncated")
            Either String (Text -> ListReusableDelegationSetsResponse)
-> Either String Text
-> Either String ListReusableDelegationSetsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"MaxItems")
      )

instance Prelude.Hashable ListReusableDelegationSets

instance Prelude.NFData ListReusableDelegationSets

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

instance Core.ToPath ListReusableDelegationSets where
  toPath :: ListReusableDelegationSets -> ByteString
toPath = ByteString -> ListReusableDelegationSets -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/2013-04-01/delegationset"

instance Core.ToQuery ListReusableDelegationSets where
  toQuery :: ListReusableDelegationSets -> QueryString
toQuery ListReusableDelegationSets' {Maybe Text
maxItems :: Maybe Text
marker :: Maybe Text
$sel:maxItems:ListReusableDelegationSets' :: ListReusableDelegationSets -> Maybe Text
$sel:marker:ListReusableDelegationSets' :: ListReusableDelegationSets -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"maxitems" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
maxItems
      ]

-- | A complex type that contains information about the reusable delegation
-- sets that are associated with the current Amazon Web Services account.
--
-- /See:/ 'newListReusableDelegationSetsResponse' smart constructor.
data ListReusableDelegationSetsResponse = ListReusableDelegationSetsResponse'
  { -- | If @IsTruncated@ is @true@, the value of @NextMarker@ identifies the
    -- next reusable delegation set that Amazon Route 53 will return if you
    -- submit another @ListReusableDelegationSets@ request and specify the
    -- value of @NextMarker@ in the @marker@ parameter.
    ListReusableDelegationSetsResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListReusableDelegationSetsResponse -> Int
httpStatus :: Prelude.Int,
    -- | A complex type that contains one @DelegationSet@ element for each
    -- reusable delegation set that was created by the current Amazon Web
    -- Services account.
    ListReusableDelegationSetsResponse -> [DelegationSet]
delegationSets :: [DelegationSet],
    -- | For the second and subsequent calls to @ListReusableDelegationSets@,
    -- @Marker@ is the value that you specified for the @marker@ parameter in
    -- the request that produced the current response.
    ListReusableDelegationSetsResponse -> Text
marker :: Prelude.Text,
    -- | A flag that indicates whether there are more reusable delegation sets to
    -- be listed.
    ListReusableDelegationSetsResponse -> Bool
isTruncated :: Prelude.Bool,
    -- | The value that you specified for the @maxitems@ parameter in the call to
    -- @ListReusableDelegationSets@ that produced the current response.
    ListReusableDelegationSetsResponse -> Text
maxItems :: Prelude.Text
  }
  deriving (ListReusableDelegationSetsResponse
-> ListReusableDelegationSetsResponse -> Bool
(ListReusableDelegationSetsResponse
 -> ListReusableDelegationSetsResponse -> Bool)
-> (ListReusableDelegationSetsResponse
    -> ListReusableDelegationSetsResponse -> Bool)
-> Eq ListReusableDelegationSetsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReusableDelegationSetsResponse
-> ListReusableDelegationSetsResponse -> Bool
$c/= :: ListReusableDelegationSetsResponse
-> ListReusableDelegationSetsResponse -> Bool
== :: ListReusableDelegationSetsResponse
-> ListReusableDelegationSetsResponse -> Bool
$c== :: ListReusableDelegationSetsResponse
-> ListReusableDelegationSetsResponse -> Bool
Prelude.Eq, ReadPrec [ListReusableDelegationSetsResponse]
ReadPrec ListReusableDelegationSetsResponse
Int -> ReadS ListReusableDelegationSetsResponse
ReadS [ListReusableDelegationSetsResponse]
(Int -> ReadS ListReusableDelegationSetsResponse)
-> ReadS [ListReusableDelegationSetsResponse]
-> ReadPrec ListReusableDelegationSetsResponse
-> ReadPrec [ListReusableDelegationSetsResponse]
-> Read ListReusableDelegationSetsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReusableDelegationSetsResponse]
$creadListPrec :: ReadPrec [ListReusableDelegationSetsResponse]
readPrec :: ReadPrec ListReusableDelegationSetsResponse
$creadPrec :: ReadPrec ListReusableDelegationSetsResponse
readList :: ReadS [ListReusableDelegationSetsResponse]
$creadList :: ReadS [ListReusableDelegationSetsResponse]
readsPrec :: Int -> ReadS ListReusableDelegationSetsResponse
$creadsPrec :: Int -> ReadS ListReusableDelegationSetsResponse
Prelude.Read, Int -> ListReusableDelegationSetsResponse -> ShowS
[ListReusableDelegationSetsResponse] -> ShowS
ListReusableDelegationSetsResponse -> String
(Int -> ListReusableDelegationSetsResponse -> ShowS)
-> (ListReusableDelegationSetsResponse -> String)
-> ([ListReusableDelegationSetsResponse] -> ShowS)
-> Show ListReusableDelegationSetsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReusableDelegationSetsResponse] -> ShowS
$cshowList :: [ListReusableDelegationSetsResponse] -> ShowS
show :: ListReusableDelegationSetsResponse -> String
$cshow :: ListReusableDelegationSetsResponse -> String
showsPrec :: Int -> ListReusableDelegationSetsResponse -> ShowS
$cshowsPrec :: Int -> ListReusableDelegationSetsResponse -> ShowS
Prelude.Show, (forall x.
 ListReusableDelegationSetsResponse
 -> Rep ListReusableDelegationSetsResponse x)
-> (forall x.
    Rep ListReusableDelegationSetsResponse x
    -> ListReusableDelegationSetsResponse)
-> Generic ListReusableDelegationSetsResponse
forall x.
Rep ListReusableDelegationSetsResponse x
-> ListReusableDelegationSetsResponse
forall x.
ListReusableDelegationSetsResponse
-> Rep ListReusableDelegationSetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListReusableDelegationSetsResponse x
-> ListReusableDelegationSetsResponse
$cfrom :: forall x.
ListReusableDelegationSetsResponse
-> Rep ListReusableDelegationSetsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListReusableDelegationSetsResponse' 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:
--
-- 'nextMarker', 'listReusableDelegationSetsResponse_nextMarker' - If @IsTruncated@ is @true@, the value of @NextMarker@ identifies the
-- next reusable delegation set that Amazon Route 53 will return if you
-- submit another @ListReusableDelegationSets@ request and specify the
-- value of @NextMarker@ in the @marker@ parameter.
--
-- 'httpStatus', 'listReusableDelegationSetsResponse_httpStatus' - The response's http status code.
--
-- 'delegationSets', 'listReusableDelegationSetsResponse_delegationSets' - A complex type that contains one @DelegationSet@ element for each
-- reusable delegation set that was created by the current Amazon Web
-- Services account.
--
-- 'marker', 'listReusableDelegationSetsResponse_marker' - For the second and subsequent calls to @ListReusableDelegationSets@,
-- @Marker@ is the value that you specified for the @marker@ parameter in
-- the request that produced the current response.
--
-- 'isTruncated', 'listReusableDelegationSetsResponse_isTruncated' - A flag that indicates whether there are more reusable delegation sets to
-- be listed.
--
-- 'maxItems', 'listReusableDelegationSetsResponse_maxItems' - The value that you specified for the @maxitems@ parameter in the call to
-- @ListReusableDelegationSets@ that produced the current response.
newListReusableDelegationSetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'marker'
  Prelude.Text ->
  -- | 'isTruncated'
  Prelude.Bool ->
  -- | 'maxItems'
  Prelude.Text ->
  ListReusableDelegationSetsResponse
newListReusableDelegationSetsResponse :: Int -> Text -> Bool -> Text -> ListReusableDelegationSetsResponse
newListReusableDelegationSetsResponse
  Int
pHttpStatus_
  Text
pMarker_
  Bool
pIsTruncated_
  Text
pMaxItems_ =
    ListReusableDelegationSetsResponse' :: Maybe Text
-> Int
-> [DelegationSet]
-> Text
-> Bool
-> Text
-> ListReusableDelegationSetsResponse
ListReusableDelegationSetsResponse'
      { $sel:nextMarker:ListReusableDelegationSetsResponse' :: Maybe Text
nextMarker =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListReusableDelegationSetsResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:delegationSets:ListReusableDelegationSetsResponse' :: [DelegationSet]
delegationSets = [DelegationSet]
forall a. Monoid a => a
Prelude.mempty,
        $sel:marker:ListReusableDelegationSetsResponse' :: Text
marker = Text
pMarker_,
        $sel:isTruncated:ListReusableDelegationSetsResponse' :: Bool
isTruncated = Bool
pIsTruncated_,
        $sel:maxItems:ListReusableDelegationSetsResponse' :: Text
maxItems = Text
pMaxItems_
      }

-- | If @IsTruncated@ is @true@, the value of @NextMarker@ identifies the
-- next reusable delegation set that Amazon Route 53 will return if you
-- submit another @ListReusableDelegationSets@ request and specify the
-- value of @NextMarker@ in the @marker@ parameter.
listReusableDelegationSetsResponse_nextMarker :: Lens.Lens' ListReusableDelegationSetsResponse (Prelude.Maybe Prelude.Text)
listReusableDelegationSetsResponse_nextMarker :: (Maybe Text -> f (Maybe Text))
-> ListReusableDelegationSetsResponse
-> f ListReusableDelegationSetsResponse
listReusableDelegationSetsResponse_nextMarker = (ListReusableDelegationSetsResponse -> Maybe Text)
-> (ListReusableDelegationSetsResponse
    -> Maybe Text -> ListReusableDelegationSetsResponse)
-> Lens
     ListReusableDelegationSetsResponse
     ListReusableDelegationSetsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReusableDelegationSetsResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListReusableDelegationSetsResponse' :: ListReusableDelegationSetsResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListReusableDelegationSetsResponse
s@ListReusableDelegationSetsResponse' {} Maybe Text
a -> ListReusableDelegationSetsResponse
s {$sel:nextMarker:ListReusableDelegationSetsResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListReusableDelegationSetsResponse)

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

-- | A complex type that contains one @DelegationSet@ element for each
-- reusable delegation set that was created by the current Amazon Web
-- Services account.
listReusableDelegationSetsResponse_delegationSets :: Lens.Lens' ListReusableDelegationSetsResponse [DelegationSet]
listReusableDelegationSetsResponse_delegationSets :: ([DelegationSet] -> f [DelegationSet])
-> ListReusableDelegationSetsResponse
-> f ListReusableDelegationSetsResponse
listReusableDelegationSetsResponse_delegationSets = (ListReusableDelegationSetsResponse -> [DelegationSet])
-> (ListReusableDelegationSetsResponse
    -> [DelegationSet] -> ListReusableDelegationSetsResponse)
-> Lens
     ListReusableDelegationSetsResponse
     ListReusableDelegationSetsResponse
     [DelegationSet]
     [DelegationSet]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReusableDelegationSetsResponse' {[DelegationSet]
delegationSets :: [DelegationSet]
$sel:delegationSets:ListReusableDelegationSetsResponse' :: ListReusableDelegationSetsResponse -> [DelegationSet]
delegationSets} -> [DelegationSet]
delegationSets) (\s :: ListReusableDelegationSetsResponse
s@ListReusableDelegationSetsResponse' {} [DelegationSet]
a -> ListReusableDelegationSetsResponse
s {$sel:delegationSets:ListReusableDelegationSetsResponse' :: [DelegationSet]
delegationSets = [DelegationSet]
a} :: ListReusableDelegationSetsResponse) (([DelegationSet] -> f [DelegationSet])
 -> ListReusableDelegationSetsResponse
 -> f ListReusableDelegationSetsResponse)
-> (([DelegationSet] -> f [DelegationSet])
    -> [DelegationSet] -> f [DelegationSet])
-> ([DelegationSet] -> f [DelegationSet])
-> ListReusableDelegationSetsResponse
-> f ListReusableDelegationSetsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DelegationSet] -> f [DelegationSet])
-> [DelegationSet] -> f [DelegationSet]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | For the second and subsequent calls to @ListReusableDelegationSets@,
-- @Marker@ is the value that you specified for the @marker@ parameter in
-- the request that produced the current response.
listReusableDelegationSetsResponse_marker :: Lens.Lens' ListReusableDelegationSetsResponse Prelude.Text
listReusableDelegationSetsResponse_marker :: (Text -> f Text)
-> ListReusableDelegationSetsResponse
-> f ListReusableDelegationSetsResponse
listReusableDelegationSetsResponse_marker = (ListReusableDelegationSetsResponse -> Text)
-> (ListReusableDelegationSetsResponse
    -> Text -> ListReusableDelegationSetsResponse)
-> Lens
     ListReusableDelegationSetsResponse
     ListReusableDelegationSetsResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReusableDelegationSetsResponse' {Text
marker :: Text
$sel:marker:ListReusableDelegationSetsResponse' :: ListReusableDelegationSetsResponse -> Text
marker} -> Text
marker) (\s :: ListReusableDelegationSetsResponse
s@ListReusableDelegationSetsResponse' {} Text
a -> ListReusableDelegationSetsResponse
s {$sel:marker:ListReusableDelegationSetsResponse' :: Text
marker = Text
a} :: ListReusableDelegationSetsResponse)

-- | A flag that indicates whether there are more reusable delegation sets to
-- be listed.
listReusableDelegationSetsResponse_isTruncated :: Lens.Lens' ListReusableDelegationSetsResponse Prelude.Bool
listReusableDelegationSetsResponse_isTruncated :: (Bool -> f Bool)
-> ListReusableDelegationSetsResponse
-> f ListReusableDelegationSetsResponse
listReusableDelegationSetsResponse_isTruncated = (ListReusableDelegationSetsResponse -> Bool)
-> (ListReusableDelegationSetsResponse
    -> Bool -> ListReusableDelegationSetsResponse)
-> Lens
     ListReusableDelegationSetsResponse
     ListReusableDelegationSetsResponse
     Bool
     Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReusableDelegationSetsResponse' {Bool
isTruncated :: Bool
$sel:isTruncated:ListReusableDelegationSetsResponse' :: ListReusableDelegationSetsResponse -> Bool
isTruncated} -> Bool
isTruncated) (\s :: ListReusableDelegationSetsResponse
s@ListReusableDelegationSetsResponse' {} Bool
a -> ListReusableDelegationSetsResponse
s {$sel:isTruncated:ListReusableDelegationSetsResponse' :: Bool
isTruncated = Bool
a} :: ListReusableDelegationSetsResponse)

-- | The value that you specified for the @maxitems@ parameter in the call to
-- @ListReusableDelegationSets@ that produced the current response.
listReusableDelegationSetsResponse_maxItems :: Lens.Lens' ListReusableDelegationSetsResponse Prelude.Text
listReusableDelegationSetsResponse_maxItems :: (Text -> f Text)
-> ListReusableDelegationSetsResponse
-> f ListReusableDelegationSetsResponse
listReusableDelegationSetsResponse_maxItems = (ListReusableDelegationSetsResponse -> Text)
-> (ListReusableDelegationSetsResponse
    -> Text -> ListReusableDelegationSetsResponse)
-> Lens
     ListReusableDelegationSetsResponse
     ListReusableDelegationSetsResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReusableDelegationSetsResponse' {Text
maxItems :: Text
$sel:maxItems:ListReusableDelegationSetsResponse' :: ListReusableDelegationSetsResponse -> Text
maxItems} -> Text
maxItems) (\s :: ListReusableDelegationSetsResponse
s@ListReusableDelegationSetsResponse' {} Text
a -> ListReusableDelegationSetsResponse
s {$sel:maxItems:ListReusableDelegationSetsResponse' :: Text
maxItems = Text
a} :: ListReusableDelegationSetsResponse)

instance
  Prelude.NFData
    ListReusableDelegationSetsResponse