{-# 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.Route53Resolver.ListFirewallDomainLists
-- 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 the firewall domain lists that you have defined. For each
-- firewall domain list, you can retrieve the domains that are defined for
-- a list by calling ListFirewallDomains.
--
-- A single call to this list operation might return only a partial list of
-- the domain lists. For information, see @MaxResults@.
--
-- This operation returns paginated results.
module Amazonka.Route53Resolver.ListFirewallDomainLists
  ( -- * Creating a Request
    ListFirewallDomainLists (..),
    newListFirewallDomainLists,

    -- * Request Lenses
    listFirewallDomainLists_nextToken,
    listFirewallDomainLists_maxResults,

    -- * Destructuring the Response
    ListFirewallDomainListsResponse (..),
    newListFirewallDomainListsResponse,

    -- * Response Lenses
    listFirewallDomainListsResponse_nextToken,
    listFirewallDomainListsResponse_firewallDomainLists,
    listFirewallDomainListsResponse_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.Route53Resolver.Types

-- | /See:/ 'newListFirewallDomainLists' smart constructor.
data ListFirewallDomainLists = ListFirewallDomainLists'
  { -- | For the first call to this list request, omit this value.
    --
    -- When you request a list of objects, Resolver returns at most the number
    -- of objects specified in @MaxResults@. If more objects are available for
    -- retrieval, Resolver returns a @NextToken@ value in the response. To
    -- retrieve the next batch of objects, use the token that was returned for
    -- the prior request in your next request.
    ListFirewallDomainLists -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of objects that you want Resolver to return for this
    -- request. If more objects are available, in the response, Resolver
    -- provides a @NextToken@ value that you can use in a subsequent call to
    -- get the next batch of objects.
    --
    -- If you don\'t specify a value for @MaxResults@, Resolver returns up to
    -- 100 objects.
    ListFirewallDomainLists -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListFirewallDomainLists -> ListFirewallDomainLists -> Bool
(ListFirewallDomainLists -> ListFirewallDomainLists -> Bool)
-> (ListFirewallDomainLists -> ListFirewallDomainLists -> Bool)
-> Eq ListFirewallDomainLists
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFirewallDomainLists -> ListFirewallDomainLists -> Bool
$c/= :: ListFirewallDomainLists -> ListFirewallDomainLists -> Bool
== :: ListFirewallDomainLists -> ListFirewallDomainLists -> Bool
$c== :: ListFirewallDomainLists -> ListFirewallDomainLists -> Bool
Prelude.Eq, ReadPrec [ListFirewallDomainLists]
ReadPrec ListFirewallDomainLists
Int -> ReadS ListFirewallDomainLists
ReadS [ListFirewallDomainLists]
(Int -> ReadS ListFirewallDomainLists)
-> ReadS [ListFirewallDomainLists]
-> ReadPrec ListFirewallDomainLists
-> ReadPrec [ListFirewallDomainLists]
-> Read ListFirewallDomainLists
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFirewallDomainLists]
$creadListPrec :: ReadPrec [ListFirewallDomainLists]
readPrec :: ReadPrec ListFirewallDomainLists
$creadPrec :: ReadPrec ListFirewallDomainLists
readList :: ReadS [ListFirewallDomainLists]
$creadList :: ReadS [ListFirewallDomainLists]
readsPrec :: Int -> ReadS ListFirewallDomainLists
$creadsPrec :: Int -> ReadS ListFirewallDomainLists
Prelude.Read, Int -> ListFirewallDomainLists -> ShowS
[ListFirewallDomainLists] -> ShowS
ListFirewallDomainLists -> String
(Int -> ListFirewallDomainLists -> ShowS)
-> (ListFirewallDomainLists -> String)
-> ([ListFirewallDomainLists] -> ShowS)
-> Show ListFirewallDomainLists
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFirewallDomainLists] -> ShowS
$cshowList :: [ListFirewallDomainLists] -> ShowS
show :: ListFirewallDomainLists -> String
$cshow :: ListFirewallDomainLists -> String
showsPrec :: Int -> ListFirewallDomainLists -> ShowS
$cshowsPrec :: Int -> ListFirewallDomainLists -> ShowS
Prelude.Show, (forall x.
 ListFirewallDomainLists -> Rep ListFirewallDomainLists x)
-> (forall x.
    Rep ListFirewallDomainLists x -> ListFirewallDomainLists)
-> Generic ListFirewallDomainLists
forall x. Rep ListFirewallDomainLists x -> ListFirewallDomainLists
forall x. ListFirewallDomainLists -> Rep ListFirewallDomainLists x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListFirewallDomainLists x -> ListFirewallDomainLists
$cfrom :: forall x. ListFirewallDomainLists -> Rep ListFirewallDomainLists x
Prelude.Generic)

-- |
-- Create a value of 'ListFirewallDomainLists' 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', 'listFirewallDomainLists_nextToken' - For the first call to this list request, omit this value.
--
-- When you request a list of objects, Resolver returns at most the number
-- of objects specified in @MaxResults@. If more objects are available for
-- retrieval, Resolver returns a @NextToken@ value in the response. To
-- retrieve the next batch of objects, use the token that was returned for
-- the prior request in your next request.
--
-- 'maxResults', 'listFirewallDomainLists_maxResults' - The maximum number of objects that you want Resolver to return for this
-- request. If more objects are available, in the response, Resolver
-- provides a @NextToken@ value that you can use in a subsequent call to
-- get the next batch of objects.
--
-- If you don\'t specify a value for @MaxResults@, Resolver returns up to
-- 100 objects.
newListFirewallDomainLists ::
  ListFirewallDomainLists
newListFirewallDomainLists :: ListFirewallDomainLists
newListFirewallDomainLists =
  ListFirewallDomainLists' :: Maybe Text -> Maybe Natural -> ListFirewallDomainLists
ListFirewallDomainLists'
    { $sel:nextToken:ListFirewallDomainLists' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListFirewallDomainLists' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | For the first call to this list request, omit this value.
--
-- When you request a list of objects, Resolver returns at most the number
-- of objects specified in @MaxResults@. If more objects are available for
-- retrieval, Resolver returns a @NextToken@ value in the response. To
-- retrieve the next batch of objects, use the token that was returned for
-- the prior request in your next request.
listFirewallDomainLists_nextToken :: Lens.Lens' ListFirewallDomainLists (Prelude.Maybe Prelude.Text)
listFirewallDomainLists_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListFirewallDomainLists -> f ListFirewallDomainLists
listFirewallDomainLists_nextToken = (ListFirewallDomainLists -> Maybe Text)
-> (ListFirewallDomainLists
    -> Maybe Text -> ListFirewallDomainLists)
-> Lens
     ListFirewallDomainLists
     ListFirewallDomainLists
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFirewallDomainLists' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListFirewallDomainLists' :: ListFirewallDomainLists -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListFirewallDomainLists
s@ListFirewallDomainLists' {} Maybe Text
a -> ListFirewallDomainLists
s {$sel:nextToken:ListFirewallDomainLists' :: Maybe Text
nextToken = Maybe Text
a} :: ListFirewallDomainLists)

-- | The maximum number of objects that you want Resolver to return for this
-- request. If more objects are available, in the response, Resolver
-- provides a @NextToken@ value that you can use in a subsequent call to
-- get the next batch of objects.
--
-- If you don\'t specify a value for @MaxResults@, Resolver returns up to
-- 100 objects.
listFirewallDomainLists_maxResults :: Lens.Lens' ListFirewallDomainLists (Prelude.Maybe Prelude.Natural)
listFirewallDomainLists_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListFirewallDomainLists -> f ListFirewallDomainLists
listFirewallDomainLists_maxResults = (ListFirewallDomainLists -> Maybe Natural)
-> (ListFirewallDomainLists
    -> Maybe Natural -> ListFirewallDomainLists)
-> Lens
     ListFirewallDomainLists
     ListFirewallDomainLists
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFirewallDomainLists' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListFirewallDomainLists' :: ListFirewallDomainLists -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListFirewallDomainLists
s@ListFirewallDomainLists' {} Maybe Natural
a -> ListFirewallDomainLists
s {$sel:maxResults:ListFirewallDomainLists' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListFirewallDomainLists)

instance Core.AWSPager ListFirewallDomainLists where
  page :: ListFirewallDomainLists
-> AWSResponse ListFirewallDomainLists
-> Maybe ListFirewallDomainLists
page ListFirewallDomainLists
rq AWSResponse ListFirewallDomainLists
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListFirewallDomainLists
ListFirewallDomainListsResponse
rs
            ListFirewallDomainListsResponse
-> Getting (First Text) ListFirewallDomainListsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListFirewallDomainListsResponse
-> Const (First Text) ListFirewallDomainListsResponse
Lens' ListFirewallDomainListsResponse (Maybe Text)
listFirewallDomainListsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListFirewallDomainListsResponse
 -> Const (First Text) ListFirewallDomainListsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListFirewallDomainListsResponse 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 ListFirewallDomainLists
forall a. Maybe a
Prelude.Nothing
    | Maybe [FirewallDomainListMetadata] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListFirewallDomainLists
ListFirewallDomainListsResponse
rs
            ListFirewallDomainListsResponse
-> Getting
     (First [FirewallDomainListMetadata])
     ListFirewallDomainListsResponse
     [FirewallDomainListMetadata]
-> Maybe [FirewallDomainListMetadata]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [FirewallDomainListMetadata]
 -> Const
      (First [FirewallDomainListMetadata])
      (Maybe [FirewallDomainListMetadata]))
-> ListFirewallDomainListsResponse
-> Const
     (First [FirewallDomainListMetadata])
     ListFirewallDomainListsResponse
Lens'
  ListFirewallDomainListsResponse
  (Maybe [FirewallDomainListMetadata])
listFirewallDomainListsResponse_firewallDomainLists
              ((Maybe [FirewallDomainListMetadata]
  -> Const
       (First [FirewallDomainListMetadata])
       (Maybe [FirewallDomainListMetadata]))
 -> ListFirewallDomainListsResponse
 -> Const
      (First [FirewallDomainListMetadata])
      ListFirewallDomainListsResponse)
-> (([FirewallDomainListMetadata]
     -> Const
          (First [FirewallDomainListMetadata]) [FirewallDomainListMetadata])
    -> Maybe [FirewallDomainListMetadata]
    -> Const
         (First [FirewallDomainListMetadata])
         (Maybe [FirewallDomainListMetadata]))
-> Getting
     (First [FirewallDomainListMetadata])
     ListFirewallDomainListsResponse
     [FirewallDomainListMetadata]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([FirewallDomainListMetadata]
 -> Const
      (First [FirewallDomainListMetadata]) [FirewallDomainListMetadata])
-> Maybe [FirewallDomainListMetadata]
-> Const
     (First [FirewallDomainListMetadata])
     (Maybe [FirewallDomainListMetadata])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListFirewallDomainLists
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListFirewallDomainLists -> Maybe ListFirewallDomainLists
forall a. a -> Maybe a
Prelude.Just (ListFirewallDomainLists -> Maybe ListFirewallDomainLists)
-> ListFirewallDomainLists -> Maybe ListFirewallDomainLists
forall a b. (a -> b) -> a -> b
Prelude.$
        ListFirewallDomainLists
rq
          ListFirewallDomainLists
-> (ListFirewallDomainLists -> ListFirewallDomainLists)
-> ListFirewallDomainLists
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListFirewallDomainLists -> Identity ListFirewallDomainLists
Lens
  ListFirewallDomainLists
  ListFirewallDomainLists
  (Maybe Text)
  (Maybe Text)
listFirewallDomainLists_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListFirewallDomainLists -> Identity ListFirewallDomainLists)
-> Maybe Text -> ListFirewallDomainLists -> ListFirewallDomainLists
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListFirewallDomainLists
ListFirewallDomainListsResponse
rs
          ListFirewallDomainListsResponse
-> Getting (First Text) ListFirewallDomainListsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListFirewallDomainListsResponse
-> Const (First Text) ListFirewallDomainListsResponse
Lens' ListFirewallDomainListsResponse (Maybe Text)
listFirewallDomainListsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListFirewallDomainListsResponse
 -> Const (First Text) ListFirewallDomainListsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListFirewallDomainListsResponse 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 ListFirewallDomainLists where
  type
    AWSResponse ListFirewallDomainLists =
      ListFirewallDomainListsResponse
  request :: ListFirewallDomainLists -> Request ListFirewallDomainLists
request = Service
-> ListFirewallDomainLists -> Request ListFirewallDomainLists
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListFirewallDomainLists
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListFirewallDomainLists)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListFirewallDomainLists))
-> Logger
-> Service
-> Proxy ListFirewallDomainLists
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListFirewallDomainLists)))
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 Text
-> Maybe [FirewallDomainListMetadata]
-> Int
-> ListFirewallDomainListsResponse
ListFirewallDomainListsResponse'
            (Maybe Text
 -> Maybe [FirewallDomainListMetadata]
 -> Int
 -> ListFirewallDomainListsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [FirewallDomainListMetadata]
      -> Int -> ListFirewallDomainListsResponse)
forall (f :: * -> *) a b. Functor 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 [FirewallDomainListMetadata]
   -> Int -> ListFirewallDomainListsResponse)
-> Either String (Maybe [FirewallDomainListMetadata])
-> Either String (Int -> ListFirewallDomainListsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [FirewallDomainListMetadata]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FirewallDomainLists"
                            Either String (Maybe (Maybe [FirewallDomainListMetadata]))
-> Maybe [FirewallDomainListMetadata]
-> Either String (Maybe [FirewallDomainListMetadata])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [FirewallDomainListMetadata]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListFirewallDomainListsResponse)
-> Either String Int
-> Either String ListFirewallDomainListsResponse
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 ListFirewallDomainLists

instance Prelude.NFData ListFirewallDomainLists

instance Core.ToHeaders ListFirewallDomainLists where
  toHeaders :: ListFirewallDomainLists -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListFirewallDomainLists -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Route53Resolver.ListFirewallDomainLists" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON ListFirewallDomainLists where
  toJSON :: ListFirewallDomainLists -> Value
toJSON ListFirewallDomainLists' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListFirewallDomainLists' :: ListFirewallDomainLists -> Maybe Natural
$sel:nextToken:ListFirewallDomainLists' :: ListFirewallDomainLists -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

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

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

-- | /See:/ 'newListFirewallDomainListsResponse' smart constructor.
data ListFirewallDomainListsResponse = ListFirewallDomainListsResponse'
  { -- | If objects are still available for retrieval, Resolver returns this
    -- token in the response. To retrieve the next batch of objects, provide
    -- this token in your next request.
    ListFirewallDomainListsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of the domain lists that you have defined.
    --
    -- This might be a partial list of the domain lists that you\'ve defined.
    -- For information, see @MaxResults@.
    ListFirewallDomainListsResponse
-> Maybe [FirewallDomainListMetadata]
firewallDomainLists :: Prelude.Maybe [FirewallDomainListMetadata],
    -- | The response's http status code.
    ListFirewallDomainListsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListFirewallDomainListsResponse
-> ListFirewallDomainListsResponse -> Bool
(ListFirewallDomainListsResponse
 -> ListFirewallDomainListsResponse -> Bool)
-> (ListFirewallDomainListsResponse
    -> ListFirewallDomainListsResponse -> Bool)
-> Eq ListFirewallDomainListsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFirewallDomainListsResponse
-> ListFirewallDomainListsResponse -> Bool
$c/= :: ListFirewallDomainListsResponse
-> ListFirewallDomainListsResponse -> Bool
== :: ListFirewallDomainListsResponse
-> ListFirewallDomainListsResponse -> Bool
$c== :: ListFirewallDomainListsResponse
-> ListFirewallDomainListsResponse -> Bool
Prelude.Eq, ReadPrec [ListFirewallDomainListsResponse]
ReadPrec ListFirewallDomainListsResponse
Int -> ReadS ListFirewallDomainListsResponse
ReadS [ListFirewallDomainListsResponse]
(Int -> ReadS ListFirewallDomainListsResponse)
-> ReadS [ListFirewallDomainListsResponse]
-> ReadPrec ListFirewallDomainListsResponse
-> ReadPrec [ListFirewallDomainListsResponse]
-> Read ListFirewallDomainListsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFirewallDomainListsResponse]
$creadListPrec :: ReadPrec [ListFirewallDomainListsResponse]
readPrec :: ReadPrec ListFirewallDomainListsResponse
$creadPrec :: ReadPrec ListFirewallDomainListsResponse
readList :: ReadS [ListFirewallDomainListsResponse]
$creadList :: ReadS [ListFirewallDomainListsResponse]
readsPrec :: Int -> ReadS ListFirewallDomainListsResponse
$creadsPrec :: Int -> ReadS ListFirewallDomainListsResponse
Prelude.Read, Int -> ListFirewallDomainListsResponse -> ShowS
[ListFirewallDomainListsResponse] -> ShowS
ListFirewallDomainListsResponse -> String
(Int -> ListFirewallDomainListsResponse -> ShowS)
-> (ListFirewallDomainListsResponse -> String)
-> ([ListFirewallDomainListsResponse] -> ShowS)
-> Show ListFirewallDomainListsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFirewallDomainListsResponse] -> ShowS
$cshowList :: [ListFirewallDomainListsResponse] -> ShowS
show :: ListFirewallDomainListsResponse -> String
$cshow :: ListFirewallDomainListsResponse -> String
showsPrec :: Int -> ListFirewallDomainListsResponse -> ShowS
$cshowsPrec :: Int -> ListFirewallDomainListsResponse -> ShowS
Prelude.Show, (forall x.
 ListFirewallDomainListsResponse
 -> Rep ListFirewallDomainListsResponse x)
-> (forall x.
    Rep ListFirewallDomainListsResponse x
    -> ListFirewallDomainListsResponse)
-> Generic ListFirewallDomainListsResponse
forall x.
Rep ListFirewallDomainListsResponse x
-> ListFirewallDomainListsResponse
forall x.
ListFirewallDomainListsResponse
-> Rep ListFirewallDomainListsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListFirewallDomainListsResponse x
-> ListFirewallDomainListsResponse
$cfrom :: forall x.
ListFirewallDomainListsResponse
-> Rep ListFirewallDomainListsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListFirewallDomainListsResponse' 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', 'listFirewallDomainListsResponse_nextToken' - If objects are still available for retrieval, Resolver returns this
-- token in the response. To retrieve the next batch of objects, provide
-- this token in your next request.
--
-- 'firewallDomainLists', 'listFirewallDomainListsResponse_firewallDomainLists' - A list of the domain lists that you have defined.
--
-- This might be a partial list of the domain lists that you\'ve defined.
-- For information, see @MaxResults@.
--
-- 'httpStatus', 'listFirewallDomainListsResponse_httpStatus' - The response's http status code.
newListFirewallDomainListsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListFirewallDomainListsResponse
newListFirewallDomainListsResponse :: Int -> ListFirewallDomainListsResponse
newListFirewallDomainListsResponse Int
pHttpStatus_ =
  ListFirewallDomainListsResponse' :: Maybe Text
-> Maybe [FirewallDomainListMetadata]
-> Int
-> ListFirewallDomainListsResponse
ListFirewallDomainListsResponse'
    { $sel:nextToken:ListFirewallDomainListsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:firewallDomainLists:ListFirewallDomainListsResponse' :: Maybe [FirewallDomainListMetadata]
firewallDomainLists = Maybe [FirewallDomainListMetadata]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListFirewallDomainListsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If objects are still available for retrieval, Resolver returns this
-- token in the response. To retrieve the next batch of objects, provide
-- this token in your next request.
listFirewallDomainListsResponse_nextToken :: Lens.Lens' ListFirewallDomainListsResponse (Prelude.Maybe Prelude.Text)
listFirewallDomainListsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListFirewallDomainListsResponse
-> f ListFirewallDomainListsResponse
listFirewallDomainListsResponse_nextToken = (ListFirewallDomainListsResponse -> Maybe Text)
-> (ListFirewallDomainListsResponse
    -> Maybe Text -> ListFirewallDomainListsResponse)
-> Lens' ListFirewallDomainListsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFirewallDomainListsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListFirewallDomainListsResponse' :: ListFirewallDomainListsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListFirewallDomainListsResponse
s@ListFirewallDomainListsResponse' {} Maybe Text
a -> ListFirewallDomainListsResponse
s {$sel:nextToken:ListFirewallDomainListsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListFirewallDomainListsResponse)

-- | A list of the domain lists that you have defined.
--
-- This might be a partial list of the domain lists that you\'ve defined.
-- For information, see @MaxResults@.
listFirewallDomainListsResponse_firewallDomainLists :: Lens.Lens' ListFirewallDomainListsResponse (Prelude.Maybe [FirewallDomainListMetadata])
listFirewallDomainListsResponse_firewallDomainLists :: (Maybe [FirewallDomainListMetadata]
 -> f (Maybe [FirewallDomainListMetadata]))
-> ListFirewallDomainListsResponse
-> f ListFirewallDomainListsResponse
listFirewallDomainListsResponse_firewallDomainLists = (ListFirewallDomainListsResponse
 -> Maybe [FirewallDomainListMetadata])
-> (ListFirewallDomainListsResponse
    -> Maybe [FirewallDomainListMetadata]
    -> ListFirewallDomainListsResponse)
-> Lens'
     ListFirewallDomainListsResponse
     (Maybe [FirewallDomainListMetadata])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFirewallDomainListsResponse' {Maybe [FirewallDomainListMetadata]
firewallDomainLists :: Maybe [FirewallDomainListMetadata]
$sel:firewallDomainLists:ListFirewallDomainListsResponse' :: ListFirewallDomainListsResponse
-> Maybe [FirewallDomainListMetadata]
firewallDomainLists} -> Maybe [FirewallDomainListMetadata]
firewallDomainLists) (\s :: ListFirewallDomainListsResponse
s@ListFirewallDomainListsResponse' {} Maybe [FirewallDomainListMetadata]
a -> ListFirewallDomainListsResponse
s {$sel:firewallDomainLists:ListFirewallDomainListsResponse' :: Maybe [FirewallDomainListMetadata]
firewallDomainLists = Maybe [FirewallDomainListMetadata]
a} :: ListFirewallDomainListsResponse) ((Maybe [FirewallDomainListMetadata]
  -> f (Maybe [FirewallDomainListMetadata]))
 -> ListFirewallDomainListsResponse
 -> f ListFirewallDomainListsResponse)
-> ((Maybe [FirewallDomainListMetadata]
     -> f (Maybe [FirewallDomainListMetadata]))
    -> Maybe [FirewallDomainListMetadata]
    -> f (Maybe [FirewallDomainListMetadata]))
-> (Maybe [FirewallDomainListMetadata]
    -> f (Maybe [FirewallDomainListMetadata]))
-> ListFirewallDomainListsResponse
-> f ListFirewallDomainListsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [FirewallDomainListMetadata]
  [FirewallDomainListMetadata]
  [FirewallDomainListMetadata]
  [FirewallDomainListMetadata]
-> Iso
     (Maybe [FirewallDomainListMetadata])
     (Maybe [FirewallDomainListMetadata])
     (Maybe [FirewallDomainListMetadata])
     (Maybe [FirewallDomainListMetadata])
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
  [FirewallDomainListMetadata]
  [FirewallDomainListMetadata]
  [FirewallDomainListMetadata]
  [FirewallDomainListMetadata]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListFirewallDomainListsResponse