{-# 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.CloudWatchEvents.ListReplays
-- 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 your replays. You can either list all the replays or you can
-- provide a prefix to match to the replay names. Filter parameters are
-- exclusive.
module Amazonka.CloudWatchEvents.ListReplays
  ( -- * Creating a Request
    ListReplays (..),
    newListReplays,

    -- * Request Lenses
    listReplays_eventSourceArn,
    listReplays_state,
    listReplays_nextToken,
    listReplays_namePrefix,
    listReplays_limit,

    -- * Destructuring the Response
    ListReplaysResponse (..),
    newListReplaysResponse,

    -- * Response Lenses
    listReplaysResponse_replays,
    listReplaysResponse_nextToken,
    listReplaysResponse_httpStatus,
  )
where

import Amazonka.CloudWatchEvents.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:/ 'newListReplays' smart constructor.
data ListReplays = ListReplays'
  { -- | The ARN of the archive from which the events are replayed.
    ListReplays -> Maybe Text
eventSourceArn :: Prelude.Maybe Prelude.Text,
    -- | The state of the replay.
    ListReplays -> Maybe ReplayState
state :: Prelude.Maybe ReplayState,
    -- | The token returned by a previous call to retrieve the next set of
    -- results.
    ListReplays -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A name prefix to filter the replays returned. Only replays with name
    -- that match the prefix are returned.
    ListReplays -> Maybe Text
namePrefix :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of replays to retrieve.
    ListReplays -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListReplays -> ListReplays -> Bool
(ListReplays -> ListReplays -> Bool)
-> (ListReplays -> ListReplays -> Bool) -> Eq ListReplays
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReplays -> ListReplays -> Bool
$c/= :: ListReplays -> ListReplays -> Bool
== :: ListReplays -> ListReplays -> Bool
$c== :: ListReplays -> ListReplays -> Bool
Prelude.Eq, ReadPrec [ListReplays]
ReadPrec ListReplays
Int -> ReadS ListReplays
ReadS [ListReplays]
(Int -> ReadS ListReplays)
-> ReadS [ListReplays]
-> ReadPrec ListReplays
-> ReadPrec [ListReplays]
-> Read ListReplays
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReplays]
$creadListPrec :: ReadPrec [ListReplays]
readPrec :: ReadPrec ListReplays
$creadPrec :: ReadPrec ListReplays
readList :: ReadS [ListReplays]
$creadList :: ReadS [ListReplays]
readsPrec :: Int -> ReadS ListReplays
$creadsPrec :: Int -> ReadS ListReplays
Prelude.Read, Int -> ListReplays -> ShowS
[ListReplays] -> ShowS
ListReplays -> String
(Int -> ListReplays -> ShowS)
-> (ListReplays -> String)
-> ([ListReplays] -> ShowS)
-> Show ListReplays
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReplays] -> ShowS
$cshowList :: [ListReplays] -> ShowS
show :: ListReplays -> String
$cshow :: ListReplays -> String
showsPrec :: Int -> ListReplays -> ShowS
$cshowsPrec :: Int -> ListReplays -> ShowS
Prelude.Show, (forall x. ListReplays -> Rep ListReplays x)
-> (forall x. Rep ListReplays x -> ListReplays)
-> Generic ListReplays
forall x. Rep ListReplays x -> ListReplays
forall x. ListReplays -> Rep ListReplays x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListReplays x -> ListReplays
$cfrom :: forall x. ListReplays -> Rep ListReplays x
Prelude.Generic)

-- |
-- Create a value of 'ListReplays' 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:
--
-- 'eventSourceArn', 'listReplays_eventSourceArn' - The ARN of the archive from which the events are replayed.
--
-- 'state', 'listReplays_state' - The state of the replay.
--
-- 'nextToken', 'listReplays_nextToken' - The token returned by a previous call to retrieve the next set of
-- results.
--
-- 'namePrefix', 'listReplays_namePrefix' - A name prefix to filter the replays returned. Only replays with name
-- that match the prefix are returned.
--
-- 'limit', 'listReplays_limit' - The maximum number of replays to retrieve.
newListReplays ::
  ListReplays
newListReplays :: ListReplays
newListReplays =
  ListReplays' :: Maybe Text
-> Maybe ReplayState
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> ListReplays
ListReplays'
    { $sel:eventSourceArn:ListReplays' :: Maybe Text
eventSourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:state:ListReplays' :: Maybe ReplayState
state = Maybe ReplayState
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListReplays' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:namePrefix:ListReplays' :: Maybe Text
namePrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:ListReplays' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the archive from which the events are replayed.
listReplays_eventSourceArn :: Lens.Lens' ListReplays (Prelude.Maybe Prelude.Text)
listReplays_eventSourceArn :: (Maybe Text -> f (Maybe Text)) -> ListReplays -> f ListReplays
listReplays_eventSourceArn = (ListReplays -> Maybe Text)
-> (ListReplays -> Maybe Text -> ListReplays)
-> Lens ListReplays ListReplays (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReplays' {Maybe Text
eventSourceArn :: Maybe Text
$sel:eventSourceArn:ListReplays' :: ListReplays -> Maybe Text
eventSourceArn} -> Maybe Text
eventSourceArn) (\s :: ListReplays
s@ListReplays' {} Maybe Text
a -> ListReplays
s {$sel:eventSourceArn:ListReplays' :: Maybe Text
eventSourceArn = Maybe Text
a} :: ListReplays)

-- | The state of the replay.
listReplays_state :: Lens.Lens' ListReplays (Prelude.Maybe ReplayState)
listReplays_state :: (Maybe ReplayState -> f (Maybe ReplayState))
-> ListReplays -> f ListReplays
listReplays_state = (ListReplays -> Maybe ReplayState)
-> (ListReplays -> Maybe ReplayState -> ListReplays)
-> Lens
     ListReplays ListReplays (Maybe ReplayState) (Maybe ReplayState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReplays' {Maybe ReplayState
state :: Maybe ReplayState
$sel:state:ListReplays' :: ListReplays -> Maybe ReplayState
state} -> Maybe ReplayState
state) (\s :: ListReplays
s@ListReplays' {} Maybe ReplayState
a -> ListReplays
s {$sel:state:ListReplays' :: Maybe ReplayState
state = Maybe ReplayState
a} :: ListReplays)

-- | The token returned by a previous call to retrieve the next set of
-- results.
listReplays_nextToken :: Lens.Lens' ListReplays (Prelude.Maybe Prelude.Text)
listReplays_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListReplays -> f ListReplays
listReplays_nextToken = (ListReplays -> Maybe Text)
-> (ListReplays -> Maybe Text -> ListReplays)
-> Lens ListReplays ListReplays (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReplays' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListReplays' :: ListReplays -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListReplays
s@ListReplays' {} Maybe Text
a -> ListReplays
s {$sel:nextToken:ListReplays' :: Maybe Text
nextToken = Maybe Text
a} :: ListReplays)

-- | A name prefix to filter the replays returned. Only replays with name
-- that match the prefix are returned.
listReplays_namePrefix :: Lens.Lens' ListReplays (Prelude.Maybe Prelude.Text)
listReplays_namePrefix :: (Maybe Text -> f (Maybe Text)) -> ListReplays -> f ListReplays
listReplays_namePrefix = (ListReplays -> Maybe Text)
-> (ListReplays -> Maybe Text -> ListReplays)
-> Lens ListReplays ListReplays (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReplays' {Maybe Text
namePrefix :: Maybe Text
$sel:namePrefix:ListReplays' :: ListReplays -> Maybe Text
namePrefix} -> Maybe Text
namePrefix) (\s :: ListReplays
s@ListReplays' {} Maybe Text
a -> ListReplays
s {$sel:namePrefix:ListReplays' :: Maybe Text
namePrefix = Maybe Text
a} :: ListReplays)

-- | The maximum number of replays to retrieve.
listReplays_limit :: Lens.Lens' ListReplays (Prelude.Maybe Prelude.Natural)
listReplays_limit :: (Maybe Natural -> f (Maybe Natural))
-> ListReplays -> f ListReplays
listReplays_limit = (ListReplays -> Maybe Natural)
-> (ListReplays -> Maybe Natural -> ListReplays)
-> Lens ListReplays ListReplays (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReplays' {Maybe Natural
limit :: Maybe Natural
$sel:limit:ListReplays' :: ListReplays -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: ListReplays
s@ListReplays' {} Maybe Natural
a -> ListReplays
s {$sel:limit:ListReplays' :: Maybe Natural
limit = Maybe Natural
a} :: ListReplays)

instance Core.AWSRequest ListReplays where
  type AWSResponse ListReplays = ListReplaysResponse
  request :: ListReplays -> Request ListReplays
request = Service -> ListReplays -> Request ListReplays
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListReplays
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListReplays)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListReplays))
-> Logger
-> Service
-> Proxy ListReplays
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListReplays)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [Replay] -> Maybe Text -> Int -> ListReplaysResponse
ListReplaysResponse'
            (Maybe [Replay] -> Maybe Text -> Int -> ListReplaysResponse)
-> Either String (Maybe [Replay])
-> Either String (Maybe Text -> Int -> ListReplaysResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Replay]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Replays" Either String (Maybe (Maybe [Replay]))
-> Maybe [Replay] -> Either String (Maybe [Replay])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Replay]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> ListReplaysResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListReplaysResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either String (Int -> ListReplaysResponse)
-> Either String Int -> Either String ListReplaysResponse
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 ListReplays

instance Prelude.NFData ListReplays

instance Core.ToHeaders ListReplays where
  toHeaders :: ListReplays -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListReplays -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"AWSEvents.ListReplays" :: Prelude.ByteString),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON ListReplays where
  toJSON :: ListReplays -> Value
toJSON ListReplays' {Maybe Natural
Maybe Text
Maybe ReplayState
limit :: Maybe Natural
namePrefix :: Maybe Text
nextToken :: Maybe Text
state :: Maybe ReplayState
eventSourceArn :: Maybe Text
$sel:limit:ListReplays' :: ListReplays -> Maybe Natural
$sel:namePrefix:ListReplays' :: ListReplays -> Maybe Text
$sel:nextToken:ListReplays' :: ListReplays -> Maybe Text
$sel:state:ListReplays' :: ListReplays -> Maybe ReplayState
$sel:eventSourceArn:ListReplays' :: ListReplays -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"EventSourceArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
eventSourceArn,
            (Text
"State" Text -> ReplayState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ReplayState -> Pair) -> Maybe ReplayState -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReplayState
state,
            (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"NamePrefix" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
namePrefix,
            (Text
"Limit" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit
          ]
      )

instance Core.ToPath ListReplays where
  toPath :: ListReplays -> ByteString
toPath = ByteString -> ListReplays -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery ListReplays where
  toQuery :: ListReplays -> QueryString
toQuery = QueryString -> ListReplays -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newListReplaysResponse' smart constructor.
data ListReplaysResponse = ListReplaysResponse'
  { -- | An array of @Replay@ objects that contain information about the replay.
    ListReplaysResponse -> Maybe [Replay]
replays :: Prelude.Maybe [Replay],
    -- | The token returned by a previous call to retrieve the next set of
    -- results.
    ListReplaysResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListReplaysResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListReplaysResponse -> ListReplaysResponse -> Bool
(ListReplaysResponse -> ListReplaysResponse -> Bool)
-> (ListReplaysResponse -> ListReplaysResponse -> Bool)
-> Eq ListReplaysResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReplaysResponse -> ListReplaysResponse -> Bool
$c/= :: ListReplaysResponse -> ListReplaysResponse -> Bool
== :: ListReplaysResponse -> ListReplaysResponse -> Bool
$c== :: ListReplaysResponse -> ListReplaysResponse -> Bool
Prelude.Eq, ReadPrec [ListReplaysResponse]
ReadPrec ListReplaysResponse
Int -> ReadS ListReplaysResponse
ReadS [ListReplaysResponse]
(Int -> ReadS ListReplaysResponse)
-> ReadS [ListReplaysResponse]
-> ReadPrec ListReplaysResponse
-> ReadPrec [ListReplaysResponse]
-> Read ListReplaysResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReplaysResponse]
$creadListPrec :: ReadPrec [ListReplaysResponse]
readPrec :: ReadPrec ListReplaysResponse
$creadPrec :: ReadPrec ListReplaysResponse
readList :: ReadS [ListReplaysResponse]
$creadList :: ReadS [ListReplaysResponse]
readsPrec :: Int -> ReadS ListReplaysResponse
$creadsPrec :: Int -> ReadS ListReplaysResponse
Prelude.Read, Int -> ListReplaysResponse -> ShowS
[ListReplaysResponse] -> ShowS
ListReplaysResponse -> String
(Int -> ListReplaysResponse -> ShowS)
-> (ListReplaysResponse -> String)
-> ([ListReplaysResponse] -> ShowS)
-> Show ListReplaysResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReplaysResponse] -> ShowS
$cshowList :: [ListReplaysResponse] -> ShowS
show :: ListReplaysResponse -> String
$cshow :: ListReplaysResponse -> String
showsPrec :: Int -> ListReplaysResponse -> ShowS
$cshowsPrec :: Int -> ListReplaysResponse -> ShowS
Prelude.Show, (forall x. ListReplaysResponse -> Rep ListReplaysResponse x)
-> (forall x. Rep ListReplaysResponse x -> ListReplaysResponse)
-> Generic ListReplaysResponse
forall x. Rep ListReplaysResponse x -> ListReplaysResponse
forall x. ListReplaysResponse -> Rep ListReplaysResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListReplaysResponse x -> ListReplaysResponse
$cfrom :: forall x. ListReplaysResponse -> Rep ListReplaysResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListReplaysResponse' 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:
--
-- 'replays', 'listReplaysResponse_replays' - An array of @Replay@ objects that contain information about the replay.
--
-- 'nextToken', 'listReplaysResponse_nextToken' - The token returned by a previous call to retrieve the next set of
-- results.
--
-- 'httpStatus', 'listReplaysResponse_httpStatus' - The response's http status code.
newListReplaysResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListReplaysResponse
newListReplaysResponse :: Int -> ListReplaysResponse
newListReplaysResponse Int
pHttpStatus_ =
  ListReplaysResponse' :: Maybe [Replay] -> Maybe Text -> Int -> ListReplaysResponse
ListReplaysResponse'
    { $sel:replays:ListReplaysResponse' :: Maybe [Replay]
replays = Maybe [Replay]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListReplaysResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListReplaysResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of @Replay@ objects that contain information about the replay.
listReplaysResponse_replays :: Lens.Lens' ListReplaysResponse (Prelude.Maybe [Replay])
listReplaysResponse_replays :: (Maybe [Replay] -> f (Maybe [Replay]))
-> ListReplaysResponse -> f ListReplaysResponse
listReplaysResponse_replays = (ListReplaysResponse -> Maybe [Replay])
-> (ListReplaysResponse -> Maybe [Replay] -> ListReplaysResponse)
-> Lens
     ListReplaysResponse
     ListReplaysResponse
     (Maybe [Replay])
     (Maybe [Replay])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReplaysResponse' {Maybe [Replay]
replays :: Maybe [Replay]
$sel:replays:ListReplaysResponse' :: ListReplaysResponse -> Maybe [Replay]
replays} -> Maybe [Replay]
replays) (\s :: ListReplaysResponse
s@ListReplaysResponse' {} Maybe [Replay]
a -> ListReplaysResponse
s {$sel:replays:ListReplaysResponse' :: Maybe [Replay]
replays = Maybe [Replay]
a} :: ListReplaysResponse) ((Maybe [Replay] -> f (Maybe [Replay]))
 -> ListReplaysResponse -> f ListReplaysResponse)
-> ((Maybe [Replay] -> f (Maybe [Replay]))
    -> Maybe [Replay] -> f (Maybe [Replay]))
-> (Maybe [Replay] -> f (Maybe [Replay]))
-> ListReplaysResponse
-> f ListReplaysResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Replay] [Replay] [Replay] [Replay]
-> Iso
     (Maybe [Replay]) (Maybe [Replay]) (Maybe [Replay]) (Maybe [Replay])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Replay] [Replay] [Replay] [Replay]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token returned by a previous call to retrieve the next set of
-- results.
listReplaysResponse_nextToken :: Lens.Lens' ListReplaysResponse (Prelude.Maybe Prelude.Text)
listReplaysResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListReplaysResponse -> f ListReplaysResponse
listReplaysResponse_nextToken = (ListReplaysResponse -> Maybe Text)
-> (ListReplaysResponse -> Maybe Text -> ListReplaysResponse)
-> Lens
     ListReplaysResponse ListReplaysResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReplaysResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListReplaysResponse' :: ListReplaysResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListReplaysResponse
s@ListReplaysResponse' {} Maybe Text
a -> ListReplaysResponse
s {$sel:nextToken:ListReplaysResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListReplaysResponse)

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

instance Prelude.NFData ListReplaysResponse