{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.Replay
-- 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)
module Amazonka.CloudWatchEvents.Types.Replay where

import Amazonka.CloudWatchEvents.Types.ReplayState
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A @Replay@ object that contains details about a replay.
--
-- /See:/ 'newReplay' smart constructor.
data Replay = Replay'
  { -- | The ARN of the archive to replay event from.
    Replay -> Maybe Text
eventSourceArn :: Prelude.Maybe Prelude.Text,
    -- | The current state of the replay.
    Replay -> Maybe ReplayState
state :: Prelude.Maybe ReplayState,
    -- | A time stamp for the time to start replaying events. Any event with a
    -- creation time prior to the @EventEndTime@ specified is replayed.
    Replay -> Maybe POSIX
eventEndTime :: Prelude.Maybe Core.POSIX,
    -- | A time stamp for the time that the replay started.
    Replay -> Maybe POSIX
replayStartTime :: Prelude.Maybe Core.POSIX,
    -- | A time stamp for the time that the replay completed.
    Replay -> Maybe POSIX
replayEndTime :: Prelude.Maybe Core.POSIX,
    -- | A time stamp for the time that the last event was replayed.
    Replay -> Maybe POSIX
eventLastReplayedTime :: Prelude.Maybe Core.POSIX,
    -- | A time stamp for the time to start replaying events. This is determined
    -- by the time in the event as described in
    -- <https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html#eventbridge-Type-PutEventsRequestEntry-Time Time>.
    Replay -> Maybe POSIX
eventStartTime :: Prelude.Maybe Core.POSIX,
    -- | The name of the replay.
    Replay -> Maybe Text
replayName :: Prelude.Maybe Prelude.Text,
    -- | A description of why the replay is in the current state.
    Replay -> Maybe Text
stateReason :: Prelude.Maybe Prelude.Text
  }
  deriving (Replay -> Replay -> Bool
(Replay -> Replay -> Bool)
-> (Replay -> Replay -> Bool) -> Eq Replay
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Replay -> Replay -> Bool
$c/= :: Replay -> Replay -> Bool
== :: Replay -> Replay -> Bool
$c== :: Replay -> Replay -> Bool
Prelude.Eq, ReadPrec [Replay]
ReadPrec Replay
Int -> ReadS Replay
ReadS [Replay]
(Int -> ReadS Replay)
-> ReadS [Replay]
-> ReadPrec Replay
-> ReadPrec [Replay]
-> Read Replay
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Replay]
$creadListPrec :: ReadPrec [Replay]
readPrec :: ReadPrec Replay
$creadPrec :: ReadPrec Replay
readList :: ReadS [Replay]
$creadList :: ReadS [Replay]
readsPrec :: Int -> ReadS Replay
$creadsPrec :: Int -> ReadS Replay
Prelude.Read, Int -> Replay -> ShowS
[Replay] -> ShowS
Replay -> String
(Int -> Replay -> ShowS)
-> (Replay -> String) -> ([Replay] -> ShowS) -> Show Replay
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Replay] -> ShowS
$cshowList :: [Replay] -> ShowS
show :: Replay -> String
$cshow :: Replay -> String
showsPrec :: Int -> Replay -> ShowS
$cshowsPrec :: Int -> Replay -> ShowS
Prelude.Show, (forall x. Replay -> Rep Replay x)
-> (forall x. Rep Replay x -> Replay) -> Generic Replay
forall x. Rep Replay x -> Replay
forall x. Replay -> Rep Replay x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Replay x -> Replay
$cfrom :: forall x. Replay -> Rep Replay x
Prelude.Generic)

-- |
-- Create a value of 'Replay' 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', 'replay_eventSourceArn' - The ARN of the archive to replay event from.
--
-- 'state', 'replay_state' - The current state of the replay.
--
-- 'eventEndTime', 'replay_eventEndTime' - A time stamp for the time to start replaying events. Any event with a
-- creation time prior to the @EventEndTime@ specified is replayed.
--
-- 'replayStartTime', 'replay_replayStartTime' - A time stamp for the time that the replay started.
--
-- 'replayEndTime', 'replay_replayEndTime' - A time stamp for the time that the replay completed.
--
-- 'eventLastReplayedTime', 'replay_eventLastReplayedTime' - A time stamp for the time that the last event was replayed.
--
-- 'eventStartTime', 'replay_eventStartTime' - A time stamp for the time to start replaying events. This is determined
-- by the time in the event as described in
-- <https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html#eventbridge-Type-PutEventsRequestEntry-Time Time>.
--
-- 'replayName', 'replay_replayName' - The name of the replay.
--
-- 'stateReason', 'replay_stateReason' - A description of why the replay is in the current state.
newReplay ::
  Replay
newReplay :: Replay
newReplay =
  Replay' :: Maybe Text
-> Maybe ReplayState
-> Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Replay
Replay'
    { $sel:eventSourceArn:Replay' :: Maybe Text
eventSourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:state:Replay' :: Maybe ReplayState
state = Maybe ReplayState
forall a. Maybe a
Prelude.Nothing,
      $sel:eventEndTime:Replay' :: Maybe POSIX
eventEndTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:replayStartTime:Replay' :: Maybe POSIX
replayStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:replayEndTime:Replay' :: Maybe POSIX
replayEndTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:eventLastReplayedTime:Replay' :: Maybe POSIX
eventLastReplayedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:eventStartTime:Replay' :: Maybe POSIX
eventStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:replayName:Replay' :: Maybe Text
replayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stateReason:Replay' :: Maybe Text
stateReason = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the archive to replay event from.
replay_eventSourceArn :: Lens.Lens' Replay (Prelude.Maybe Prelude.Text)
replay_eventSourceArn :: (Maybe Text -> f (Maybe Text)) -> Replay -> f Replay
replay_eventSourceArn = (Replay -> Maybe Text)
-> (Replay -> Maybe Text -> Replay)
-> Lens Replay Replay (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Replay' {Maybe Text
eventSourceArn :: Maybe Text
$sel:eventSourceArn:Replay' :: Replay -> Maybe Text
eventSourceArn} -> Maybe Text
eventSourceArn) (\s :: Replay
s@Replay' {} Maybe Text
a -> Replay
s {$sel:eventSourceArn:Replay' :: Maybe Text
eventSourceArn = Maybe Text
a} :: Replay)

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

-- | A time stamp for the time to start replaying events. Any event with a
-- creation time prior to the @EventEndTime@ specified is replayed.
replay_eventEndTime :: Lens.Lens' Replay (Prelude.Maybe Prelude.UTCTime)
replay_eventEndTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Replay -> f Replay
replay_eventEndTime = (Replay -> Maybe POSIX)
-> (Replay -> Maybe POSIX -> Replay)
-> Lens Replay Replay (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Replay' {Maybe POSIX
eventEndTime :: Maybe POSIX
$sel:eventEndTime:Replay' :: Replay -> Maybe POSIX
eventEndTime} -> Maybe POSIX
eventEndTime) (\s :: Replay
s@Replay' {} Maybe POSIX
a -> Replay
s {$sel:eventEndTime:Replay' :: Maybe POSIX
eventEndTime = Maybe POSIX
a} :: Replay) ((Maybe POSIX -> f (Maybe POSIX)) -> Replay -> f Replay)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Replay
-> f Replay
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A time stamp for the time that the replay started.
replay_replayStartTime :: Lens.Lens' Replay (Prelude.Maybe Prelude.UTCTime)
replay_replayStartTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Replay -> f Replay
replay_replayStartTime = (Replay -> Maybe POSIX)
-> (Replay -> Maybe POSIX -> Replay)
-> Lens Replay Replay (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Replay' {Maybe POSIX
replayStartTime :: Maybe POSIX
$sel:replayStartTime:Replay' :: Replay -> Maybe POSIX
replayStartTime} -> Maybe POSIX
replayStartTime) (\s :: Replay
s@Replay' {} Maybe POSIX
a -> Replay
s {$sel:replayStartTime:Replay' :: Maybe POSIX
replayStartTime = Maybe POSIX
a} :: Replay) ((Maybe POSIX -> f (Maybe POSIX)) -> Replay -> f Replay)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Replay
-> f Replay
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A time stamp for the time that the replay completed.
replay_replayEndTime :: Lens.Lens' Replay (Prelude.Maybe Prelude.UTCTime)
replay_replayEndTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Replay -> f Replay
replay_replayEndTime = (Replay -> Maybe POSIX)
-> (Replay -> Maybe POSIX -> Replay)
-> Lens Replay Replay (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Replay' {Maybe POSIX
replayEndTime :: Maybe POSIX
$sel:replayEndTime:Replay' :: Replay -> Maybe POSIX
replayEndTime} -> Maybe POSIX
replayEndTime) (\s :: Replay
s@Replay' {} Maybe POSIX
a -> Replay
s {$sel:replayEndTime:Replay' :: Maybe POSIX
replayEndTime = Maybe POSIX
a} :: Replay) ((Maybe POSIX -> f (Maybe POSIX)) -> Replay -> f Replay)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Replay
-> f Replay
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A time stamp for the time that the last event was replayed.
replay_eventLastReplayedTime :: Lens.Lens' Replay (Prelude.Maybe Prelude.UTCTime)
replay_eventLastReplayedTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Replay -> f Replay
replay_eventLastReplayedTime = (Replay -> Maybe POSIX)
-> (Replay -> Maybe POSIX -> Replay)
-> Lens Replay Replay (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Replay' {Maybe POSIX
eventLastReplayedTime :: Maybe POSIX
$sel:eventLastReplayedTime:Replay' :: Replay -> Maybe POSIX
eventLastReplayedTime} -> Maybe POSIX
eventLastReplayedTime) (\s :: Replay
s@Replay' {} Maybe POSIX
a -> Replay
s {$sel:eventLastReplayedTime:Replay' :: Maybe POSIX
eventLastReplayedTime = Maybe POSIX
a} :: Replay) ((Maybe POSIX -> f (Maybe POSIX)) -> Replay -> f Replay)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Replay
-> f Replay
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A time stamp for the time to start replaying events. This is determined
-- by the time in the event as described in
-- <https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html#eventbridge-Type-PutEventsRequestEntry-Time Time>.
replay_eventStartTime :: Lens.Lens' Replay (Prelude.Maybe Prelude.UTCTime)
replay_eventStartTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Replay -> f Replay
replay_eventStartTime = (Replay -> Maybe POSIX)
-> (Replay -> Maybe POSIX -> Replay)
-> Lens Replay Replay (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Replay' {Maybe POSIX
eventStartTime :: Maybe POSIX
$sel:eventStartTime:Replay' :: Replay -> Maybe POSIX
eventStartTime} -> Maybe POSIX
eventStartTime) (\s :: Replay
s@Replay' {} Maybe POSIX
a -> Replay
s {$sel:eventStartTime:Replay' :: Maybe POSIX
eventStartTime = Maybe POSIX
a} :: Replay) ((Maybe POSIX -> f (Maybe POSIX)) -> Replay -> f Replay)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Replay
-> f Replay
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the replay.
replay_replayName :: Lens.Lens' Replay (Prelude.Maybe Prelude.Text)
replay_replayName :: (Maybe Text -> f (Maybe Text)) -> Replay -> f Replay
replay_replayName = (Replay -> Maybe Text)
-> (Replay -> Maybe Text -> Replay)
-> Lens Replay Replay (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Replay' {Maybe Text
replayName :: Maybe Text
$sel:replayName:Replay' :: Replay -> Maybe Text
replayName} -> Maybe Text
replayName) (\s :: Replay
s@Replay' {} Maybe Text
a -> Replay
s {$sel:replayName:Replay' :: Maybe Text
replayName = Maybe Text
a} :: Replay)

-- | A description of why the replay is in the current state.
replay_stateReason :: Lens.Lens' Replay (Prelude.Maybe Prelude.Text)
replay_stateReason :: (Maybe Text -> f (Maybe Text)) -> Replay -> f Replay
replay_stateReason = (Replay -> Maybe Text)
-> (Replay -> Maybe Text -> Replay)
-> Lens Replay Replay (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Replay' {Maybe Text
stateReason :: Maybe Text
$sel:stateReason:Replay' :: Replay -> Maybe Text
stateReason} -> Maybe Text
stateReason) (\s :: Replay
s@Replay' {} Maybe Text
a -> Replay
s {$sel:stateReason:Replay' :: Maybe Text
stateReason = Maybe Text
a} :: Replay)

instance Core.FromJSON Replay where
  parseJSON :: Value -> Parser Replay
parseJSON =
    String -> (Object -> Parser Replay) -> Value -> Parser Replay
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Replay"
      ( \Object
x ->
          Maybe Text
-> Maybe ReplayState
-> Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Replay
Replay'
            (Maybe Text
 -> Maybe ReplayState
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Replay)
-> Parser (Maybe Text)
-> Parser
     (Maybe ReplayState
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Replay)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventSourceArn")
            Parser
  (Maybe ReplayState
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Replay)
-> Parser (Maybe ReplayState)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Replay)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReplayState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Replay)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Replay)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventEndTime")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Replay)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Replay)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReplayStartTime")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Replay)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX -> Maybe POSIX -> Maybe Text -> Maybe Text -> Replay)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReplayEndTime")
            Parser
  (Maybe POSIX -> Maybe POSIX -> Maybe Text -> Maybe Text -> Replay)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> Maybe Text -> Maybe Text -> Replay)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventLastReplayedTime")
            Parser (Maybe POSIX -> Maybe Text -> Maybe Text -> Replay)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe Text -> Replay)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventStartTime")
            Parser (Maybe Text -> Maybe Text -> Replay)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Replay)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReplayName")
            Parser (Maybe Text -> Replay)
-> Parser (Maybe Text) -> Parser Replay
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StateReason")
      )

instance Prelude.Hashable Replay

instance Prelude.NFData Replay