{-# 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.ListInvalidations
-- 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)
--
-- Lists invalidation batches.
--
-- This operation returns paginated results.
module Amazonka.CloudFront.ListInvalidations
  ( -- * Creating a Request
    ListInvalidations (..),
    newListInvalidations,

    -- * Request Lenses
    listInvalidations_marker,
    listInvalidations_maxItems,
    listInvalidations_distributionId,

    -- * Destructuring the Response
    ListInvalidationsResponse (..),
    newListInvalidationsResponse,

    -- * Response Lenses
    listInvalidationsResponse_httpStatus,
    listInvalidationsResponse_invalidationList,
  )
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 invalidations.
--
-- /See:/ 'newListInvalidations' smart constructor.
data ListInvalidations = ListInvalidations'
  { -- | Use this parameter when paginating results to indicate where to begin in
    -- your list of invalidation batches. Because the results are returned in
    -- decreasing order from most recent to oldest, the most recent results are
    -- on the first page, the second page will contain earlier results, and so
    -- on. To get the next page of results, set @Marker@ to the value of the
    -- @NextMarker@ from the current page\'s response. This value is the same
    -- as the ID of the last invalidation batch on that page.
    ListInvalidations -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of invalidation batches that you want in the response
    -- body.
    ListInvalidations -> Maybe Text
maxItems :: Prelude.Maybe Prelude.Text,
    -- | The distribution\'s ID.
    ListInvalidations -> Text
distributionId :: Prelude.Text
  }
  deriving (ListInvalidations -> ListInvalidations -> Bool
(ListInvalidations -> ListInvalidations -> Bool)
-> (ListInvalidations -> ListInvalidations -> Bool)
-> Eq ListInvalidations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListInvalidations -> ListInvalidations -> Bool
$c/= :: ListInvalidations -> ListInvalidations -> Bool
== :: ListInvalidations -> ListInvalidations -> Bool
$c== :: ListInvalidations -> ListInvalidations -> Bool
Prelude.Eq, ReadPrec [ListInvalidations]
ReadPrec ListInvalidations
Int -> ReadS ListInvalidations
ReadS [ListInvalidations]
(Int -> ReadS ListInvalidations)
-> ReadS [ListInvalidations]
-> ReadPrec ListInvalidations
-> ReadPrec [ListInvalidations]
-> Read ListInvalidations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListInvalidations]
$creadListPrec :: ReadPrec [ListInvalidations]
readPrec :: ReadPrec ListInvalidations
$creadPrec :: ReadPrec ListInvalidations
readList :: ReadS [ListInvalidations]
$creadList :: ReadS [ListInvalidations]
readsPrec :: Int -> ReadS ListInvalidations
$creadsPrec :: Int -> ReadS ListInvalidations
Prelude.Read, Int -> ListInvalidations -> ShowS
[ListInvalidations] -> ShowS
ListInvalidations -> String
(Int -> ListInvalidations -> ShowS)
-> (ListInvalidations -> String)
-> ([ListInvalidations] -> ShowS)
-> Show ListInvalidations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListInvalidations] -> ShowS
$cshowList :: [ListInvalidations] -> ShowS
show :: ListInvalidations -> String
$cshow :: ListInvalidations -> String
showsPrec :: Int -> ListInvalidations -> ShowS
$cshowsPrec :: Int -> ListInvalidations -> ShowS
Prelude.Show, (forall x. ListInvalidations -> Rep ListInvalidations x)
-> (forall x. Rep ListInvalidations x -> ListInvalidations)
-> Generic ListInvalidations
forall x. Rep ListInvalidations x -> ListInvalidations
forall x. ListInvalidations -> Rep ListInvalidations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListInvalidations x -> ListInvalidations
$cfrom :: forall x. ListInvalidations -> Rep ListInvalidations x
Prelude.Generic)

-- |
-- Create a value of 'ListInvalidations' 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', 'listInvalidations_marker' - Use this parameter when paginating results to indicate where to begin in
-- your list of invalidation batches. Because the results are returned in
-- decreasing order from most recent to oldest, the most recent results are
-- on the first page, the second page will contain earlier results, and so
-- on. To get the next page of results, set @Marker@ to the value of the
-- @NextMarker@ from the current page\'s response. This value is the same
-- as the ID of the last invalidation batch on that page.
--
-- 'maxItems', 'listInvalidations_maxItems' - The maximum number of invalidation batches that you want in the response
-- body.
--
-- 'distributionId', 'listInvalidations_distributionId' - The distribution\'s ID.
newListInvalidations ::
  -- | 'distributionId'
  Prelude.Text ->
  ListInvalidations
newListInvalidations :: Text -> ListInvalidations
newListInvalidations Text
pDistributionId_ =
  ListInvalidations' :: Maybe Text -> Maybe Text -> Text -> ListInvalidations
ListInvalidations'
    { $sel:marker:ListInvalidations' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListInvalidations' :: Maybe Text
maxItems = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:distributionId:ListInvalidations' :: Text
distributionId = Text
pDistributionId_
    }

-- | Use this parameter when paginating results to indicate where to begin in
-- your list of invalidation batches. Because the results are returned in
-- decreasing order from most recent to oldest, the most recent results are
-- on the first page, the second page will contain earlier results, and so
-- on. To get the next page of results, set @Marker@ to the value of the
-- @NextMarker@ from the current page\'s response. This value is the same
-- as the ID of the last invalidation batch on that page.
listInvalidations_marker :: Lens.Lens' ListInvalidations (Prelude.Maybe Prelude.Text)
listInvalidations_marker :: (Maybe Text -> f (Maybe Text))
-> ListInvalidations -> f ListInvalidations
listInvalidations_marker = (ListInvalidations -> Maybe Text)
-> (ListInvalidations -> Maybe Text -> ListInvalidations)
-> Lens
     ListInvalidations ListInvalidations (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInvalidations' {Maybe Text
marker :: Maybe Text
$sel:marker:ListInvalidations' :: ListInvalidations -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListInvalidations
s@ListInvalidations' {} Maybe Text
a -> ListInvalidations
s {$sel:marker:ListInvalidations' :: Maybe Text
marker = Maybe Text
a} :: ListInvalidations)

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

-- | The distribution\'s ID.
listInvalidations_distributionId :: Lens.Lens' ListInvalidations Prelude.Text
listInvalidations_distributionId :: (Text -> f Text) -> ListInvalidations -> f ListInvalidations
listInvalidations_distributionId = (ListInvalidations -> Text)
-> (ListInvalidations -> Text -> ListInvalidations)
-> Lens ListInvalidations ListInvalidations Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInvalidations' {Text
distributionId :: Text
$sel:distributionId:ListInvalidations' :: ListInvalidations -> Text
distributionId} -> Text
distributionId) (\s :: ListInvalidations
s@ListInvalidations' {} Text
a -> ListInvalidations
s {$sel:distributionId:ListInvalidations' :: Text
distributionId = Text
a} :: ListInvalidations)

instance Core.AWSPager ListInvalidations where
  page :: ListInvalidations
-> AWSResponse ListInvalidations -> Maybe ListInvalidations
page ListInvalidations
rq AWSResponse ListInvalidations
rs
    | Bool -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListInvalidations
ListInvalidationsResponse
rs
            ListInvalidationsResponse
-> Getting Bool ListInvalidationsResponse Bool -> Bool
forall s a. s -> Getting a s a -> a
Lens.^. (InvalidationList -> Const Bool InvalidationList)
-> ListInvalidationsResponse
-> Const Bool ListInvalidationsResponse
Lens' ListInvalidationsResponse InvalidationList
listInvalidationsResponse_invalidationList
              ((InvalidationList -> Const Bool InvalidationList)
 -> ListInvalidationsResponse
 -> Const Bool ListInvalidationsResponse)
-> ((Bool -> Const Bool Bool)
    -> InvalidationList -> Const Bool InvalidationList)
-> Getting Bool ListInvalidationsResponse Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Bool -> Const Bool Bool)
-> InvalidationList -> Const Bool InvalidationList
Lens' InvalidationList Bool
invalidationList_isTruncated
        ) =
      Maybe ListInvalidations
forall a. Maybe a
Prelude.Nothing
    | Maybe Text -> Bool
forall a. Maybe a -> Bool
Prelude.isNothing
        ( AWSResponse ListInvalidations
ListInvalidationsResponse
rs
            ListInvalidationsResponse
-> Getting (First Text) ListInvalidationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (InvalidationList -> Const (First Text) InvalidationList)
-> ListInvalidationsResponse
-> Const (First Text) ListInvalidationsResponse
Lens' ListInvalidationsResponse InvalidationList
listInvalidationsResponse_invalidationList
              ((InvalidationList -> Const (First Text) InvalidationList)
 -> ListInvalidationsResponse
 -> Const (First Text) ListInvalidationsResponse)
-> ((Text -> Const (First Text) Text)
    -> InvalidationList -> Const (First Text) InvalidationList)
-> Getting (First Text) ListInvalidationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> Const (First Text) (Maybe Text))
-> InvalidationList -> Const (First Text) InvalidationList
Lens' InvalidationList (Maybe Text)
invalidationList_nextMarker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> InvalidationList -> Const (First Text) InvalidationList)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> (Text -> Const (First Text) Text)
-> InvalidationList
-> Const (First Text) InvalidationList
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListInvalidations
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListInvalidations -> Maybe ListInvalidations
forall a. a -> Maybe a
Prelude.Just (ListInvalidations -> Maybe ListInvalidations)
-> ListInvalidations -> Maybe ListInvalidations
forall a b. (a -> b) -> a -> b
Prelude.$
        ListInvalidations
rq
          ListInvalidations
-> (ListInvalidations -> ListInvalidations) -> ListInvalidations
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListInvalidations -> Identity ListInvalidations
Lens ListInvalidations ListInvalidations (Maybe Text) (Maybe Text)
listInvalidations_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> ListInvalidations -> Identity ListInvalidations)
-> Maybe Text -> ListInvalidations -> ListInvalidations
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListInvalidations
ListInvalidationsResponse
rs
          ListInvalidationsResponse
-> Getting (First Text) ListInvalidationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (InvalidationList -> Const (First Text) InvalidationList)
-> ListInvalidationsResponse
-> Const (First Text) ListInvalidationsResponse
Lens' ListInvalidationsResponse InvalidationList
listInvalidationsResponse_invalidationList
            ((InvalidationList -> Const (First Text) InvalidationList)
 -> ListInvalidationsResponse
 -> Const (First Text) ListInvalidationsResponse)
-> ((Text -> Const (First Text) Text)
    -> InvalidationList -> Const (First Text) InvalidationList)
-> Getting (First Text) ListInvalidationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> Const (First Text) (Maybe Text))
-> InvalidationList -> Const (First Text) InvalidationList
Lens' InvalidationList (Maybe Text)
invalidationList_nextMarker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> InvalidationList -> Const (First Text) InvalidationList)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> (Text -> Const (First Text) Text)
-> InvalidationList
-> Const (First Text) InvalidationList
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.Hashable ListInvalidations

instance Prelude.NFData ListInvalidations

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

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

instance Core.ToQuery ListInvalidations where
  toQuery :: ListInvalidations -> QueryString
toQuery ListInvalidations' {Maybe Text
Text
distributionId :: Text
maxItems :: Maybe Text
marker :: Maybe Text
$sel:distributionId:ListInvalidations' :: ListInvalidations -> Text
$sel:maxItems:ListInvalidations' :: ListInvalidations -> Maybe Text
$sel:marker:ListInvalidations' :: ListInvalidations -> 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 returned result of the corresponding request.
--
-- /See:/ 'newListInvalidationsResponse' smart constructor.
data ListInvalidationsResponse = ListInvalidationsResponse'
  { -- | The response's http status code.
    ListInvalidationsResponse -> Int
httpStatus :: Prelude.Int,
    -- | Information about invalidation batches.
    ListInvalidationsResponse -> InvalidationList
invalidationList :: InvalidationList
  }
  deriving (ListInvalidationsResponse -> ListInvalidationsResponse -> Bool
(ListInvalidationsResponse -> ListInvalidationsResponse -> Bool)
-> (ListInvalidationsResponse -> ListInvalidationsResponse -> Bool)
-> Eq ListInvalidationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListInvalidationsResponse -> ListInvalidationsResponse -> Bool
$c/= :: ListInvalidationsResponse -> ListInvalidationsResponse -> Bool
== :: ListInvalidationsResponse -> ListInvalidationsResponse -> Bool
$c== :: ListInvalidationsResponse -> ListInvalidationsResponse -> Bool
Prelude.Eq, ReadPrec [ListInvalidationsResponse]
ReadPrec ListInvalidationsResponse
Int -> ReadS ListInvalidationsResponse
ReadS [ListInvalidationsResponse]
(Int -> ReadS ListInvalidationsResponse)
-> ReadS [ListInvalidationsResponse]
-> ReadPrec ListInvalidationsResponse
-> ReadPrec [ListInvalidationsResponse]
-> Read ListInvalidationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListInvalidationsResponse]
$creadListPrec :: ReadPrec [ListInvalidationsResponse]
readPrec :: ReadPrec ListInvalidationsResponse
$creadPrec :: ReadPrec ListInvalidationsResponse
readList :: ReadS [ListInvalidationsResponse]
$creadList :: ReadS [ListInvalidationsResponse]
readsPrec :: Int -> ReadS ListInvalidationsResponse
$creadsPrec :: Int -> ReadS ListInvalidationsResponse
Prelude.Read, Int -> ListInvalidationsResponse -> ShowS
[ListInvalidationsResponse] -> ShowS
ListInvalidationsResponse -> String
(Int -> ListInvalidationsResponse -> ShowS)
-> (ListInvalidationsResponse -> String)
-> ([ListInvalidationsResponse] -> ShowS)
-> Show ListInvalidationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListInvalidationsResponse] -> ShowS
$cshowList :: [ListInvalidationsResponse] -> ShowS
show :: ListInvalidationsResponse -> String
$cshow :: ListInvalidationsResponse -> String
showsPrec :: Int -> ListInvalidationsResponse -> ShowS
$cshowsPrec :: Int -> ListInvalidationsResponse -> ShowS
Prelude.Show, (forall x.
 ListInvalidationsResponse -> Rep ListInvalidationsResponse x)
-> (forall x.
    Rep ListInvalidationsResponse x -> ListInvalidationsResponse)
-> Generic ListInvalidationsResponse
forall x.
Rep ListInvalidationsResponse x -> ListInvalidationsResponse
forall x.
ListInvalidationsResponse -> Rep ListInvalidationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListInvalidationsResponse x -> ListInvalidationsResponse
$cfrom :: forall x.
ListInvalidationsResponse -> Rep ListInvalidationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListInvalidationsResponse' 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:
--
-- 'httpStatus', 'listInvalidationsResponse_httpStatus' - The response's http status code.
--
-- 'invalidationList', 'listInvalidationsResponse_invalidationList' - Information about invalidation batches.
newListInvalidationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'invalidationList'
  InvalidationList ->
  ListInvalidationsResponse
newListInvalidationsResponse :: Int -> InvalidationList -> ListInvalidationsResponse
newListInvalidationsResponse
  Int
pHttpStatus_
  InvalidationList
pInvalidationList_ =
    ListInvalidationsResponse' :: Int -> InvalidationList -> ListInvalidationsResponse
ListInvalidationsResponse'
      { $sel:httpStatus:ListInvalidationsResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:invalidationList:ListInvalidationsResponse' :: InvalidationList
invalidationList = InvalidationList
pInvalidationList_
      }

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

-- | Information about invalidation batches.
listInvalidationsResponse_invalidationList :: Lens.Lens' ListInvalidationsResponse InvalidationList
listInvalidationsResponse_invalidationList :: (InvalidationList -> f InvalidationList)
-> ListInvalidationsResponse -> f ListInvalidationsResponse
listInvalidationsResponse_invalidationList = (ListInvalidationsResponse -> InvalidationList)
-> (ListInvalidationsResponse
    -> InvalidationList -> ListInvalidationsResponse)
-> Lens' ListInvalidationsResponse InvalidationList
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInvalidationsResponse' {InvalidationList
invalidationList :: InvalidationList
$sel:invalidationList:ListInvalidationsResponse' :: ListInvalidationsResponse -> InvalidationList
invalidationList} -> InvalidationList
invalidationList) (\s :: ListInvalidationsResponse
s@ListInvalidationsResponse' {} InvalidationList
a -> ListInvalidationsResponse
s {$sel:invalidationList:ListInvalidationsResponse' :: InvalidationList
invalidationList = InvalidationList
a} :: ListInvalidationsResponse)

instance Prelude.NFData ListInvalidationsResponse