{-# 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.CloudFront.ListDistributionsByWebACLId
-- 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)
--
-- List the distributions that are associated with a specified WAF web ACL.
module Amazonka.CloudFront.ListDistributionsByWebACLId
  ( -- * Creating a Request
    ListDistributionsByWebACLId (..),
    newListDistributionsByWebACLId,

    -- * Request Lenses
    listDistributionsByWebACLId_marker,
    listDistributionsByWebACLId_maxItems,
    listDistributionsByWebACLId_webACLId,

    -- * Destructuring the Response
    ListDistributionsByWebACLIdResponse (..),
    newListDistributionsByWebACLIdResponse,

    -- * Response Lenses
    listDistributionsByWebACLIdResponse_distributionList,
    listDistributionsByWebACLIdResponse_httpStatus,
  )
where

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

-- | The request to list distributions that are associated with a specified
-- WAF web ACL.
--
-- /See:/ 'newListDistributionsByWebACLId' smart constructor.
data ListDistributionsByWebACLId = ListDistributionsByWebACLId'
  { -- | Use @Marker@ and @MaxItems@ to control pagination of results. If you
    -- have more than @MaxItems@ distributions that satisfy the request, the
    -- response includes a @NextMarker@ element. To get the next page of
    -- results, submit another request. For the value of @Marker@, specify the
    -- value of @NextMarker@ from the last response. (For the first request,
    -- omit @Marker@.)
    ListDistributionsByWebACLId -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of distributions that you want CloudFront to return
    -- in the response body. The maximum and default values are both 100.
    ListDistributionsByWebACLId -> Maybe Text
maxItems :: Prelude.Maybe Prelude.Text,
    -- | The ID of the WAF web ACL that you want to list the associated
    -- distributions. If you specify \"null\" for the ID, the request returns a
    -- list of the distributions that aren\'t associated with a web ACL.
    ListDistributionsByWebACLId -> Text
webACLId :: Prelude.Text
  }
  deriving (ListDistributionsByWebACLId -> ListDistributionsByWebACLId -> Bool
(ListDistributionsByWebACLId
 -> ListDistributionsByWebACLId -> Bool)
-> (ListDistributionsByWebACLId
    -> ListDistributionsByWebACLId -> Bool)
-> Eq ListDistributionsByWebACLId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDistributionsByWebACLId -> ListDistributionsByWebACLId -> Bool
$c/= :: ListDistributionsByWebACLId -> ListDistributionsByWebACLId -> Bool
== :: ListDistributionsByWebACLId -> ListDistributionsByWebACLId -> Bool
$c== :: ListDistributionsByWebACLId -> ListDistributionsByWebACLId -> Bool
Prelude.Eq, ReadPrec [ListDistributionsByWebACLId]
ReadPrec ListDistributionsByWebACLId
Int -> ReadS ListDistributionsByWebACLId
ReadS [ListDistributionsByWebACLId]
(Int -> ReadS ListDistributionsByWebACLId)
-> ReadS [ListDistributionsByWebACLId]
-> ReadPrec ListDistributionsByWebACLId
-> ReadPrec [ListDistributionsByWebACLId]
-> Read ListDistributionsByWebACLId
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDistributionsByWebACLId]
$creadListPrec :: ReadPrec [ListDistributionsByWebACLId]
readPrec :: ReadPrec ListDistributionsByWebACLId
$creadPrec :: ReadPrec ListDistributionsByWebACLId
readList :: ReadS [ListDistributionsByWebACLId]
$creadList :: ReadS [ListDistributionsByWebACLId]
readsPrec :: Int -> ReadS ListDistributionsByWebACLId
$creadsPrec :: Int -> ReadS ListDistributionsByWebACLId
Prelude.Read, Int -> ListDistributionsByWebACLId -> ShowS
[ListDistributionsByWebACLId] -> ShowS
ListDistributionsByWebACLId -> String
(Int -> ListDistributionsByWebACLId -> ShowS)
-> (ListDistributionsByWebACLId -> String)
-> ([ListDistributionsByWebACLId] -> ShowS)
-> Show ListDistributionsByWebACLId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDistributionsByWebACLId] -> ShowS
$cshowList :: [ListDistributionsByWebACLId] -> ShowS
show :: ListDistributionsByWebACLId -> String
$cshow :: ListDistributionsByWebACLId -> String
showsPrec :: Int -> ListDistributionsByWebACLId -> ShowS
$cshowsPrec :: Int -> ListDistributionsByWebACLId -> ShowS
Prelude.Show, (forall x.
 ListDistributionsByWebACLId -> Rep ListDistributionsByWebACLId x)
-> (forall x.
    Rep ListDistributionsByWebACLId x -> ListDistributionsByWebACLId)
-> Generic ListDistributionsByWebACLId
forall x.
Rep ListDistributionsByWebACLId x -> ListDistributionsByWebACLId
forall x.
ListDistributionsByWebACLId -> Rep ListDistributionsByWebACLId x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDistributionsByWebACLId x -> ListDistributionsByWebACLId
$cfrom :: forall x.
ListDistributionsByWebACLId -> Rep ListDistributionsByWebACLId x
Prelude.Generic)

-- |
-- Create a value of 'ListDistributionsByWebACLId' 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', 'listDistributionsByWebACLId_marker' - Use @Marker@ and @MaxItems@ to control pagination of results. If you
-- have more than @MaxItems@ distributions that satisfy the request, the
-- response includes a @NextMarker@ element. To get the next page of
-- results, submit another request. For the value of @Marker@, specify the
-- value of @NextMarker@ from the last response. (For the first request,
-- omit @Marker@.)
--
-- 'maxItems', 'listDistributionsByWebACLId_maxItems' - The maximum number of distributions that you want CloudFront to return
-- in the response body. The maximum and default values are both 100.
--
-- 'webACLId', 'listDistributionsByWebACLId_webACLId' - The ID of the WAF web ACL that you want to list the associated
-- distributions. If you specify \"null\" for the ID, the request returns a
-- list of the distributions that aren\'t associated with a web ACL.
newListDistributionsByWebACLId ::
  -- | 'webACLId'
  Prelude.Text ->
  ListDistributionsByWebACLId
newListDistributionsByWebACLId :: Text -> ListDistributionsByWebACLId
newListDistributionsByWebACLId Text
pWebACLId_ =
  ListDistributionsByWebACLId' :: Maybe Text -> Maybe Text -> Text -> ListDistributionsByWebACLId
ListDistributionsByWebACLId'
    { $sel:marker:ListDistributionsByWebACLId' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListDistributionsByWebACLId' :: Maybe Text
maxItems = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:webACLId:ListDistributionsByWebACLId' :: Text
webACLId = Text
pWebACLId_
    }

-- | Use @Marker@ and @MaxItems@ to control pagination of results. If you
-- have more than @MaxItems@ distributions that satisfy the request, the
-- response includes a @NextMarker@ element. To get the next page of
-- results, submit another request. For the value of @Marker@, specify the
-- value of @NextMarker@ from the last response. (For the first request,
-- omit @Marker@.)
listDistributionsByWebACLId_marker :: Lens.Lens' ListDistributionsByWebACLId (Prelude.Maybe Prelude.Text)
listDistributionsByWebACLId_marker :: (Maybe Text -> f (Maybe Text))
-> ListDistributionsByWebACLId -> f ListDistributionsByWebACLId
listDistributionsByWebACLId_marker = (ListDistributionsByWebACLId -> Maybe Text)
-> (ListDistributionsByWebACLId
    -> Maybe Text -> ListDistributionsByWebACLId)
-> Lens
     ListDistributionsByWebACLId
     ListDistributionsByWebACLId
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDistributionsByWebACLId' {Maybe Text
marker :: Maybe Text
$sel:marker:ListDistributionsByWebACLId' :: ListDistributionsByWebACLId -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListDistributionsByWebACLId
s@ListDistributionsByWebACLId' {} Maybe Text
a -> ListDistributionsByWebACLId
s {$sel:marker:ListDistributionsByWebACLId' :: Maybe Text
marker = Maybe Text
a} :: ListDistributionsByWebACLId)

-- | The maximum number of distributions that you want CloudFront to return
-- in the response body. The maximum and default values are both 100.
listDistributionsByWebACLId_maxItems :: Lens.Lens' ListDistributionsByWebACLId (Prelude.Maybe Prelude.Text)
listDistributionsByWebACLId_maxItems :: (Maybe Text -> f (Maybe Text))
-> ListDistributionsByWebACLId -> f ListDistributionsByWebACLId
listDistributionsByWebACLId_maxItems = (ListDistributionsByWebACLId -> Maybe Text)
-> (ListDistributionsByWebACLId
    -> Maybe Text -> ListDistributionsByWebACLId)
-> Lens
     ListDistributionsByWebACLId
     ListDistributionsByWebACLId
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDistributionsByWebACLId' {Maybe Text
maxItems :: Maybe Text
$sel:maxItems:ListDistributionsByWebACLId' :: ListDistributionsByWebACLId -> Maybe Text
maxItems} -> Maybe Text
maxItems) (\s :: ListDistributionsByWebACLId
s@ListDistributionsByWebACLId' {} Maybe Text
a -> ListDistributionsByWebACLId
s {$sel:maxItems:ListDistributionsByWebACLId' :: Maybe Text
maxItems = Maybe Text
a} :: ListDistributionsByWebACLId)

-- | The ID of the WAF web ACL that you want to list the associated
-- distributions. If you specify \"null\" for the ID, the request returns a
-- list of the distributions that aren\'t associated with a web ACL.
listDistributionsByWebACLId_webACLId :: Lens.Lens' ListDistributionsByWebACLId Prelude.Text
listDistributionsByWebACLId_webACLId :: (Text -> f Text)
-> ListDistributionsByWebACLId -> f ListDistributionsByWebACLId
listDistributionsByWebACLId_webACLId = (ListDistributionsByWebACLId -> Text)
-> (ListDistributionsByWebACLId
    -> Text -> ListDistributionsByWebACLId)
-> Lens
     ListDistributionsByWebACLId ListDistributionsByWebACLId Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDistributionsByWebACLId' {Text
webACLId :: Text
$sel:webACLId:ListDistributionsByWebACLId' :: ListDistributionsByWebACLId -> Text
webACLId} -> Text
webACLId) (\s :: ListDistributionsByWebACLId
s@ListDistributionsByWebACLId' {} Text
a -> ListDistributionsByWebACLId
s {$sel:webACLId:ListDistributionsByWebACLId' :: Text
webACLId = Text
a} :: ListDistributionsByWebACLId)

instance Core.AWSRequest ListDistributionsByWebACLId where
  type
    AWSResponse ListDistributionsByWebACLId =
      ListDistributionsByWebACLIdResponse
  request :: ListDistributionsByWebACLId -> Request ListDistributionsByWebACLId
request = Service
-> ListDistributionsByWebACLId
-> Request ListDistributionsByWebACLId
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListDistributionsByWebACLId
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDistributionsByWebACLId)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse ListDistributionsByWebACLId))
-> Logger
-> Service
-> Proxy ListDistributionsByWebACLId
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDistributionsByWebACLId)))
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 DistributionList
-> Int -> ListDistributionsByWebACLIdResponse
ListDistributionsByWebACLIdResponse'
            (Maybe DistributionList
 -> Int -> ListDistributionsByWebACLIdResponse)
-> Either String (Maybe DistributionList)
-> Either String (Int -> ListDistributionsByWebACLIdResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node] -> Either String (Maybe DistributionList)
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
            Either String (Int -> ListDistributionsByWebACLIdResponse)
-> Either String Int
-> Either String ListDistributionsByWebACLIdResponse
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 ListDistributionsByWebACLId

instance Prelude.NFData ListDistributionsByWebACLId

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

instance Core.ToPath ListDistributionsByWebACLId where
  toPath :: ListDistributionsByWebACLId -> ByteString
toPath ListDistributionsByWebACLId' {Maybe Text
Text
webACLId :: Text
maxItems :: Maybe Text
marker :: Maybe Text
$sel:webACLId:ListDistributionsByWebACLId' :: ListDistributionsByWebACLId -> Text
$sel:maxItems:ListDistributionsByWebACLId' :: ListDistributionsByWebACLId -> Maybe Text
$sel:marker:ListDistributionsByWebACLId' :: ListDistributionsByWebACLId -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2020-05-31/distributionsByWebACLId/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
webACLId
      ]

instance Core.ToQuery ListDistributionsByWebACLId where
  toQuery :: ListDistributionsByWebACLId -> QueryString
toQuery ListDistributionsByWebACLId' {Maybe Text
Text
webACLId :: Text
maxItems :: Maybe Text
marker :: Maybe Text
$sel:webACLId:ListDistributionsByWebACLId' :: ListDistributionsByWebACLId -> Text
$sel:maxItems:ListDistributionsByWebACLId' :: ListDistributionsByWebACLId -> Maybe Text
$sel:marker:ListDistributionsByWebACLId' :: ListDistributionsByWebACLId -> 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
      ]

-- | The response to a request to list the distributions that are associated
-- with a specified WAF web ACL.
--
-- /See:/ 'newListDistributionsByWebACLIdResponse' smart constructor.
data ListDistributionsByWebACLIdResponse = ListDistributionsByWebACLIdResponse'
  { -- | The @DistributionList@ type.
    ListDistributionsByWebACLIdResponse -> Maybe DistributionList
distributionList :: Prelude.Maybe DistributionList,
    -- | The response's http status code.
    ListDistributionsByWebACLIdResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDistributionsByWebACLIdResponse
-> ListDistributionsByWebACLIdResponse -> Bool
(ListDistributionsByWebACLIdResponse
 -> ListDistributionsByWebACLIdResponse -> Bool)
-> (ListDistributionsByWebACLIdResponse
    -> ListDistributionsByWebACLIdResponse -> Bool)
-> Eq ListDistributionsByWebACLIdResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDistributionsByWebACLIdResponse
-> ListDistributionsByWebACLIdResponse -> Bool
$c/= :: ListDistributionsByWebACLIdResponse
-> ListDistributionsByWebACLIdResponse -> Bool
== :: ListDistributionsByWebACLIdResponse
-> ListDistributionsByWebACLIdResponse -> Bool
$c== :: ListDistributionsByWebACLIdResponse
-> ListDistributionsByWebACLIdResponse -> Bool
Prelude.Eq, ReadPrec [ListDistributionsByWebACLIdResponse]
ReadPrec ListDistributionsByWebACLIdResponse
Int -> ReadS ListDistributionsByWebACLIdResponse
ReadS [ListDistributionsByWebACLIdResponse]
(Int -> ReadS ListDistributionsByWebACLIdResponse)
-> ReadS [ListDistributionsByWebACLIdResponse]
-> ReadPrec ListDistributionsByWebACLIdResponse
-> ReadPrec [ListDistributionsByWebACLIdResponse]
-> Read ListDistributionsByWebACLIdResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDistributionsByWebACLIdResponse]
$creadListPrec :: ReadPrec [ListDistributionsByWebACLIdResponse]
readPrec :: ReadPrec ListDistributionsByWebACLIdResponse
$creadPrec :: ReadPrec ListDistributionsByWebACLIdResponse
readList :: ReadS [ListDistributionsByWebACLIdResponse]
$creadList :: ReadS [ListDistributionsByWebACLIdResponse]
readsPrec :: Int -> ReadS ListDistributionsByWebACLIdResponse
$creadsPrec :: Int -> ReadS ListDistributionsByWebACLIdResponse
Prelude.Read, Int -> ListDistributionsByWebACLIdResponse -> ShowS
[ListDistributionsByWebACLIdResponse] -> ShowS
ListDistributionsByWebACLIdResponse -> String
(Int -> ListDistributionsByWebACLIdResponse -> ShowS)
-> (ListDistributionsByWebACLIdResponse -> String)
-> ([ListDistributionsByWebACLIdResponse] -> ShowS)
-> Show ListDistributionsByWebACLIdResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDistributionsByWebACLIdResponse] -> ShowS
$cshowList :: [ListDistributionsByWebACLIdResponse] -> ShowS
show :: ListDistributionsByWebACLIdResponse -> String
$cshow :: ListDistributionsByWebACLIdResponse -> String
showsPrec :: Int -> ListDistributionsByWebACLIdResponse -> ShowS
$cshowsPrec :: Int -> ListDistributionsByWebACLIdResponse -> ShowS
Prelude.Show, (forall x.
 ListDistributionsByWebACLIdResponse
 -> Rep ListDistributionsByWebACLIdResponse x)
-> (forall x.
    Rep ListDistributionsByWebACLIdResponse x
    -> ListDistributionsByWebACLIdResponse)
-> Generic ListDistributionsByWebACLIdResponse
forall x.
Rep ListDistributionsByWebACLIdResponse x
-> ListDistributionsByWebACLIdResponse
forall x.
ListDistributionsByWebACLIdResponse
-> Rep ListDistributionsByWebACLIdResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDistributionsByWebACLIdResponse x
-> ListDistributionsByWebACLIdResponse
$cfrom :: forall x.
ListDistributionsByWebACLIdResponse
-> Rep ListDistributionsByWebACLIdResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDistributionsByWebACLIdResponse' 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:
--
-- 'distributionList', 'listDistributionsByWebACLIdResponse_distributionList' - The @DistributionList@ type.
--
-- 'httpStatus', 'listDistributionsByWebACLIdResponse_httpStatus' - The response's http status code.
newListDistributionsByWebACLIdResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDistributionsByWebACLIdResponse
newListDistributionsByWebACLIdResponse :: Int -> ListDistributionsByWebACLIdResponse
newListDistributionsByWebACLIdResponse Int
pHttpStatus_ =
  ListDistributionsByWebACLIdResponse' :: Maybe DistributionList
-> Int -> ListDistributionsByWebACLIdResponse
ListDistributionsByWebACLIdResponse'
    { $sel:distributionList:ListDistributionsByWebACLIdResponse' :: Maybe DistributionList
distributionList =
        Maybe DistributionList
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDistributionsByWebACLIdResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The @DistributionList@ type.
listDistributionsByWebACLIdResponse_distributionList :: Lens.Lens' ListDistributionsByWebACLIdResponse (Prelude.Maybe DistributionList)
listDistributionsByWebACLIdResponse_distributionList :: (Maybe DistributionList -> f (Maybe DistributionList))
-> ListDistributionsByWebACLIdResponse
-> f ListDistributionsByWebACLIdResponse
listDistributionsByWebACLIdResponse_distributionList = (ListDistributionsByWebACLIdResponse -> Maybe DistributionList)
-> (ListDistributionsByWebACLIdResponse
    -> Maybe DistributionList -> ListDistributionsByWebACLIdResponse)
-> Lens
     ListDistributionsByWebACLIdResponse
     ListDistributionsByWebACLIdResponse
     (Maybe DistributionList)
     (Maybe DistributionList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDistributionsByWebACLIdResponse' {Maybe DistributionList
distributionList :: Maybe DistributionList
$sel:distributionList:ListDistributionsByWebACLIdResponse' :: ListDistributionsByWebACLIdResponse -> Maybe DistributionList
distributionList} -> Maybe DistributionList
distributionList) (\s :: ListDistributionsByWebACLIdResponse
s@ListDistributionsByWebACLIdResponse' {} Maybe DistributionList
a -> ListDistributionsByWebACLIdResponse
s {$sel:distributionList:ListDistributionsByWebACLIdResponse' :: Maybe DistributionList
distributionList = Maybe DistributionList
a} :: ListDistributionsByWebACLIdResponse)

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

instance
  Prelude.NFData
    ListDistributionsByWebACLIdResponse