{-# 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.ListDistributionsByKeyGroup
-- 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 references the specified key group.
--
-- 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.ListDistributionsByKeyGroup
  ( -- * Creating a Request
    ListDistributionsByKeyGroup (..),
    newListDistributionsByKeyGroup,

    -- * Request Lenses
    listDistributionsByKeyGroup_marker,
    listDistributionsByKeyGroup_maxItems,
    listDistributionsByKeyGroup_keyGroupId,

    -- * Destructuring the Response
    ListDistributionsByKeyGroupResponse (..),
    newListDistributionsByKeyGroupResponse,

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

-- |
-- Create a value of 'ListDistributionsByKeyGroup' 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', 'listDistributionsByKeyGroup_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', 'listDistributionsByKeyGroup_maxItems' - The maximum number of distribution IDs that you want in the response.
--
-- 'keyGroupId', 'listDistributionsByKeyGroup_keyGroupId' - The ID of the key group whose associated distribution IDs you are
-- listing.
newListDistributionsByKeyGroup ::
  -- | 'keyGroupId'
  Prelude.Text ->
  ListDistributionsByKeyGroup
newListDistributionsByKeyGroup :: Text -> ListDistributionsByKeyGroup
newListDistributionsByKeyGroup Text
pKeyGroupId_ =
  ListDistributionsByKeyGroup' :: Maybe Text -> Maybe Text -> Text -> ListDistributionsByKeyGroup
ListDistributionsByKeyGroup'
    { $sel:marker:ListDistributionsByKeyGroup' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListDistributionsByKeyGroup' :: Maybe Text
maxItems = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:keyGroupId:ListDistributionsByKeyGroup' :: Text
keyGroupId = Text
pKeyGroupId_
    }

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

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

-- | The ID of the key group whose associated distribution IDs you are
-- listing.
listDistributionsByKeyGroup_keyGroupId :: Lens.Lens' ListDistributionsByKeyGroup Prelude.Text
listDistributionsByKeyGroup_keyGroupId :: (Text -> f Text)
-> ListDistributionsByKeyGroup -> f ListDistributionsByKeyGroup
listDistributionsByKeyGroup_keyGroupId = (ListDistributionsByKeyGroup -> Text)
-> (ListDistributionsByKeyGroup
    -> Text -> ListDistributionsByKeyGroup)
-> Lens
     ListDistributionsByKeyGroup ListDistributionsByKeyGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDistributionsByKeyGroup' {Text
keyGroupId :: Text
$sel:keyGroupId:ListDistributionsByKeyGroup' :: ListDistributionsByKeyGroup -> Text
keyGroupId} -> Text
keyGroupId) (\s :: ListDistributionsByKeyGroup
s@ListDistributionsByKeyGroup' {} Text
a -> ListDistributionsByKeyGroup
s {$sel:keyGroupId:ListDistributionsByKeyGroup' :: Text
keyGroupId = Text
a} :: ListDistributionsByKeyGroup)

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

instance Prelude.NFData ListDistributionsByKeyGroup

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

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

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

-- |
-- Create a value of 'ListDistributionsByKeyGroupResponse' 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', 'listDistributionsByKeyGroupResponse_distributionIdList' - Undocumented member.
--
-- 'httpStatus', 'listDistributionsByKeyGroupResponse_httpStatus' - The response's http status code.
newListDistributionsByKeyGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDistributionsByKeyGroupResponse
newListDistributionsByKeyGroupResponse :: Int -> ListDistributionsByKeyGroupResponse
newListDistributionsByKeyGroupResponse Int
pHttpStatus_ =
  ListDistributionsByKeyGroupResponse' :: Maybe DistributionIdList
-> Int -> ListDistributionsByKeyGroupResponse
ListDistributionsByKeyGroupResponse'
    { $sel:distributionIdList:ListDistributionsByKeyGroupResponse' :: Maybe DistributionIdList
distributionIdList =
        Maybe DistributionIdList
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDistributionsByKeyGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
listDistributionsByKeyGroupResponse_distributionIdList :: Lens.Lens' ListDistributionsByKeyGroupResponse (Prelude.Maybe DistributionIdList)
listDistributionsByKeyGroupResponse_distributionIdList :: (Maybe DistributionIdList -> f (Maybe DistributionIdList))
-> ListDistributionsByKeyGroupResponse
-> f ListDistributionsByKeyGroupResponse
listDistributionsByKeyGroupResponse_distributionIdList = (ListDistributionsByKeyGroupResponse -> Maybe DistributionIdList)
-> (ListDistributionsByKeyGroupResponse
    -> Maybe DistributionIdList -> ListDistributionsByKeyGroupResponse)
-> Lens
     ListDistributionsByKeyGroupResponse
     ListDistributionsByKeyGroupResponse
     (Maybe DistributionIdList)
     (Maybe DistributionIdList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDistributionsByKeyGroupResponse' {Maybe DistributionIdList
distributionIdList :: Maybe DistributionIdList
$sel:distributionIdList:ListDistributionsByKeyGroupResponse' :: ListDistributionsByKeyGroupResponse -> Maybe DistributionIdList
distributionIdList} -> Maybe DistributionIdList
distributionIdList) (\s :: ListDistributionsByKeyGroupResponse
s@ListDistributionsByKeyGroupResponse' {} Maybe DistributionIdList
a -> ListDistributionsByKeyGroupResponse
s {$sel:distributionIdList:ListDistributionsByKeyGroupResponse' :: Maybe DistributionIdList
distributionIdList = Maybe DistributionIdList
a} :: ListDistributionsByKeyGroupResponse)

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

instance
  Prelude.NFData
    ListDistributionsByKeyGroupResponse