{-# 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.NetworkFirewall.ListFirewalls
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves the metadata for the firewalls that you have defined. If you
-- provide VPC identifiers in your request, this returns only the firewalls
-- for those VPCs.
--
-- Depending on your setting for max results and the number of firewalls, a
-- single call might not return the full list.
--
-- This operation returns paginated results.
module Amazonka.NetworkFirewall.ListFirewalls
  ( -- * Creating a Request
    ListFirewalls (..),
    newListFirewalls,

    -- * Request Lenses
    listFirewalls_maxResults,
    listFirewalls_nextToken,
    listFirewalls_vpcIds,

    -- * Destructuring the Response
    ListFirewallsResponse (..),
    newListFirewallsResponse,

    -- * Response Lenses
    listFirewallsResponse_firewalls,
    listFirewallsResponse_nextToken,
    listFirewallsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.NetworkFirewall.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListFirewalls' smart constructor.
data ListFirewalls = ListFirewalls'
  { -- | The maximum number of objects that you want Network Firewall to return
    -- for this request. If more objects are available, in the response,
    -- Network Firewall provides a @NextToken@ value that you can use in a
    -- subsequent call to get the next batch of objects.
    ListFirewalls -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | When you request a list of objects with a @MaxResults@ setting, if the
    -- number of objects that are still available for retrieval exceeds the
    -- maximum you requested, Network Firewall returns a @NextToken@ value in
    -- the response. To retrieve the next batch of objects, use the token
    -- returned from the prior request in your next request.
    ListFirewalls -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The unique identifiers of the VPCs that you want Network Firewall to
    -- retrieve the firewalls for. Leave this blank to retrieve all firewalls
    -- that you have defined.
    ListFirewalls -> Maybe [Text]
vpcIds :: Prelude.Maybe [Prelude.Text]
  }
  deriving (ListFirewalls -> ListFirewalls -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFirewalls -> ListFirewalls -> Bool
$c/= :: ListFirewalls -> ListFirewalls -> Bool
== :: ListFirewalls -> ListFirewalls -> Bool
$c== :: ListFirewalls -> ListFirewalls -> Bool
Prelude.Eq, ReadPrec [ListFirewalls]
ReadPrec ListFirewalls
Int -> ReadS ListFirewalls
ReadS [ListFirewalls]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFirewalls]
$creadListPrec :: ReadPrec [ListFirewalls]
readPrec :: ReadPrec ListFirewalls
$creadPrec :: ReadPrec ListFirewalls
readList :: ReadS [ListFirewalls]
$creadList :: ReadS [ListFirewalls]
readsPrec :: Int -> ReadS ListFirewalls
$creadsPrec :: Int -> ReadS ListFirewalls
Prelude.Read, Int -> ListFirewalls -> ShowS
[ListFirewalls] -> ShowS
ListFirewalls -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFirewalls] -> ShowS
$cshowList :: [ListFirewalls] -> ShowS
show :: ListFirewalls -> String
$cshow :: ListFirewalls -> String
showsPrec :: Int -> ListFirewalls -> ShowS
$cshowsPrec :: Int -> ListFirewalls -> ShowS
Prelude.Show, forall x. Rep ListFirewalls x -> ListFirewalls
forall x. ListFirewalls -> Rep ListFirewalls x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListFirewalls x -> ListFirewalls
$cfrom :: forall x. ListFirewalls -> Rep ListFirewalls x
Prelude.Generic)

-- |
-- Create a value of 'ListFirewalls' 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:
--
-- 'maxResults', 'listFirewalls_maxResults' - The maximum number of objects that you want Network Firewall to return
-- for this request. If more objects are available, in the response,
-- Network Firewall provides a @NextToken@ value that you can use in a
-- subsequent call to get the next batch of objects.
--
-- 'nextToken', 'listFirewalls_nextToken' - When you request a list of objects with a @MaxResults@ setting, if the
-- number of objects that are still available for retrieval exceeds the
-- maximum you requested, Network Firewall returns a @NextToken@ value in
-- the response. To retrieve the next batch of objects, use the token
-- returned from the prior request in your next request.
--
-- 'vpcIds', 'listFirewalls_vpcIds' - The unique identifiers of the VPCs that you want Network Firewall to
-- retrieve the firewalls for. Leave this blank to retrieve all firewalls
-- that you have defined.
newListFirewalls ::
  ListFirewalls
newListFirewalls :: ListFirewalls
newListFirewalls =
  ListFirewalls'
    { $sel:maxResults:ListFirewalls' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListFirewalls' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcIds:ListFirewalls' :: Maybe [Text]
vpcIds = forall a. Maybe a
Prelude.Nothing
    }

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

-- | When you request a list of objects with a @MaxResults@ setting, if the
-- number of objects that are still available for retrieval exceeds the
-- maximum you requested, Network Firewall returns a @NextToken@ value in
-- the response. To retrieve the next batch of objects, use the token
-- returned from the prior request in your next request.
listFirewalls_nextToken :: Lens.Lens' ListFirewalls (Prelude.Maybe Prelude.Text)
listFirewalls_nextToken :: Lens' ListFirewalls (Maybe Text)
listFirewalls_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFirewalls' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListFirewalls' :: ListFirewalls -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListFirewalls
s@ListFirewalls' {} Maybe Text
a -> ListFirewalls
s {$sel:nextToken:ListFirewalls' :: Maybe Text
nextToken = Maybe Text
a} :: ListFirewalls)

-- | The unique identifiers of the VPCs that you want Network Firewall to
-- retrieve the firewalls for. Leave this blank to retrieve all firewalls
-- that you have defined.
listFirewalls_vpcIds :: Lens.Lens' ListFirewalls (Prelude.Maybe [Prelude.Text])
listFirewalls_vpcIds :: Lens' ListFirewalls (Maybe [Text])
listFirewalls_vpcIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFirewalls' {Maybe [Text]
vpcIds :: Maybe [Text]
$sel:vpcIds:ListFirewalls' :: ListFirewalls -> Maybe [Text]
vpcIds} -> Maybe [Text]
vpcIds) (\s :: ListFirewalls
s@ListFirewalls' {} Maybe [Text]
a -> ListFirewalls
s {$sel:vpcIds:ListFirewalls' :: Maybe [Text]
vpcIds = Maybe [Text]
a} :: ListFirewalls) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSPager ListFirewalls where
  page :: ListFirewalls -> AWSResponse ListFirewalls -> Maybe ListFirewalls
page ListFirewalls
rq AWSResponse ListFirewalls
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListFirewalls
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListFirewallsResponse (Maybe Text)
listFirewallsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListFirewalls
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListFirewallsResponse (Maybe [FirewallMetadata])
listFirewallsResponse_firewalls
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListFirewalls
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListFirewalls (Maybe Text)
listFirewalls_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListFirewalls
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListFirewallsResponse (Maybe Text)
listFirewallsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListFirewalls where
  type
    AWSResponse ListFirewalls =
      ListFirewallsResponse
  request :: (Service -> Service) -> ListFirewalls -> Request ListFirewalls
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListFirewalls
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListFirewalls)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [FirewallMetadata]
-> Maybe Text -> Int -> ListFirewallsResponse
ListFirewallsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Firewalls" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListFirewalls where
  hashWithSalt :: Int -> ListFirewalls -> Int
hashWithSalt Int
_salt ListFirewalls' {Maybe Natural
Maybe [Text]
Maybe Text
vpcIds :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:vpcIds:ListFirewalls' :: ListFirewalls -> Maybe [Text]
$sel:nextToken:ListFirewalls' :: ListFirewalls -> Maybe Text
$sel:maxResults:ListFirewalls' :: ListFirewalls -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
vpcIds

instance Prelude.NFData ListFirewalls where
  rnf :: ListFirewalls -> ()
rnf ListFirewalls' {Maybe Natural
Maybe [Text]
Maybe Text
vpcIds :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:vpcIds:ListFirewalls' :: ListFirewalls -> Maybe [Text]
$sel:nextToken:ListFirewalls' :: ListFirewalls -> Maybe Text
$sel:maxResults:ListFirewalls' :: ListFirewalls -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
vpcIds

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

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

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

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

-- | /See:/ 'newListFirewallsResponse' smart constructor.
data ListFirewallsResponse = ListFirewallsResponse'
  { -- | The firewall metadata objects for the VPCs that you specified. Depending
    -- on your setting for max results and the number of firewalls you have, a
    -- single call might not be the full list.
    ListFirewallsResponse -> Maybe [FirewallMetadata]
firewalls :: Prelude.Maybe [FirewallMetadata],
    -- | When you request a list of objects with a @MaxResults@ setting, if the
    -- number of objects that are still available for retrieval exceeds the
    -- maximum you requested, Network Firewall returns a @NextToken@ value in
    -- the response. To retrieve the next batch of objects, use the token
    -- returned from the prior request in your next request.
    ListFirewallsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListFirewallsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListFirewallsResponse -> ListFirewallsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFirewallsResponse -> ListFirewallsResponse -> Bool
$c/= :: ListFirewallsResponse -> ListFirewallsResponse -> Bool
== :: ListFirewallsResponse -> ListFirewallsResponse -> Bool
$c== :: ListFirewallsResponse -> ListFirewallsResponse -> Bool
Prelude.Eq, ReadPrec [ListFirewallsResponse]
ReadPrec ListFirewallsResponse
Int -> ReadS ListFirewallsResponse
ReadS [ListFirewallsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFirewallsResponse]
$creadListPrec :: ReadPrec [ListFirewallsResponse]
readPrec :: ReadPrec ListFirewallsResponse
$creadPrec :: ReadPrec ListFirewallsResponse
readList :: ReadS [ListFirewallsResponse]
$creadList :: ReadS [ListFirewallsResponse]
readsPrec :: Int -> ReadS ListFirewallsResponse
$creadsPrec :: Int -> ReadS ListFirewallsResponse
Prelude.Read, Int -> ListFirewallsResponse -> ShowS
[ListFirewallsResponse] -> ShowS
ListFirewallsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFirewallsResponse] -> ShowS
$cshowList :: [ListFirewallsResponse] -> ShowS
show :: ListFirewallsResponse -> String
$cshow :: ListFirewallsResponse -> String
showsPrec :: Int -> ListFirewallsResponse -> ShowS
$cshowsPrec :: Int -> ListFirewallsResponse -> ShowS
Prelude.Show, forall x. Rep ListFirewallsResponse x -> ListFirewallsResponse
forall x. ListFirewallsResponse -> Rep ListFirewallsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListFirewallsResponse x -> ListFirewallsResponse
$cfrom :: forall x. ListFirewallsResponse -> Rep ListFirewallsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListFirewallsResponse' 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:
--
-- 'firewalls', 'listFirewallsResponse_firewalls' - The firewall metadata objects for the VPCs that you specified. Depending
-- on your setting for max results and the number of firewalls you have, a
-- single call might not be the full list.
--
-- 'nextToken', 'listFirewallsResponse_nextToken' - When you request a list of objects with a @MaxResults@ setting, if the
-- number of objects that are still available for retrieval exceeds the
-- maximum you requested, Network Firewall returns a @NextToken@ value in
-- the response. To retrieve the next batch of objects, use the token
-- returned from the prior request in your next request.
--
-- 'httpStatus', 'listFirewallsResponse_httpStatus' - The response's http status code.
newListFirewallsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListFirewallsResponse
newListFirewallsResponse :: Int -> ListFirewallsResponse
newListFirewallsResponse Int
pHttpStatus_ =
  ListFirewallsResponse'
    { $sel:firewalls:ListFirewallsResponse' :: Maybe [FirewallMetadata]
firewalls = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListFirewallsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListFirewallsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The firewall metadata objects for the VPCs that you specified. Depending
-- on your setting for max results and the number of firewalls you have, a
-- single call might not be the full list.
listFirewallsResponse_firewalls :: Lens.Lens' ListFirewallsResponse (Prelude.Maybe [FirewallMetadata])
listFirewallsResponse_firewalls :: Lens' ListFirewallsResponse (Maybe [FirewallMetadata])
listFirewallsResponse_firewalls = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFirewallsResponse' {Maybe [FirewallMetadata]
firewalls :: Maybe [FirewallMetadata]
$sel:firewalls:ListFirewallsResponse' :: ListFirewallsResponse -> Maybe [FirewallMetadata]
firewalls} -> Maybe [FirewallMetadata]
firewalls) (\s :: ListFirewallsResponse
s@ListFirewallsResponse' {} Maybe [FirewallMetadata]
a -> ListFirewallsResponse
s {$sel:firewalls:ListFirewallsResponse' :: Maybe [FirewallMetadata]
firewalls = Maybe [FirewallMetadata]
a} :: ListFirewallsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | When you request a list of objects with a @MaxResults@ setting, if the
-- number of objects that are still available for retrieval exceeds the
-- maximum you requested, Network Firewall returns a @NextToken@ value in
-- the response. To retrieve the next batch of objects, use the token
-- returned from the prior request in your next request.
listFirewallsResponse_nextToken :: Lens.Lens' ListFirewallsResponse (Prelude.Maybe Prelude.Text)
listFirewallsResponse_nextToken :: Lens' ListFirewallsResponse (Maybe Text)
listFirewallsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFirewallsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListFirewallsResponse' :: ListFirewallsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListFirewallsResponse
s@ListFirewallsResponse' {} Maybe Text
a -> ListFirewallsResponse
s {$sel:nextToken:ListFirewallsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListFirewallsResponse)

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

instance Prelude.NFData ListFirewallsResponse where
  rnf :: ListFirewallsResponse -> ()
rnf ListFirewallsResponse' {Int
Maybe [FirewallMetadata]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
firewalls :: Maybe [FirewallMetadata]
$sel:httpStatus:ListFirewallsResponse' :: ListFirewallsResponse -> Int
$sel:nextToken:ListFirewallsResponse' :: ListFirewallsResponse -> Maybe Text
$sel:firewalls:ListFirewallsResponse' :: ListFirewallsResponse -> Maybe [FirewallMetadata]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [FirewallMetadata]
firewalls
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus