{-# 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.MediaTailor.Types.ScheduleEntry
-- 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.MediaTailor.Types.ScheduleEntry where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaTailor.Types.ScheduleAdBreak
import Amazonka.MediaTailor.Types.ScheduleEntryType
import qualified Amazonka.Prelude as Prelude

-- | The properties for a schedule.
--
-- /See:/ 'newScheduleEntry' smart constructor.
data ScheduleEntry = ScheduleEntry'
  { -- | The schedule\'s ad break properties.
    ScheduleEntry -> Maybe [ScheduleAdBreak]
scheduleAdBreaks :: Prelude.Maybe [ScheduleAdBreak],
    -- | The approximate duration of this program, in seconds.
    ScheduleEntry -> Maybe Integer
approximateDurationSeconds :: Prelude.Maybe Prelude.Integer,
    -- | The approximate time that the program will start playing.
    ScheduleEntry -> Maybe POSIX
approximateStartTime :: Prelude.Maybe Core.POSIX,
    -- | The type of schedule entry.
    --
    -- Valid values: PROGRAM or FILLER_SLATE.
    ScheduleEntry -> Maybe ScheduleEntryType
scheduleEntryType :: Prelude.Maybe ScheduleEntryType,
    -- | The name of the VOD source.
    ScheduleEntry -> Text
vodSourceName :: Prelude.Text,
    -- | The name of the channel that uses this schedule.
    ScheduleEntry -> Text
channelName :: Prelude.Text,
    -- | The name of the source location.
    ScheduleEntry -> Text
sourceLocationName :: Prelude.Text,
    -- | The ARN of the program.
    ScheduleEntry -> Text
arn :: Prelude.Text,
    -- | The name of the program.
    ScheduleEntry -> Text
programName :: Prelude.Text
  }
  deriving (ScheduleEntry -> ScheduleEntry -> Bool
(ScheduleEntry -> ScheduleEntry -> Bool)
-> (ScheduleEntry -> ScheduleEntry -> Bool) -> Eq ScheduleEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScheduleEntry -> ScheduleEntry -> Bool
$c/= :: ScheduleEntry -> ScheduleEntry -> Bool
== :: ScheduleEntry -> ScheduleEntry -> Bool
$c== :: ScheduleEntry -> ScheduleEntry -> Bool
Prelude.Eq, ReadPrec [ScheduleEntry]
ReadPrec ScheduleEntry
Int -> ReadS ScheduleEntry
ReadS [ScheduleEntry]
(Int -> ReadS ScheduleEntry)
-> ReadS [ScheduleEntry]
-> ReadPrec ScheduleEntry
-> ReadPrec [ScheduleEntry]
-> Read ScheduleEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScheduleEntry]
$creadListPrec :: ReadPrec [ScheduleEntry]
readPrec :: ReadPrec ScheduleEntry
$creadPrec :: ReadPrec ScheduleEntry
readList :: ReadS [ScheduleEntry]
$creadList :: ReadS [ScheduleEntry]
readsPrec :: Int -> ReadS ScheduleEntry
$creadsPrec :: Int -> ReadS ScheduleEntry
Prelude.Read, Int -> ScheduleEntry -> ShowS
[ScheduleEntry] -> ShowS
ScheduleEntry -> String
(Int -> ScheduleEntry -> ShowS)
-> (ScheduleEntry -> String)
-> ([ScheduleEntry] -> ShowS)
-> Show ScheduleEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScheduleEntry] -> ShowS
$cshowList :: [ScheduleEntry] -> ShowS
show :: ScheduleEntry -> String
$cshow :: ScheduleEntry -> String
showsPrec :: Int -> ScheduleEntry -> ShowS
$cshowsPrec :: Int -> ScheduleEntry -> ShowS
Prelude.Show, (forall x. ScheduleEntry -> Rep ScheduleEntry x)
-> (forall x. Rep ScheduleEntry x -> ScheduleEntry)
-> Generic ScheduleEntry
forall x. Rep ScheduleEntry x -> ScheduleEntry
forall x. ScheduleEntry -> Rep ScheduleEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ScheduleEntry x -> ScheduleEntry
$cfrom :: forall x. ScheduleEntry -> Rep ScheduleEntry x
Prelude.Generic)

-- |
-- Create a value of 'ScheduleEntry' 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:
--
-- 'scheduleAdBreaks', 'scheduleEntry_scheduleAdBreaks' - The schedule\'s ad break properties.
--
-- 'approximateDurationSeconds', 'scheduleEntry_approximateDurationSeconds' - The approximate duration of this program, in seconds.
--
-- 'approximateStartTime', 'scheduleEntry_approximateStartTime' - The approximate time that the program will start playing.
--
-- 'scheduleEntryType', 'scheduleEntry_scheduleEntryType' - The type of schedule entry.
--
-- Valid values: PROGRAM or FILLER_SLATE.
--
-- 'vodSourceName', 'scheduleEntry_vodSourceName' - The name of the VOD source.
--
-- 'channelName', 'scheduleEntry_channelName' - The name of the channel that uses this schedule.
--
-- 'sourceLocationName', 'scheduleEntry_sourceLocationName' - The name of the source location.
--
-- 'arn', 'scheduleEntry_arn' - The ARN of the program.
--
-- 'programName', 'scheduleEntry_programName' - The name of the program.
newScheduleEntry ::
  -- | 'vodSourceName'
  Prelude.Text ->
  -- | 'channelName'
  Prelude.Text ->
  -- | 'sourceLocationName'
  Prelude.Text ->
  -- | 'arn'
  Prelude.Text ->
  -- | 'programName'
  Prelude.Text ->
  ScheduleEntry
newScheduleEntry :: Text -> Text -> Text -> Text -> Text -> ScheduleEntry
newScheduleEntry
  Text
pVodSourceName_
  Text
pChannelName_
  Text
pSourceLocationName_
  Text
pArn_
  Text
pProgramName_ =
    ScheduleEntry' :: Maybe [ScheduleAdBreak]
-> Maybe Integer
-> Maybe POSIX
-> Maybe ScheduleEntryType
-> Text
-> Text
-> Text
-> Text
-> Text
-> ScheduleEntry
ScheduleEntry'
      { $sel:scheduleAdBreaks:ScheduleEntry' :: Maybe [ScheduleAdBreak]
scheduleAdBreaks = Maybe [ScheduleAdBreak]
forall a. Maybe a
Prelude.Nothing,
        $sel:approximateDurationSeconds:ScheduleEntry' :: Maybe Integer
approximateDurationSeconds = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
        $sel:approximateStartTime:ScheduleEntry' :: Maybe POSIX
approximateStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:scheduleEntryType:ScheduleEntry' :: Maybe ScheduleEntryType
scheduleEntryType = Maybe ScheduleEntryType
forall a. Maybe a
Prelude.Nothing,
        $sel:vodSourceName:ScheduleEntry' :: Text
vodSourceName = Text
pVodSourceName_,
        $sel:channelName:ScheduleEntry' :: Text
channelName = Text
pChannelName_,
        $sel:sourceLocationName:ScheduleEntry' :: Text
sourceLocationName = Text
pSourceLocationName_,
        $sel:arn:ScheduleEntry' :: Text
arn = Text
pArn_,
        $sel:programName:ScheduleEntry' :: Text
programName = Text
pProgramName_
      }

-- | The schedule\'s ad break properties.
scheduleEntry_scheduleAdBreaks :: Lens.Lens' ScheduleEntry (Prelude.Maybe [ScheduleAdBreak])
scheduleEntry_scheduleAdBreaks :: (Maybe [ScheduleAdBreak] -> f (Maybe [ScheduleAdBreak]))
-> ScheduleEntry -> f ScheduleEntry
scheduleEntry_scheduleAdBreaks = (ScheduleEntry -> Maybe [ScheduleAdBreak])
-> (ScheduleEntry -> Maybe [ScheduleAdBreak] -> ScheduleEntry)
-> Lens
     ScheduleEntry
     ScheduleEntry
     (Maybe [ScheduleAdBreak])
     (Maybe [ScheduleAdBreak])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleEntry' {Maybe [ScheduleAdBreak]
scheduleAdBreaks :: Maybe [ScheduleAdBreak]
$sel:scheduleAdBreaks:ScheduleEntry' :: ScheduleEntry -> Maybe [ScheduleAdBreak]
scheduleAdBreaks} -> Maybe [ScheduleAdBreak]
scheduleAdBreaks) (\s :: ScheduleEntry
s@ScheduleEntry' {} Maybe [ScheduleAdBreak]
a -> ScheduleEntry
s {$sel:scheduleAdBreaks:ScheduleEntry' :: Maybe [ScheduleAdBreak]
scheduleAdBreaks = Maybe [ScheduleAdBreak]
a} :: ScheduleEntry) ((Maybe [ScheduleAdBreak] -> f (Maybe [ScheduleAdBreak]))
 -> ScheduleEntry -> f ScheduleEntry)
-> ((Maybe [ScheduleAdBreak] -> f (Maybe [ScheduleAdBreak]))
    -> Maybe [ScheduleAdBreak] -> f (Maybe [ScheduleAdBreak]))
-> (Maybe [ScheduleAdBreak] -> f (Maybe [ScheduleAdBreak]))
-> ScheduleEntry
-> f ScheduleEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ScheduleAdBreak]
  [ScheduleAdBreak]
  [ScheduleAdBreak]
  [ScheduleAdBreak]
-> Iso
     (Maybe [ScheduleAdBreak])
     (Maybe [ScheduleAdBreak])
     (Maybe [ScheduleAdBreak])
     (Maybe [ScheduleAdBreak])
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
  [ScheduleAdBreak]
  [ScheduleAdBreak]
  [ScheduleAdBreak]
  [ScheduleAdBreak]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The approximate duration of this program, in seconds.
scheduleEntry_approximateDurationSeconds :: Lens.Lens' ScheduleEntry (Prelude.Maybe Prelude.Integer)
scheduleEntry_approximateDurationSeconds :: (Maybe Integer -> f (Maybe Integer))
-> ScheduleEntry -> f ScheduleEntry
scheduleEntry_approximateDurationSeconds = (ScheduleEntry -> Maybe Integer)
-> (ScheduleEntry -> Maybe Integer -> ScheduleEntry)
-> Lens ScheduleEntry ScheduleEntry (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleEntry' {Maybe Integer
approximateDurationSeconds :: Maybe Integer
$sel:approximateDurationSeconds:ScheduleEntry' :: ScheduleEntry -> Maybe Integer
approximateDurationSeconds} -> Maybe Integer
approximateDurationSeconds) (\s :: ScheduleEntry
s@ScheduleEntry' {} Maybe Integer
a -> ScheduleEntry
s {$sel:approximateDurationSeconds:ScheduleEntry' :: Maybe Integer
approximateDurationSeconds = Maybe Integer
a} :: ScheduleEntry)

-- | The approximate time that the program will start playing.
scheduleEntry_approximateStartTime :: Lens.Lens' ScheduleEntry (Prelude.Maybe Prelude.UTCTime)
scheduleEntry_approximateStartTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ScheduleEntry -> f ScheduleEntry
scheduleEntry_approximateStartTime = (ScheduleEntry -> Maybe POSIX)
-> (ScheduleEntry -> Maybe POSIX -> ScheduleEntry)
-> Lens ScheduleEntry ScheduleEntry (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleEntry' {Maybe POSIX
approximateStartTime :: Maybe POSIX
$sel:approximateStartTime:ScheduleEntry' :: ScheduleEntry -> Maybe POSIX
approximateStartTime} -> Maybe POSIX
approximateStartTime) (\s :: ScheduleEntry
s@ScheduleEntry' {} Maybe POSIX
a -> ScheduleEntry
s {$sel:approximateStartTime:ScheduleEntry' :: Maybe POSIX
approximateStartTime = Maybe POSIX
a} :: ScheduleEntry) ((Maybe POSIX -> f (Maybe POSIX))
 -> ScheduleEntry -> f ScheduleEntry)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ScheduleEntry
-> f ScheduleEntry
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 type of schedule entry.
--
-- Valid values: PROGRAM or FILLER_SLATE.
scheduleEntry_scheduleEntryType :: Lens.Lens' ScheduleEntry (Prelude.Maybe ScheduleEntryType)
scheduleEntry_scheduleEntryType :: (Maybe ScheduleEntryType -> f (Maybe ScheduleEntryType))
-> ScheduleEntry -> f ScheduleEntry
scheduleEntry_scheduleEntryType = (ScheduleEntry -> Maybe ScheduleEntryType)
-> (ScheduleEntry -> Maybe ScheduleEntryType -> ScheduleEntry)
-> Lens
     ScheduleEntry
     ScheduleEntry
     (Maybe ScheduleEntryType)
     (Maybe ScheduleEntryType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleEntry' {Maybe ScheduleEntryType
scheduleEntryType :: Maybe ScheduleEntryType
$sel:scheduleEntryType:ScheduleEntry' :: ScheduleEntry -> Maybe ScheduleEntryType
scheduleEntryType} -> Maybe ScheduleEntryType
scheduleEntryType) (\s :: ScheduleEntry
s@ScheduleEntry' {} Maybe ScheduleEntryType
a -> ScheduleEntry
s {$sel:scheduleEntryType:ScheduleEntry' :: Maybe ScheduleEntryType
scheduleEntryType = Maybe ScheduleEntryType
a} :: ScheduleEntry)

-- | The name of the VOD source.
scheduleEntry_vodSourceName :: Lens.Lens' ScheduleEntry Prelude.Text
scheduleEntry_vodSourceName :: (Text -> f Text) -> ScheduleEntry -> f ScheduleEntry
scheduleEntry_vodSourceName = (ScheduleEntry -> Text)
-> (ScheduleEntry -> Text -> ScheduleEntry)
-> Lens ScheduleEntry ScheduleEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleEntry' {Text
vodSourceName :: Text
$sel:vodSourceName:ScheduleEntry' :: ScheduleEntry -> Text
vodSourceName} -> Text
vodSourceName) (\s :: ScheduleEntry
s@ScheduleEntry' {} Text
a -> ScheduleEntry
s {$sel:vodSourceName:ScheduleEntry' :: Text
vodSourceName = Text
a} :: ScheduleEntry)

-- | The name of the channel that uses this schedule.
scheduleEntry_channelName :: Lens.Lens' ScheduleEntry Prelude.Text
scheduleEntry_channelName :: (Text -> f Text) -> ScheduleEntry -> f ScheduleEntry
scheduleEntry_channelName = (ScheduleEntry -> Text)
-> (ScheduleEntry -> Text -> ScheduleEntry)
-> Lens ScheduleEntry ScheduleEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleEntry' {Text
channelName :: Text
$sel:channelName:ScheduleEntry' :: ScheduleEntry -> Text
channelName} -> Text
channelName) (\s :: ScheduleEntry
s@ScheduleEntry' {} Text
a -> ScheduleEntry
s {$sel:channelName:ScheduleEntry' :: Text
channelName = Text
a} :: ScheduleEntry)

-- | The name of the source location.
scheduleEntry_sourceLocationName :: Lens.Lens' ScheduleEntry Prelude.Text
scheduleEntry_sourceLocationName :: (Text -> f Text) -> ScheduleEntry -> f ScheduleEntry
scheduleEntry_sourceLocationName = (ScheduleEntry -> Text)
-> (ScheduleEntry -> Text -> ScheduleEntry)
-> Lens ScheduleEntry ScheduleEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleEntry' {Text
sourceLocationName :: Text
$sel:sourceLocationName:ScheduleEntry' :: ScheduleEntry -> Text
sourceLocationName} -> Text
sourceLocationName) (\s :: ScheduleEntry
s@ScheduleEntry' {} Text
a -> ScheduleEntry
s {$sel:sourceLocationName:ScheduleEntry' :: Text
sourceLocationName = Text
a} :: ScheduleEntry)

-- | The ARN of the program.
scheduleEntry_arn :: Lens.Lens' ScheduleEntry Prelude.Text
scheduleEntry_arn :: (Text -> f Text) -> ScheduleEntry -> f ScheduleEntry
scheduleEntry_arn = (ScheduleEntry -> Text)
-> (ScheduleEntry -> Text -> ScheduleEntry)
-> Lens ScheduleEntry ScheduleEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleEntry' {Text
arn :: Text
$sel:arn:ScheduleEntry' :: ScheduleEntry -> Text
arn} -> Text
arn) (\s :: ScheduleEntry
s@ScheduleEntry' {} Text
a -> ScheduleEntry
s {$sel:arn:ScheduleEntry' :: Text
arn = Text
a} :: ScheduleEntry)

-- | The name of the program.
scheduleEntry_programName :: Lens.Lens' ScheduleEntry Prelude.Text
scheduleEntry_programName :: (Text -> f Text) -> ScheduleEntry -> f ScheduleEntry
scheduleEntry_programName = (ScheduleEntry -> Text)
-> (ScheduleEntry -> Text -> ScheduleEntry)
-> Lens ScheduleEntry ScheduleEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleEntry' {Text
programName :: Text
$sel:programName:ScheduleEntry' :: ScheduleEntry -> Text
programName} -> Text
programName) (\s :: ScheduleEntry
s@ScheduleEntry' {} Text
a -> ScheduleEntry
s {$sel:programName:ScheduleEntry' :: Text
programName = Text
a} :: ScheduleEntry)

instance Core.FromJSON ScheduleEntry where
  parseJSON :: Value -> Parser ScheduleEntry
parseJSON =
    String
-> (Object -> Parser ScheduleEntry)
-> Value
-> Parser ScheduleEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ScheduleEntry"
      ( \Object
x ->
          Maybe [ScheduleAdBreak]
-> Maybe Integer
-> Maybe POSIX
-> Maybe ScheduleEntryType
-> Text
-> Text
-> Text
-> Text
-> Text
-> ScheduleEntry
ScheduleEntry'
            (Maybe [ScheduleAdBreak]
 -> Maybe Integer
 -> Maybe POSIX
 -> Maybe ScheduleEntryType
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> ScheduleEntry)
-> Parser (Maybe [ScheduleAdBreak])
-> Parser
     (Maybe Integer
      -> Maybe POSIX
      -> Maybe ScheduleEntryType
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> ScheduleEntry)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ScheduleAdBreak]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ScheduleAdBreaks"
                            Parser (Maybe (Maybe [ScheduleAdBreak]))
-> Maybe [ScheduleAdBreak] -> Parser (Maybe [ScheduleAdBreak])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ScheduleAdBreak]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Integer
   -> Maybe POSIX
   -> Maybe ScheduleEntryType
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> ScheduleEntry)
-> Parser (Maybe Integer)
-> Parser
     (Maybe POSIX
      -> Maybe ScheduleEntryType
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> ScheduleEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ApproximateDurationSeconds")
            Parser
  (Maybe POSIX
   -> Maybe ScheduleEntryType
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> ScheduleEntry)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ScheduleEntryType
      -> Text -> Text -> Text -> Text -> Text -> ScheduleEntry)
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
"ApproximateStartTime")
            Parser
  (Maybe ScheduleEntryType
   -> Text -> Text -> Text -> Text -> Text -> ScheduleEntry)
-> Parser (Maybe ScheduleEntryType)
-> Parser (Text -> Text -> Text -> Text -> Text -> ScheduleEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ScheduleEntryType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ScheduleEntryType")
            Parser (Text -> Text -> Text -> Text -> Text -> ScheduleEntry)
-> Parser Text
-> Parser (Text -> Text -> Text -> Text -> ScheduleEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"VodSourceName")
            Parser (Text -> Text -> Text -> Text -> ScheduleEntry)
-> Parser Text -> Parser (Text -> Text -> Text -> ScheduleEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ChannelName")
            Parser (Text -> Text -> Text -> ScheduleEntry)
-> Parser Text -> Parser (Text -> Text -> ScheduleEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"SourceLocationName")
            Parser (Text -> Text -> ScheduleEntry)
-> Parser Text -> Parser (Text -> ScheduleEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Arn")
            Parser (Text -> ScheduleEntry)
-> Parser Text -> Parser ScheduleEntry
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ProgramName")
      )

instance Prelude.Hashable ScheduleEntry

instance Prelude.NFData ScheduleEntry