{-# 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.MediaLive.Types.CaptionSelectorSettings
-- 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.MediaLive.Types.CaptionSelectorSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.AncillarySourceSettings
import Amazonka.MediaLive.Types.AribSourceSettings
import Amazonka.MediaLive.Types.DvbSubSourceSettings
import Amazonka.MediaLive.Types.EmbeddedSourceSettings
import Amazonka.MediaLive.Types.Scte20SourceSettings
import Amazonka.MediaLive.Types.Scte27SourceSettings
import Amazonka.MediaLive.Types.TeletextSourceSettings
import qualified Amazonka.Prelude as Prelude

-- | Caption Selector Settings
--
-- /See:/ 'newCaptionSelectorSettings' smart constructor.
data CaptionSelectorSettings = CaptionSelectorSettings'
  { CaptionSelectorSettings -> Maybe TeletextSourceSettings
teletextSourceSettings :: Prelude.Maybe TeletextSourceSettings,
    CaptionSelectorSettings -> Maybe AribSourceSettings
aribSourceSettings :: Prelude.Maybe AribSourceSettings,
    CaptionSelectorSettings -> Maybe Scte27SourceSettings
scte27SourceSettings :: Prelude.Maybe Scte27SourceSettings,
    CaptionSelectorSettings -> Maybe DvbSubSourceSettings
dvbSubSourceSettings :: Prelude.Maybe DvbSubSourceSettings,
    CaptionSelectorSettings -> Maybe AncillarySourceSettings
ancillarySourceSettings :: Prelude.Maybe AncillarySourceSettings,
    CaptionSelectorSettings -> Maybe Scte20SourceSettings
scte20SourceSettings :: Prelude.Maybe Scte20SourceSettings,
    CaptionSelectorSettings -> Maybe EmbeddedSourceSettings
embeddedSourceSettings :: Prelude.Maybe EmbeddedSourceSettings
  }
  deriving (CaptionSelectorSettings -> CaptionSelectorSettings -> Bool
(CaptionSelectorSettings -> CaptionSelectorSettings -> Bool)
-> (CaptionSelectorSettings -> CaptionSelectorSettings -> Bool)
-> Eq CaptionSelectorSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CaptionSelectorSettings -> CaptionSelectorSettings -> Bool
$c/= :: CaptionSelectorSettings -> CaptionSelectorSettings -> Bool
== :: CaptionSelectorSettings -> CaptionSelectorSettings -> Bool
$c== :: CaptionSelectorSettings -> CaptionSelectorSettings -> Bool
Prelude.Eq, ReadPrec [CaptionSelectorSettings]
ReadPrec CaptionSelectorSettings
Int -> ReadS CaptionSelectorSettings
ReadS [CaptionSelectorSettings]
(Int -> ReadS CaptionSelectorSettings)
-> ReadS [CaptionSelectorSettings]
-> ReadPrec CaptionSelectorSettings
-> ReadPrec [CaptionSelectorSettings]
-> Read CaptionSelectorSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CaptionSelectorSettings]
$creadListPrec :: ReadPrec [CaptionSelectorSettings]
readPrec :: ReadPrec CaptionSelectorSettings
$creadPrec :: ReadPrec CaptionSelectorSettings
readList :: ReadS [CaptionSelectorSettings]
$creadList :: ReadS [CaptionSelectorSettings]
readsPrec :: Int -> ReadS CaptionSelectorSettings
$creadsPrec :: Int -> ReadS CaptionSelectorSettings
Prelude.Read, Int -> CaptionSelectorSettings -> ShowS
[CaptionSelectorSettings] -> ShowS
CaptionSelectorSettings -> String
(Int -> CaptionSelectorSettings -> ShowS)
-> (CaptionSelectorSettings -> String)
-> ([CaptionSelectorSettings] -> ShowS)
-> Show CaptionSelectorSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CaptionSelectorSettings] -> ShowS
$cshowList :: [CaptionSelectorSettings] -> ShowS
show :: CaptionSelectorSettings -> String
$cshow :: CaptionSelectorSettings -> String
showsPrec :: Int -> CaptionSelectorSettings -> ShowS
$cshowsPrec :: Int -> CaptionSelectorSettings -> ShowS
Prelude.Show, (forall x.
 CaptionSelectorSettings -> Rep CaptionSelectorSettings x)
-> (forall x.
    Rep CaptionSelectorSettings x -> CaptionSelectorSettings)
-> Generic CaptionSelectorSettings
forall x. Rep CaptionSelectorSettings x -> CaptionSelectorSettings
forall x. CaptionSelectorSettings -> Rep CaptionSelectorSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CaptionSelectorSettings x -> CaptionSelectorSettings
$cfrom :: forall x. CaptionSelectorSettings -> Rep CaptionSelectorSettings x
Prelude.Generic)

-- |
-- Create a value of 'CaptionSelectorSettings' 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:
--
-- 'teletextSourceSettings', 'captionSelectorSettings_teletextSourceSettings' - Undocumented member.
--
-- 'aribSourceSettings', 'captionSelectorSettings_aribSourceSettings' - Undocumented member.
--
-- 'scte27SourceSettings', 'captionSelectorSettings_scte27SourceSettings' - Undocumented member.
--
-- 'dvbSubSourceSettings', 'captionSelectorSettings_dvbSubSourceSettings' - Undocumented member.
--
-- 'ancillarySourceSettings', 'captionSelectorSettings_ancillarySourceSettings' - Undocumented member.
--
-- 'scte20SourceSettings', 'captionSelectorSettings_scte20SourceSettings' - Undocumented member.
--
-- 'embeddedSourceSettings', 'captionSelectorSettings_embeddedSourceSettings' - Undocumented member.
newCaptionSelectorSettings ::
  CaptionSelectorSettings
newCaptionSelectorSettings :: CaptionSelectorSettings
newCaptionSelectorSettings =
  CaptionSelectorSettings' :: Maybe TeletextSourceSettings
-> Maybe AribSourceSettings
-> Maybe Scte27SourceSettings
-> Maybe DvbSubSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe Scte20SourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSelectorSettings
CaptionSelectorSettings'
    { $sel:teletextSourceSettings:CaptionSelectorSettings' :: Maybe TeletextSourceSettings
teletextSourceSettings =
        Maybe TeletextSourceSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:aribSourceSettings:CaptionSelectorSettings' :: Maybe AribSourceSettings
aribSourceSettings = Maybe AribSourceSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:scte27SourceSettings:CaptionSelectorSettings' :: Maybe Scte27SourceSettings
scte27SourceSettings = Maybe Scte27SourceSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:dvbSubSourceSettings:CaptionSelectorSettings' :: Maybe DvbSubSourceSettings
dvbSubSourceSettings = Maybe DvbSubSourceSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:ancillarySourceSettings:CaptionSelectorSettings' :: Maybe AncillarySourceSettings
ancillarySourceSettings = Maybe AncillarySourceSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:scte20SourceSettings:CaptionSelectorSettings' :: Maybe Scte20SourceSettings
scte20SourceSettings = Maybe Scte20SourceSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:embeddedSourceSettings:CaptionSelectorSettings' :: Maybe EmbeddedSourceSettings
embeddedSourceSettings = Maybe EmbeddedSourceSettings
forall a. Maybe a
Prelude.Nothing
    }

-- | Undocumented member.
captionSelectorSettings_teletextSourceSettings :: Lens.Lens' CaptionSelectorSettings (Prelude.Maybe TeletextSourceSettings)
captionSelectorSettings_teletextSourceSettings :: (Maybe TeletextSourceSettings -> f (Maybe TeletextSourceSettings))
-> CaptionSelectorSettings -> f CaptionSelectorSettings
captionSelectorSettings_teletextSourceSettings = (CaptionSelectorSettings -> Maybe TeletextSourceSettings)
-> (CaptionSelectorSettings
    -> Maybe TeletextSourceSettings -> CaptionSelectorSettings)
-> Lens
     CaptionSelectorSettings
     CaptionSelectorSettings
     (Maybe TeletextSourceSettings)
     (Maybe TeletextSourceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSelectorSettings' {Maybe TeletextSourceSettings
teletextSourceSettings :: Maybe TeletextSourceSettings
$sel:teletextSourceSettings:CaptionSelectorSettings' :: CaptionSelectorSettings -> Maybe TeletextSourceSettings
teletextSourceSettings} -> Maybe TeletextSourceSettings
teletextSourceSettings) (\s :: CaptionSelectorSettings
s@CaptionSelectorSettings' {} Maybe TeletextSourceSettings
a -> CaptionSelectorSettings
s {$sel:teletextSourceSettings:CaptionSelectorSettings' :: Maybe TeletextSourceSettings
teletextSourceSettings = Maybe TeletextSourceSettings
a} :: CaptionSelectorSettings)

-- | Undocumented member.
captionSelectorSettings_aribSourceSettings :: Lens.Lens' CaptionSelectorSettings (Prelude.Maybe AribSourceSettings)
captionSelectorSettings_aribSourceSettings :: (Maybe AribSourceSettings -> f (Maybe AribSourceSettings))
-> CaptionSelectorSettings -> f CaptionSelectorSettings
captionSelectorSettings_aribSourceSettings = (CaptionSelectorSettings -> Maybe AribSourceSettings)
-> (CaptionSelectorSettings
    -> Maybe AribSourceSettings -> CaptionSelectorSettings)
-> Lens
     CaptionSelectorSettings
     CaptionSelectorSettings
     (Maybe AribSourceSettings)
     (Maybe AribSourceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSelectorSettings' {Maybe AribSourceSettings
aribSourceSettings :: Maybe AribSourceSettings
$sel:aribSourceSettings:CaptionSelectorSettings' :: CaptionSelectorSettings -> Maybe AribSourceSettings
aribSourceSettings} -> Maybe AribSourceSettings
aribSourceSettings) (\s :: CaptionSelectorSettings
s@CaptionSelectorSettings' {} Maybe AribSourceSettings
a -> CaptionSelectorSettings
s {$sel:aribSourceSettings:CaptionSelectorSettings' :: Maybe AribSourceSettings
aribSourceSettings = Maybe AribSourceSettings
a} :: CaptionSelectorSettings)

-- | Undocumented member.
captionSelectorSettings_scte27SourceSettings :: Lens.Lens' CaptionSelectorSettings (Prelude.Maybe Scte27SourceSettings)
captionSelectorSettings_scte27SourceSettings :: (Maybe Scte27SourceSettings -> f (Maybe Scte27SourceSettings))
-> CaptionSelectorSettings -> f CaptionSelectorSettings
captionSelectorSettings_scte27SourceSettings = (CaptionSelectorSettings -> Maybe Scte27SourceSettings)
-> (CaptionSelectorSettings
    -> Maybe Scte27SourceSettings -> CaptionSelectorSettings)
-> Lens
     CaptionSelectorSettings
     CaptionSelectorSettings
     (Maybe Scte27SourceSettings)
     (Maybe Scte27SourceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSelectorSettings' {Maybe Scte27SourceSettings
scte27SourceSettings :: Maybe Scte27SourceSettings
$sel:scte27SourceSettings:CaptionSelectorSettings' :: CaptionSelectorSettings -> Maybe Scte27SourceSettings
scte27SourceSettings} -> Maybe Scte27SourceSettings
scte27SourceSettings) (\s :: CaptionSelectorSettings
s@CaptionSelectorSettings' {} Maybe Scte27SourceSettings
a -> CaptionSelectorSettings
s {$sel:scte27SourceSettings:CaptionSelectorSettings' :: Maybe Scte27SourceSettings
scte27SourceSettings = Maybe Scte27SourceSettings
a} :: CaptionSelectorSettings)

-- | Undocumented member.
captionSelectorSettings_dvbSubSourceSettings :: Lens.Lens' CaptionSelectorSettings (Prelude.Maybe DvbSubSourceSettings)
captionSelectorSettings_dvbSubSourceSettings :: (Maybe DvbSubSourceSettings -> f (Maybe DvbSubSourceSettings))
-> CaptionSelectorSettings -> f CaptionSelectorSettings
captionSelectorSettings_dvbSubSourceSettings = (CaptionSelectorSettings -> Maybe DvbSubSourceSettings)
-> (CaptionSelectorSettings
    -> Maybe DvbSubSourceSettings -> CaptionSelectorSettings)
-> Lens
     CaptionSelectorSettings
     CaptionSelectorSettings
     (Maybe DvbSubSourceSettings)
     (Maybe DvbSubSourceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSelectorSettings' {Maybe DvbSubSourceSettings
dvbSubSourceSettings :: Maybe DvbSubSourceSettings
$sel:dvbSubSourceSettings:CaptionSelectorSettings' :: CaptionSelectorSettings -> Maybe DvbSubSourceSettings
dvbSubSourceSettings} -> Maybe DvbSubSourceSettings
dvbSubSourceSettings) (\s :: CaptionSelectorSettings
s@CaptionSelectorSettings' {} Maybe DvbSubSourceSettings
a -> CaptionSelectorSettings
s {$sel:dvbSubSourceSettings:CaptionSelectorSettings' :: Maybe DvbSubSourceSettings
dvbSubSourceSettings = Maybe DvbSubSourceSettings
a} :: CaptionSelectorSettings)

-- | Undocumented member.
captionSelectorSettings_ancillarySourceSettings :: Lens.Lens' CaptionSelectorSettings (Prelude.Maybe AncillarySourceSettings)
captionSelectorSettings_ancillarySourceSettings :: (Maybe AncillarySourceSettings
 -> f (Maybe AncillarySourceSettings))
-> CaptionSelectorSettings -> f CaptionSelectorSettings
captionSelectorSettings_ancillarySourceSettings = (CaptionSelectorSettings -> Maybe AncillarySourceSettings)
-> (CaptionSelectorSettings
    -> Maybe AncillarySourceSettings -> CaptionSelectorSettings)
-> Lens
     CaptionSelectorSettings
     CaptionSelectorSettings
     (Maybe AncillarySourceSettings)
     (Maybe AncillarySourceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSelectorSettings' {Maybe AncillarySourceSettings
ancillarySourceSettings :: Maybe AncillarySourceSettings
$sel:ancillarySourceSettings:CaptionSelectorSettings' :: CaptionSelectorSettings -> Maybe AncillarySourceSettings
ancillarySourceSettings} -> Maybe AncillarySourceSettings
ancillarySourceSettings) (\s :: CaptionSelectorSettings
s@CaptionSelectorSettings' {} Maybe AncillarySourceSettings
a -> CaptionSelectorSettings
s {$sel:ancillarySourceSettings:CaptionSelectorSettings' :: Maybe AncillarySourceSettings
ancillarySourceSettings = Maybe AncillarySourceSettings
a} :: CaptionSelectorSettings)

-- | Undocumented member.
captionSelectorSettings_scte20SourceSettings :: Lens.Lens' CaptionSelectorSettings (Prelude.Maybe Scte20SourceSettings)
captionSelectorSettings_scte20SourceSettings :: (Maybe Scte20SourceSettings -> f (Maybe Scte20SourceSettings))
-> CaptionSelectorSettings -> f CaptionSelectorSettings
captionSelectorSettings_scte20SourceSettings = (CaptionSelectorSettings -> Maybe Scte20SourceSettings)
-> (CaptionSelectorSettings
    -> Maybe Scte20SourceSettings -> CaptionSelectorSettings)
-> Lens
     CaptionSelectorSettings
     CaptionSelectorSettings
     (Maybe Scte20SourceSettings)
     (Maybe Scte20SourceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSelectorSettings' {Maybe Scte20SourceSettings
scte20SourceSettings :: Maybe Scte20SourceSettings
$sel:scte20SourceSettings:CaptionSelectorSettings' :: CaptionSelectorSettings -> Maybe Scte20SourceSettings
scte20SourceSettings} -> Maybe Scte20SourceSettings
scte20SourceSettings) (\s :: CaptionSelectorSettings
s@CaptionSelectorSettings' {} Maybe Scte20SourceSettings
a -> CaptionSelectorSettings
s {$sel:scte20SourceSettings:CaptionSelectorSettings' :: Maybe Scte20SourceSettings
scte20SourceSettings = Maybe Scte20SourceSettings
a} :: CaptionSelectorSettings)

-- | Undocumented member.
captionSelectorSettings_embeddedSourceSettings :: Lens.Lens' CaptionSelectorSettings (Prelude.Maybe EmbeddedSourceSettings)
captionSelectorSettings_embeddedSourceSettings :: (Maybe EmbeddedSourceSettings -> f (Maybe EmbeddedSourceSettings))
-> CaptionSelectorSettings -> f CaptionSelectorSettings
captionSelectorSettings_embeddedSourceSettings = (CaptionSelectorSettings -> Maybe EmbeddedSourceSettings)
-> (CaptionSelectorSettings
    -> Maybe EmbeddedSourceSettings -> CaptionSelectorSettings)
-> Lens
     CaptionSelectorSettings
     CaptionSelectorSettings
     (Maybe EmbeddedSourceSettings)
     (Maybe EmbeddedSourceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CaptionSelectorSettings' {Maybe EmbeddedSourceSettings
embeddedSourceSettings :: Maybe EmbeddedSourceSettings
$sel:embeddedSourceSettings:CaptionSelectorSettings' :: CaptionSelectorSettings -> Maybe EmbeddedSourceSettings
embeddedSourceSettings} -> Maybe EmbeddedSourceSettings
embeddedSourceSettings) (\s :: CaptionSelectorSettings
s@CaptionSelectorSettings' {} Maybe EmbeddedSourceSettings
a -> CaptionSelectorSettings
s {$sel:embeddedSourceSettings:CaptionSelectorSettings' :: Maybe EmbeddedSourceSettings
embeddedSourceSettings = Maybe EmbeddedSourceSettings
a} :: CaptionSelectorSettings)

instance Core.FromJSON CaptionSelectorSettings where
  parseJSON :: Value -> Parser CaptionSelectorSettings
parseJSON =
    String
-> (Object -> Parser CaptionSelectorSettings)
-> Value
-> Parser CaptionSelectorSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"CaptionSelectorSettings"
      ( \Object
x ->
          Maybe TeletextSourceSettings
-> Maybe AribSourceSettings
-> Maybe Scte27SourceSettings
-> Maybe DvbSubSourceSettings
-> Maybe AncillarySourceSettings
-> Maybe Scte20SourceSettings
-> Maybe EmbeddedSourceSettings
-> CaptionSelectorSettings
CaptionSelectorSettings'
            (Maybe TeletextSourceSettings
 -> Maybe AribSourceSettings
 -> Maybe Scte27SourceSettings
 -> Maybe DvbSubSourceSettings
 -> Maybe AncillarySourceSettings
 -> Maybe Scte20SourceSettings
 -> Maybe EmbeddedSourceSettings
 -> CaptionSelectorSettings)
-> Parser (Maybe TeletextSourceSettings)
-> Parser
     (Maybe AribSourceSettings
      -> Maybe Scte27SourceSettings
      -> Maybe DvbSubSourceSettings
      -> Maybe AncillarySourceSettings
      -> Maybe Scte20SourceSettings
      -> Maybe EmbeddedSourceSettings
      -> CaptionSelectorSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe TeletextSourceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"teletextSourceSettings")
            Parser
  (Maybe AribSourceSettings
   -> Maybe Scte27SourceSettings
   -> Maybe DvbSubSourceSettings
   -> Maybe AncillarySourceSettings
   -> Maybe Scte20SourceSettings
   -> Maybe EmbeddedSourceSettings
   -> CaptionSelectorSettings)
-> Parser (Maybe AribSourceSettings)
-> Parser
     (Maybe Scte27SourceSettings
      -> Maybe DvbSubSourceSettings
      -> Maybe AncillarySourceSettings
      -> Maybe Scte20SourceSettings
      -> Maybe EmbeddedSourceSettings
      -> CaptionSelectorSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AribSourceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"aribSourceSettings")
            Parser
  (Maybe Scte27SourceSettings
   -> Maybe DvbSubSourceSettings
   -> Maybe AncillarySourceSettings
   -> Maybe Scte20SourceSettings
   -> Maybe EmbeddedSourceSettings
   -> CaptionSelectorSettings)
-> Parser (Maybe Scte27SourceSettings)
-> Parser
     (Maybe DvbSubSourceSettings
      -> Maybe AncillarySourceSettings
      -> Maybe Scte20SourceSettings
      -> Maybe EmbeddedSourceSettings
      -> CaptionSelectorSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Scte27SourceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scte27SourceSettings")
            Parser
  (Maybe DvbSubSourceSettings
   -> Maybe AncillarySourceSettings
   -> Maybe Scte20SourceSettings
   -> Maybe EmbeddedSourceSettings
   -> CaptionSelectorSettings)
-> Parser (Maybe DvbSubSourceSettings)
-> Parser
     (Maybe AncillarySourceSettings
      -> Maybe Scte20SourceSettings
      -> Maybe EmbeddedSourceSettings
      -> CaptionSelectorSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DvbSubSourceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dvbSubSourceSettings")
            Parser
  (Maybe AncillarySourceSettings
   -> Maybe Scte20SourceSettings
   -> Maybe EmbeddedSourceSettings
   -> CaptionSelectorSettings)
-> Parser (Maybe AncillarySourceSettings)
-> Parser
     (Maybe Scte20SourceSettings
      -> Maybe EmbeddedSourceSettings -> CaptionSelectorSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AncillarySourceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ancillarySourceSettings")
            Parser
  (Maybe Scte20SourceSettings
   -> Maybe EmbeddedSourceSettings -> CaptionSelectorSettings)
-> Parser (Maybe Scte20SourceSettings)
-> Parser (Maybe EmbeddedSourceSettings -> CaptionSelectorSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Scte20SourceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scte20SourceSettings")
            Parser (Maybe EmbeddedSourceSettings -> CaptionSelectorSettings)
-> Parser (Maybe EmbeddedSourceSettings)
-> Parser CaptionSelectorSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EmbeddedSourceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"embeddedSourceSettings")
      )

instance Prelude.Hashable CaptionSelectorSettings

instance Prelude.NFData CaptionSelectorSettings

instance Core.ToJSON CaptionSelectorSettings where
  toJSON :: CaptionSelectorSettings -> Value
toJSON CaptionSelectorSettings' {Maybe AncillarySourceSettings
Maybe AribSourceSettings
Maybe DvbSubSourceSettings
Maybe EmbeddedSourceSettings
Maybe Scte20SourceSettings
Maybe Scte27SourceSettings
Maybe TeletextSourceSettings
embeddedSourceSettings :: Maybe EmbeddedSourceSettings
scte20SourceSettings :: Maybe Scte20SourceSettings
ancillarySourceSettings :: Maybe AncillarySourceSettings
dvbSubSourceSettings :: Maybe DvbSubSourceSettings
scte27SourceSettings :: Maybe Scte27SourceSettings
aribSourceSettings :: Maybe AribSourceSettings
teletextSourceSettings :: Maybe TeletextSourceSettings
$sel:embeddedSourceSettings:CaptionSelectorSettings' :: CaptionSelectorSettings -> Maybe EmbeddedSourceSettings
$sel:scte20SourceSettings:CaptionSelectorSettings' :: CaptionSelectorSettings -> Maybe Scte20SourceSettings
$sel:ancillarySourceSettings:CaptionSelectorSettings' :: CaptionSelectorSettings -> Maybe AncillarySourceSettings
$sel:dvbSubSourceSettings:CaptionSelectorSettings' :: CaptionSelectorSettings -> Maybe DvbSubSourceSettings
$sel:scte27SourceSettings:CaptionSelectorSettings' :: CaptionSelectorSettings -> Maybe Scte27SourceSettings
$sel:aribSourceSettings:CaptionSelectorSettings' :: CaptionSelectorSettings -> Maybe AribSourceSettings
$sel:teletextSourceSettings:CaptionSelectorSettings' :: CaptionSelectorSettings -> Maybe TeletextSourceSettings
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"teletextSourceSettings" Text -> TeletextSourceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (TeletextSourceSettings -> Pair)
-> Maybe TeletextSourceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TeletextSourceSettings
teletextSourceSettings,
            (Text
"aribSourceSettings" Text -> AribSourceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AribSourceSettings -> Pair)
-> Maybe AribSourceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AribSourceSettings
aribSourceSettings,
            (Text
"scte27SourceSettings" Text -> Scte27SourceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Scte27SourceSettings -> Pair)
-> Maybe Scte27SourceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Scte27SourceSettings
scte27SourceSettings,
            (Text
"dvbSubSourceSettings" Text -> DvbSubSourceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DvbSubSourceSettings -> Pair)
-> Maybe DvbSubSourceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DvbSubSourceSettings
dvbSubSourceSettings,
            (Text
"ancillarySourceSettings" Text -> AncillarySourceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AncillarySourceSettings -> Pair)
-> Maybe AncillarySourceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AncillarySourceSettings
ancillarySourceSettings,
            (Text
"scte20SourceSettings" Text -> Scte20SourceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Scte20SourceSettings -> Pair)
-> Maybe Scte20SourceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Scte20SourceSettings
scte20SourceSettings,
            (Text
"embeddedSourceSettings" Text -> EmbeddedSourceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (EmbeddedSourceSettings -> Pair)
-> Maybe EmbeddedSourceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EmbeddedSourceSettings
embeddedSourceSettings
          ]
      )