{-# 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.ListDistributionsByOriginRequestPolicyId
-- 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 origin request 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.ListDistributionsByOriginRequestPolicyId
  ( -- * Creating a Request
    ListDistributionsByOriginRequestPolicyId (..),
    newListDistributionsByOriginRequestPolicyId,

    -- * Request Lenses
    listDistributionsByOriginRequestPolicyId_marker,
    listDistributionsByOriginRequestPolicyId_maxItems,
    listDistributionsByOriginRequestPolicyId_originRequestPolicyId,

    -- * Destructuring the Response
    ListDistributionsByOriginRequestPolicyIdResponse (..),
    newListDistributionsByOriginRequestPolicyIdResponse,

    -- * Response Lenses
    listDistributionsByOriginRequestPolicyIdResponse_distributionIdList,
    listDistributionsByOriginRequestPolicyIdResponse_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:/ 'newListDistributionsByOriginRequestPolicyId' smart constructor.
data ListDistributionsByOriginRequestPolicyId = ListDistributionsByOriginRequestPolicyId'
  { -- | 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.
    ListDistributionsByOriginRequestPolicyId -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of distribution IDs that you want in the response.
    ListDistributionsByOriginRequestPolicyId -> Maybe Text
maxItems :: Prelude.Maybe Prelude.Text,
    -- | The ID of the origin request policy whose associated distribution IDs
    -- you want to list.
    ListDistributionsByOriginRequestPolicyId -> Text
originRequestPolicyId :: Prelude.Text
  }
  deriving (ListDistributionsByOriginRequestPolicyId
-> ListDistributionsByOriginRequestPolicyId -> Bool
(ListDistributionsByOriginRequestPolicyId
 -> ListDistributionsByOriginRequestPolicyId -> Bool)
-> (ListDistributionsByOriginRequestPolicyId
    -> ListDistributionsByOriginRequestPolicyId -> Bool)
-> Eq ListDistributionsByOriginRequestPolicyId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDistributionsByOriginRequestPolicyId
-> ListDistributionsByOriginRequestPolicyId -> Bool
$c/= :: ListDistributionsByOriginRequestPolicyId
-> ListDistributionsByOriginRequestPolicyId -> Bool
== :: ListDistributionsByOriginRequestPolicyId
-> ListDistributionsByOriginRequestPolicyId -> Bool
$c== :: ListDistributionsByOriginRequestPolicyId
-> ListDistributionsByOriginRequestPolicyId -> Bool
Prelude.Eq, ReadPrec [ListDistributionsByOriginRequestPolicyId]
ReadPrec ListDistributionsByOriginRequestPolicyId
Int -> ReadS ListDistributionsByOriginRequestPolicyId
ReadS [ListDistributionsByOriginRequestPolicyId]
(Int -> ReadS ListDistributionsByOriginRequestPolicyId)
-> ReadS [ListDistributionsByOriginRequestPolicyId]
-> ReadPrec ListDistributionsByOriginRequestPolicyId
-> ReadPrec [ListDistributionsByOriginRequestPolicyId]
-> Read ListDistributionsByOriginRequestPolicyId
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDistributionsByOriginRequestPolicyId]
$creadListPrec :: ReadPrec [ListDistributionsByOriginRequestPolicyId]
readPrec :: ReadPrec ListDistributionsByOriginRequestPolicyId
$creadPrec :: ReadPrec ListDistributionsByOriginRequestPolicyId
readList :: ReadS [ListDistributionsByOriginRequestPolicyId]
$creadList :: ReadS [ListDistributionsByOriginRequestPolicyId]
readsPrec :: Int -> ReadS ListDistributionsByOriginRequestPolicyId
$creadsPrec :: Int -> ReadS ListDistributionsByOriginRequestPolicyId
Prelude.Read, Int -> ListDistributionsByOriginRequestPolicyId -> ShowS
[ListDistributionsByOriginRequestPolicyId] -> ShowS
ListDistributionsByOriginRequestPolicyId -> String
(Int -> ListDistributionsByOriginRequestPolicyId -> ShowS)
-> (ListDistributionsByOriginRequestPolicyId -> String)
-> ([ListDistributionsByOriginRequestPolicyId] -> ShowS)
-> Show ListDistributionsByOriginRequestPolicyId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDistributionsByOriginRequestPolicyId] -> ShowS
$cshowList :: [ListDistributionsByOriginRequestPolicyId] -> ShowS
show :: ListDistributionsByOriginRequestPolicyId -> String
$cshow :: ListDistributionsByOriginRequestPolicyId -> String
showsPrec :: Int -> ListDistributionsByOriginRequestPolicyId -> ShowS
$cshowsPrec :: Int -> ListDistributionsByOriginRequestPolicyId -> ShowS
Prelude.Show, (forall x.
 ListDistributionsByOriginRequestPolicyId
 -> Rep ListDistributionsByOriginRequestPolicyId x)
-> (forall x.
    Rep ListDistributionsByOriginRequestPolicyId x
    -> ListDistributionsByOriginRequestPolicyId)
-> Generic ListDistributionsByOriginRequestPolicyId
forall x.
Rep ListDistributionsByOriginRequestPolicyId x
-> ListDistributionsByOriginRequestPolicyId
forall x.
ListDistributionsByOriginRequestPolicyId
-> Rep ListDistributionsByOriginRequestPolicyId x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDistributionsByOriginRequestPolicyId x
-> ListDistributionsByOriginRequestPolicyId
$cfrom :: forall x.
ListDistributionsByOriginRequestPolicyId
-> Rep ListDistributionsByOriginRequestPolicyId x
Prelude.Generic)

-- |
-- Create a value of 'ListDistributionsByOriginRequestPolicyId' 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', 'listDistributionsByOriginRequestPolicyId_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', 'listDistributionsByOriginRequestPolicyId_maxItems' - The maximum number of distribution IDs that you want in the response.
--
-- 'originRequestPolicyId', 'listDistributionsByOriginRequestPolicyId_originRequestPolicyId' - The ID of the origin request policy whose associated distribution IDs
-- you want to list.
newListDistributionsByOriginRequestPolicyId ::
  -- | 'originRequestPolicyId'
  Prelude.Text ->
  ListDistributionsByOriginRequestPolicyId
newListDistributionsByOriginRequestPolicyId :: Text -> ListDistributionsByOriginRequestPolicyId
newListDistributionsByOriginRequestPolicyId
  Text
pOriginRequestPolicyId_ =
    ListDistributionsByOriginRequestPolicyId' :: Maybe Text
-> Maybe Text -> Text -> ListDistributionsByOriginRequestPolicyId
ListDistributionsByOriginRequestPolicyId'
      { $sel:marker:ListDistributionsByOriginRequestPolicyId' :: Maybe Text
marker =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxItems:ListDistributionsByOriginRequestPolicyId' :: Maybe Text
maxItems = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:originRequestPolicyId:ListDistributionsByOriginRequestPolicyId' :: Text
originRequestPolicyId =
          Text
pOriginRequestPolicyId_
      }

-- | 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.
listDistributionsByOriginRequestPolicyId_marker :: Lens.Lens' ListDistributionsByOriginRequestPolicyId (Prelude.Maybe Prelude.Text)
listDistributionsByOriginRequestPolicyId_marker :: (Maybe Text -> f (Maybe Text))
-> ListDistributionsByOriginRequestPolicyId
-> f ListDistributionsByOriginRequestPolicyId
listDistributionsByOriginRequestPolicyId_marker = (ListDistributionsByOriginRequestPolicyId -> Maybe Text)
-> (ListDistributionsByOriginRequestPolicyId
    -> Maybe Text -> ListDistributionsByOriginRequestPolicyId)
-> Lens
     ListDistributionsByOriginRequestPolicyId
     ListDistributionsByOriginRequestPolicyId
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDistributionsByOriginRequestPolicyId' {Maybe Text
marker :: Maybe Text
$sel:marker:ListDistributionsByOriginRequestPolicyId' :: ListDistributionsByOriginRequestPolicyId -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListDistributionsByOriginRequestPolicyId
s@ListDistributionsByOriginRequestPolicyId' {} Maybe Text
a -> ListDistributionsByOriginRequestPolicyId
s {$sel:marker:ListDistributionsByOriginRequestPolicyId' :: Maybe Text
marker = Maybe Text
a} :: ListDistributionsByOriginRequestPolicyId)

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

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

instance
  Core.AWSRequest
    ListDistributionsByOriginRequestPolicyId
  where
  type
    AWSResponse
      ListDistributionsByOriginRequestPolicyId =
      ListDistributionsByOriginRequestPolicyIdResponse
  request :: ListDistributionsByOriginRequestPolicyId
-> Request ListDistributionsByOriginRequestPolicyId
request = Service
-> ListDistributionsByOriginRequestPolicyId
-> Request ListDistributionsByOriginRequestPolicyId
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListDistributionsByOriginRequestPolicyId
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListDistributionsByOriginRequestPolicyId)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either
      String (AWSResponse ListDistributionsByOriginRequestPolicyId))
-> Logger
-> Service
-> Proxy ListDistributionsByOriginRequestPolicyId
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListDistributionsByOriginRequestPolicyId)))
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 -> ListDistributionsByOriginRequestPolicyIdResponse
ListDistributionsByOriginRequestPolicyIdResponse'
            (Maybe DistributionIdList
 -> Int -> ListDistributionsByOriginRequestPolicyIdResponse)
-> Either String (Maybe DistributionIdList)
-> Either
     String (Int -> ListDistributionsByOriginRequestPolicyIdResponse)
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 -> ListDistributionsByOriginRequestPolicyIdResponse)
-> Either String Int
-> Either String ListDistributionsByOriginRequestPolicyIdResponse
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
    ListDistributionsByOriginRequestPolicyId

instance
  Prelude.NFData
    ListDistributionsByOriginRequestPolicyId

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

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

instance
  Core.ToQuery
    ListDistributionsByOriginRequestPolicyId
  where
  toQuery :: ListDistributionsByOriginRequestPolicyId -> QueryString
toQuery ListDistributionsByOriginRequestPolicyId' {Maybe Text
Text
originRequestPolicyId :: Text
maxItems :: Maybe Text
marker :: Maybe Text
$sel:originRequestPolicyId:ListDistributionsByOriginRequestPolicyId' :: ListDistributionsByOriginRequestPolicyId -> Text
$sel:maxItems:ListDistributionsByOriginRequestPolicyId' :: ListDistributionsByOriginRequestPolicyId -> Maybe Text
$sel:marker:ListDistributionsByOriginRequestPolicyId' :: ListDistributionsByOriginRequestPolicyId -> 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:/ 'newListDistributionsByOriginRequestPolicyIdResponse' smart constructor.
data ListDistributionsByOriginRequestPolicyIdResponse = ListDistributionsByOriginRequestPolicyIdResponse'
  { -- | A list of distribution IDs.
    ListDistributionsByOriginRequestPolicyIdResponse
-> Maybe DistributionIdList
distributionIdList :: Prelude.Maybe DistributionIdList,
    -- | The response's http status code.
    ListDistributionsByOriginRequestPolicyIdResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDistributionsByOriginRequestPolicyIdResponse
-> ListDistributionsByOriginRequestPolicyIdResponse -> Bool
(ListDistributionsByOriginRequestPolicyIdResponse
 -> ListDistributionsByOriginRequestPolicyIdResponse -> Bool)
-> (ListDistributionsByOriginRequestPolicyIdResponse
    -> ListDistributionsByOriginRequestPolicyIdResponse -> Bool)
-> Eq ListDistributionsByOriginRequestPolicyIdResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDistributionsByOriginRequestPolicyIdResponse
-> ListDistributionsByOriginRequestPolicyIdResponse -> Bool
$c/= :: ListDistributionsByOriginRequestPolicyIdResponse
-> ListDistributionsByOriginRequestPolicyIdResponse -> Bool
== :: ListDistributionsByOriginRequestPolicyIdResponse
-> ListDistributionsByOriginRequestPolicyIdResponse -> Bool
$c== :: ListDistributionsByOriginRequestPolicyIdResponse
-> ListDistributionsByOriginRequestPolicyIdResponse -> Bool
Prelude.Eq, ReadPrec [ListDistributionsByOriginRequestPolicyIdResponse]
ReadPrec ListDistributionsByOriginRequestPolicyIdResponse
Int -> ReadS ListDistributionsByOriginRequestPolicyIdResponse
ReadS [ListDistributionsByOriginRequestPolicyIdResponse]
(Int -> ReadS ListDistributionsByOriginRequestPolicyIdResponse)
-> ReadS [ListDistributionsByOriginRequestPolicyIdResponse]
-> ReadPrec ListDistributionsByOriginRequestPolicyIdResponse
-> ReadPrec [ListDistributionsByOriginRequestPolicyIdResponse]
-> Read ListDistributionsByOriginRequestPolicyIdResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDistributionsByOriginRequestPolicyIdResponse]
$creadListPrec :: ReadPrec [ListDistributionsByOriginRequestPolicyIdResponse]
readPrec :: ReadPrec ListDistributionsByOriginRequestPolicyIdResponse
$creadPrec :: ReadPrec ListDistributionsByOriginRequestPolicyIdResponse
readList :: ReadS [ListDistributionsByOriginRequestPolicyIdResponse]
$creadList :: ReadS [ListDistributionsByOriginRequestPolicyIdResponse]
readsPrec :: Int -> ReadS ListDistributionsByOriginRequestPolicyIdResponse
$creadsPrec :: Int -> ReadS ListDistributionsByOriginRequestPolicyIdResponse
Prelude.Read, Int -> ListDistributionsByOriginRequestPolicyIdResponse -> ShowS
[ListDistributionsByOriginRequestPolicyIdResponse] -> ShowS
ListDistributionsByOriginRequestPolicyIdResponse -> String
(Int -> ListDistributionsByOriginRequestPolicyIdResponse -> ShowS)
-> (ListDistributionsByOriginRequestPolicyIdResponse -> String)
-> ([ListDistributionsByOriginRequestPolicyIdResponse] -> ShowS)
-> Show ListDistributionsByOriginRequestPolicyIdResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDistributionsByOriginRequestPolicyIdResponse] -> ShowS
$cshowList :: [ListDistributionsByOriginRequestPolicyIdResponse] -> ShowS
show :: ListDistributionsByOriginRequestPolicyIdResponse -> String
$cshow :: ListDistributionsByOriginRequestPolicyIdResponse -> String
showsPrec :: Int -> ListDistributionsByOriginRequestPolicyIdResponse -> ShowS
$cshowsPrec :: Int -> ListDistributionsByOriginRequestPolicyIdResponse -> ShowS
Prelude.Show, (forall x.
 ListDistributionsByOriginRequestPolicyIdResponse
 -> Rep ListDistributionsByOriginRequestPolicyIdResponse x)
-> (forall x.
    Rep ListDistributionsByOriginRequestPolicyIdResponse x
    -> ListDistributionsByOriginRequestPolicyIdResponse)
-> Generic ListDistributionsByOriginRequestPolicyIdResponse
forall x.
Rep ListDistributionsByOriginRequestPolicyIdResponse x
-> ListDistributionsByOriginRequestPolicyIdResponse
forall x.
ListDistributionsByOriginRequestPolicyIdResponse
-> Rep ListDistributionsByOriginRequestPolicyIdResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDistributionsByOriginRequestPolicyIdResponse x
-> ListDistributionsByOriginRequestPolicyIdResponse
$cfrom :: forall x.
ListDistributionsByOriginRequestPolicyIdResponse
-> Rep ListDistributionsByOriginRequestPolicyIdResponse x
Prelude.Generic)

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

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

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

instance
  Prelude.NFData
    ListDistributionsByOriginRequestPolicyIdResponse