{-# 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.ListDistributionsByCachePolicyId
-- 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)
--
-- Gets a list of distribution IDs for distributions that have a cache
-- behavior that’s associated with the specified cache policy.
--
-- You can optionally specify the maximum number of items to receive in the
-- response. If the total number of items in the list exceeds the maximum
-- that you specify, or the default maximum, the response is paginated. To
-- get the next page of items, send a subsequent request that specifies the
-- @NextMarker@ value from the current response as the @Marker@ value in
-- the subsequent request.
module Amazonka.CloudFront.ListDistributionsByCachePolicyId
  ( -- * Creating a Request
    ListDistributionsByCachePolicyId (..),
    newListDistributionsByCachePolicyId,

    -- * Request Lenses
    listDistributionsByCachePolicyId_marker,
    listDistributionsByCachePolicyId_maxItems,
    listDistributionsByCachePolicyId_cachePolicyId,

    -- * Destructuring the Response
    ListDistributionsByCachePolicyIdResponse (..),
    newListDistributionsByCachePolicyIdResponse,

    -- * Response Lenses
    listDistributionsByCachePolicyIdResponse_distributionIdList,
    listDistributionsByCachePolicyIdResponse_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

-- | /See:/ 'newListDistributionsByCachePolicyId' smart constructor.
data ListDistributionsByCachePolicyId = ListDistributionsByCachePolicyId'
  { -- | Use this field when paginating results to indicate where to begin in
    -- your list of distribution IDs. The response includes distribution IDs in
    -- the list that occur after the marker. To get the next page of the list,
    -- set this field’s value to the value of @NextMarker@ from the current
    -- page’s response.
    ListDistributionsByCachePolicyId -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of distribution IDs that you want in the response.
    ListDistributionsByCachePolicyId -> Maybe Text
maxItems :: Prelude.Maybe Prelude.Text,
    -- | The ID of the cache policy whose associated distribution IDs you want to
    -- list.
    ListDistributionsByCachePolicyId -> Text
cachePolicyId :: Prelude.Text
  }
  deriving (ListDistributionsByCachePolicyId
-> ListDistributionsByCachePolicyId -> Bool
(ListDistributionsByCachePolicyId
 -> ListDistributionsByCachePolicyId -> Bool)
-> (ListDistributionsByCachePolicyId
    -> ListDistributionsByCachePolicyId -> Bool)
-> Eq ListDistributionsByCachePolicyId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDistributionsByCachePolicyId
-> ListDistributionsByCachePolicyId -> Bool
$c/= :: ListDistributionsByCachePolicyId
-> ListDistributionsByCachePolicyId -> Bool
== :: ListDistributionsByCachePolicyId
-> ListDistributionsByCachePolicyId -> Bool
$c== :: ListDistributionsByCachePolicyId
-> ListDistributionsByCachePolicyId -> Bool
Prelude.Eq, ReadPrec [ListDistributionsByCachePolicyId]
ReadPrec ListDistributionsByCachePolicyId
Int -> ReadS ListDistributionsByCachePolicyId
ReadS [ListDistributionsByCachePolicyId]
(Int -> ReadS ListDistributionsByCachePolicyId)
-> ReadS [ListDistributionsByCachePolicyId]
-> ReadPrec ListDistributionsByCachePolicyId
-> ReadPrec [ListDistributionsByCachePolicyId]
-> Read ListDistributionsByCachePolicyId
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDistributionsByCachePolicyId]
$creadListPrec :: ReadPrec [ListDistributionsByCachePolicyId]
readPrec :: ReadPrec ListDistributionsByCachePolicyId
$creadPrec :: ReadPrec ListDistributionsByCachePolicyId
readList :: ReadS [ListDistributionsByCachePolicyId]
$creadList :: ReadS [ListDistributionsByCachePolicyId]
readsPrec :: Int -> ReadS ListDistributionsByCachePolicyId
$creadsPrec :: Int -> ReadS ListDistributionsByCachePolicyId
Prelude.Read, Int -> ListDistributionsByCachePolicyId -> ShowS
[ListDistributionsByCachePolicyId] -> ShowS
ListDistributionsByCachePolicyId -> String
(Int -> ListDistributionsByCachePolicyId -> ShowS)
-> (ListDistributionsByCachePolicyId -> String)
-> ([ListDistributionsByCachePolicyId] -> ShowS)
-> Show ListDistributionsByCachePolicyId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDistributionsByCachePolicyId] -> ShowS
$cshowList :: [ListDistributionsByCachePolicyId] -> ShowS
show :: ListDistributionsByCachePolicyId -> String
$cshow :: ListDistributionsByCachePolicyId -> String
showsPrec :: Int -> ListDistributionsByCachePolicyId -> ShowS
$cshowsPrec :: Int -> ListDistributionsByCachePolicyId -> ShowS
Prelude.Show, (forall x.
 ListDistributionsByCachePolicyId
 -> Rep ListDistributionsByCachePolicyId x)
-> (forall x.
    Rep ListDistributionsByCachePolicyId x
    -> ListDistributionsByCachePolicyId)
-> Generic ListDistributionsByCachePolicyId
forall x.
Rep ListDistributionsByCachePolicyId x
-> ListDistributionsByCachePolicyId
forall x.
ListDistributionsByCachePolicyId
-> Rep ListDistributionsByCachePolicyId x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDistributionsByCachePolicyId x
-> ListDistributionsByCachePolicyId
$cfrom :: forall x.
ListDistributionsByCachePolicyId
-> Rep ListDistributionsByCachePolicyId x
Prelude.Generic)

-- |
-- Create a value of 'ListDistributionsByCachePolicyId' 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', 'listDistributionsByCachePolicyId_marker' - Use this field when paginating results to indicate where to begin in
-- your list of distribution IDs. The response includes distribution IDs in
-- the list that occur after the marker. To get the next page of the list,
-- set this field’s value to the value of @NextMarker@ from the current
-- page’s response.
--
-- 'maxItems', 'listDistributionsByCachePolicyId_maxItems' - The maximum number of distribution IDs that you want in the response.
--
-- 'cachePolicyId', 'listDistributionsByCachePolicyId_cachePolicyId' - The ID of the cache policy whose associated distribution IDs you want to
-- list.
newListDistributionsByCachePolicyId ::
  -- | 'cachePolicyId'
  Prelude.Text ->
  ListDistributionsByCachePolicyId
newListDistributionsByCachePolicyId :: Text -> ListDistributionsByCachePolicyId
newListDistributionsByCachePolicyId Text
pCachePolicyId_ =
  ListDistributionsByCachePolicyId' :: Maybe Text
-> Maybe Text -> Text -> ListDistributionsByCachePolicyId
ListDistributionsByCachePolicyId'
    { $sel:marker:ListDistributionsByCachePolicyId' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListDistributionsByCachePolicyId' :: Maybe Text
maxItems = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cachePolicyId:ListDistributionsByCachePolicyId' :: Text
cachePolicyId = Text
pCachePolicyId_
    }

-- | Use this field when paginating results to indicate where to begin in
-- your list of distribution IDs. The response includes distribution IDs in
-- the list that occur after the marker. To get the next page of the list,
-- set this field’s value to the value of @NextMarker@ from the current
-- page’s response.
listDistributionsByCachePolicyId_marker :: Lens.Lens' ListDistributionsByCachePolicyId (Prelude.Maybe Prelude.Text)
listDistributionsByCachePolicyId_marker :: (Maybe Text -> f (Maybe Text))
-> ListDistributionsByCachePolicyId
-> f ListDistributionsByCachePolicyId
listDistributionsByCachePolicyId_marker = (ListDistributionsByCachePolicyId -> Maybe Text)
-> (ListDistributionsByCachePolicyId
    -> Maybe Text -> ListDistributionsByCachePolicyId)
-> Lens
     ListDistributionsByCachePolicyId
     ListDistributionsByCachePolicyId
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDistributionsByCachePolicyId' {Maybe Text
marker :: Maybe Text
$sel:marker:ListDistributionsByCachePolicyId' :: ListDistributionsByCachePolicyId -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListDistributionsByCachePolicyId
s@ListDistributionsByCachePolicyId' {} Maybe Text
a -> ListDistributionsByCachePolicyId
s {$sel:marker:ListDistributionsByCachePolicyId' :: Maybe Text
marker = Maybe Text
a} :: ListDistributionsByCachePolicyId)

-- | The maximum number of distribution IDs that you want in the response.
listDistributionsByCachePolicyId_maxItems :: Lens.Lens' ListDistributionsByCachePolicyId (Prelude.Maybe Prelude.Text)
listDistributionsByCachePolicyId_maxItems :: (Maybe Text -> f (Maybe Text))
-> ListDistributionsByCachePolicyId
-> f ListDistributionsByCachePolicyId
listDistributionsByCachePolicyId_maxItems = (ListDistributionsByCachePolicyId -> Maybe Text)
-> (ListDistributionsByCachePolicyId
    -> Maybe Text -> ListDistributionsByCachePolicyId)
-> Lens
     ListDistributionsByCachePolicyId
     ListDistributionsByCachePolicyId
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDistributionsByCachePolicyId' {Maybe Text
maxItems :: Maybe Text
$sel:maxItems:ListDistributionsByCachePolicyId' :: ListDistributionsByCachePolicyId -> Maybe Text
maxItems} -> Maybe Text
maxItems) (\s :: ListDistributionsByCachePolicyId
s@ListDistributionsByCachePolicyId' {} Maybe Text
a -> ListDistributionsByCachePolicyId
s {$sel:maxItems:ListDistributionsByCachePolicyId' :: Maybe Text
maxItems = Maybe Text
a} :: ListDistributionsByCachePolicyId)

-- | The ID of the cache policy whose associated distribution IDs you want to
-- list.
listDistributionsByCachePolicyId_cachePolicyId :: Lens.Lens' ListDistributionsByCachePolicyId Prelude.Text
listDistributionsByCachePolicyId_cachePolicyId :: (Text -> f Text)
-> ListDistributionsByCachePolicyId
-> f ListDistributionsByCachePolicyId
listDistributionsByCachePolicyId_cachePolicyId = (ListDistributionsByCachePolicyId -> Text)
-> (ListDistributionsByCachePolicyId
    -> Text -> ListDistributionsByCachePolicyId)
-> Lens
     ListDistributionsByCachePolicyId
     ListDistributionsByCachePolicyId
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDistributionsByCachePolicyId' {Text
cachePolicyId :: Text
$sel:cachePolicyId:ListDistributionsByCachePolicyId' :: ListDistributionsByCachePolicyId -> Text
cachePolicyId} -> Text
cachePolicyId) (\s :: ListDistributionsByCachePolicyId
s@ListDistributionsByCachePolicyId' {} Text
a -> ListDistributionsByCachePolicyId
s {$sel:cachePolicyId:ListDistributionsByCachePolicyId' :: Text
cachePolicyId = Text
a} :: ListDistributionsByCachePolicyId)

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

instance
  Prelude.NFData
    ListDistributionsByCachePolicyId

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

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

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

-- | /See:/ 'newListDistributionsByCachePolicyIdResponse' smart constructor.
data ListDistributionsByCachePolicyIdResponse = ListDistributionsByCachePolicyIdResponse'
  { -- | A list of distribution IDs.
    ListDistributionsByCachePolicyIdResponse
-> Maybe DistributionIdList
distributionIdList :: Prelude.Maybe DistributionIdList,
    -- | The response's http status code.
    ListDistributionsByCachePolicyIdResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDistributionsByCachePolicyIdResponse
-> ListDistributionsByCachePolicyIdResponse -> Bool
(ListDistributionsByCachePolicyIdResponse
 -> ListDistributionsByCachePolicyIdResponse -> Bool)
-> (ListDistributionsByCachePolicyIdResponse
    -> ListDistributionsByCachePolicyIdResponse -> Bool)
-> Eq ListDistributionsByCachePolicyIdResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDistributionsByCachePolicyIdResponse
-> ListDistributionsByCachePolicyIdResponse -> Bool
$c/= :: ListDistributionsByCachePolicyIdResponse
-> ListDistributionsByCachePolicyIdResponse -> Bool
== :: ListDistributionsByCachePolicyIdResponse
-> ListDistributionsByCachePolicyIdResponse -> Bool
$c== :: ListDistributionsByCachePolicyIdResponse
-> ListDistributionsByCachePolicyIdResponse -> Bool
Prelude.Eq, ReadPrec [ListDistributionsByCachePolicyIdResponse]
ReadPrec ListDistributionsByCachePolicyIdResponse
Int -> ReadS ListDistributionsByCachePolicyIdResponse
ReadS [ListDistributionsByCachePolicyIdResponse]
(Int -> ReadS ListDistributionsByCachePolicyIdResponse)
-> ReadS [ListDistributionsByCachePolicyIdResponse]
-> ReadPrec ListDistributionsByCachePolicyIdResponse
-> ReadPrec [ListDistributionsByCachePolicyIdResponse]
-> Read ListDistributionsByCachePolicyIdResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDistributionsByCachePolicyIdResponse]
$creadListPrec :: ReadPrec [ListDistributionsByCachePolicyIdResponse]
readPrec :: ReadPrec ListDistributionsByCachePolicyIdResponse
$creadPrec :: ReadPrec ListDistributionsByCachePolicyIdResponse
readList :: ReadS [ListDistributionsByCachePolicyIdResponse]
$creadList :: ReadS [ListDistributionsByCachePolicyIdResponse]
readsPrec :: Int -> ReadS ListDistributionsByCachePolicyIdResponse
$creadsPrec :: Int -> ReadS ListDistributionsByCachePolicyIdResponse
Prelude.Read, Int -> ListDistributionsByCachePolicyIdResponse -> ShowS
[ListDistributionsByCachePolicyIdResponse] -> ShowS
ListDistributionsByCachePolicyIdResponse -> String
(Int -> ListDistributionsByCachePolicyIdResponse -> ShowS)
-> (ListDistributionsByCachePolicyIdResponse -> String)
-> ([ListDistributionsByCachePolicyIdResponse] -> ShowS)
-> Show ListDistributionsByCachePolicyIdResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDistributionsByCachePolicyIdResponse] -> ShowS
$cshowList :: [ListDistributionsByCachePolicyIdResponse] -> ShowS
show :: ListDistributionsByCachePolicyIdResponse -> String
$cshow :: ListDistributionsByCachePolicyIdResponse -> String
showsPrec :: Int -> ListDistributionsByCachePolicyIdResponse -> ShowS
$cshowsPrec :: Int -> ListDistributionsByCachePolicyIdResponse -> ShowS
Prelude.Show, (forall x.
 ListDistributionsByCachePolicyIdResponse
 -> Rep ListDistributionsByCachePolicyIdResponse x)
-> (forall x.
    Rep ListDistributionsByCachePolicyIdResponse x
    -> ListDistributionsByCachePolicyIdResponse)
-> Generic ListDistributionsByCachePolicyIdResponse
forall x.
Rep ListDistributionsByCachePolicyIdResponse x
-> ListDistributionsByCachePolicyIdResponse
forall x.
ListDistributionsByCachePolicyIdResponse
-> Rep ListDistributionsByCachePolicyIdResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDistributionsByCachePolicyIdResponse x
-> ListDistributionsByCachePolicyIdResponse
$cfrom :: forall x.
ListDistributionsByCachePolicyIdResponse
-> Rep ListDistributionsByCachePolicyIdResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDistributionsByCachePolicyIdResponse' 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:
--
-- 'distributionIdList', 'listDistributionsByCachePolicyIdResponse_distributionIdList' - A list of distribution IDs.
--
-- 'httpStatus', 'listDistributionsByCachePolicyIdResponse_httpStatus' - The response's http status code.
newListDistributionsByCachePolicyIdResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDistributionsByCachePolicyIdResponse
newListDistributionsByCachePolicyIdResponse :: Int -> ListDistributionsByCachePolicyIdResponse
newListDistributionsByCachePolicyIdResponse
  Int
pHttpStatus_ =
    ListDistributionsByCachePolicyIdResponse' :: Maybe DistributionIdList
-> Int -> ListDistributionsByCachePolicyIdResponse
ListDistributionsByCachePolicyIdResponse'
      { $sel:distributionIdList:ListDistributionsByCachePolicyIdResponse' :: Maybe DistributionIdList
distributionIdList =
          Maybe DistributionIdList
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListDistributionsByCachePolicyIdResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | A list of distribution IDs.
listDistributionsByCachePolicyIdResponse_distributionIdList :: Lens.Lens' ListDistributionsByCachePolicyIdResponse (Prelude.Maybe DistributionIdList)
listDistributionsByCachePolicyIdResponse_distributionIdList :: (Maybe DistributionIdList -> f (Maybe DistributionIdList))
-> ListDistributionsByCachePolicyIdResponse
-> f ListDistributionsByCachePolicyIdResponse
listDistributionsByCachePolicyIdResponse_distributionIdList = (ListDistributionsByCachePolicyIdResponse
 -> Maybe DistributionIdList)
-> (ListDistributionsByCachePolicyIdResponse
    -> Maybe DistributionIdList
    -> ListDistributionsByCachePolicyIdResponse)
-> Lens
     ListDistributionsByCachePolicyIdResponse
     ListDistributionsByCachePolicyIdResponse
     (Maybe DistributionIdList)
     (Maybe DistributionIdList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDistributionsByCachePolicyIdResponse' {Maybe DistributionIdList
distributionIdList :: Maybe DistributionIdList
$sel:distributionIdList:ListDistributionsByCachePolicyIdResponse' :: ListDistributionsByCachePolicyIdResponse
-> Maybe DistributionIdList
distributionIdList} -> Maybe DistributionIdList
distributionIdList) (\s :: ListDistributionsByCachePolicyIdResponse
s@ListDistributionsByCachePolicyIdResponse' {} Maybe DistributionIdList
a -> ListDistributionsByCachePolicyIdResponse
s {$sel:distributionIdList:ListDistributionsByCachePolicyIdResponse' :: Maybe DistributionIdList
distributionIdList = Maybe DistributionIdList
a} :: ListDistributionsByCachePolicyIdResponse)

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

instance
  Prelude.NFData
    ListDistributionsByCachePolicyIdResponse