{-# 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.OutputSettings
-- 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.OutputSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.ArchiveOutputSettings
import Amazonka.MediaLive.Types.FrameCaptureOutputSettings
import Amazonka.MediaLive.Types.HlsOutputSettings
import Amazonka.MediaLive.Types.MediaPackageOutputSettings
import Amazonka.MediaLive.Types.MsSmoothOutputSettings
import Amazonka.MediaLive.Types.MultiplexOutputSettings
import Amazonka.MediaLive.Types.RtmpOutputSettings
import Amazonka.MediaLive.Types.UdpOutputSettings
import qualified Amazonka.Prelude as Prelude

-- | Output Settings
--
-- /See:/ 'newOutputSettings' smart constructor.
data OutputSettings = OutputSettings'
  { OutputSettings -> Maybe MultiplexOutputSettings
multiplexOutputSettings :: Prelude.Maybe MultiplexOutputSettings,
    OutputSettings -> Maybe ArchiveOutputSettings
archiveOutputSettings :: Prelude.Maybe ArchiveOutputSettings,
    OutputSettings -> Maybe RtmpOutputSettings
rtmpOutputSettings :: Prelude.Maybe RtmpOutputSettings,
    OutputSettings -> Maybe MediaPackageOutputSettings
mediaPackageOutputSettings :: Prelude.Maybe MediaPackageOutputSettings,
    OutputSettings -> Maybe HlsOutputSettings
hlsOutputSettings :: Prelude.Maybe HlsOutputSettings,
    OutputSettings -> Maybe FrameCaptureOutputSettings
frameCaptureOutputSettings :: Prelude.Maybe FrameCaptureOutputSettings,
    OutputSettings -> Maybe UdpOutputSettings
udpOutputSettings :: Prelude.Maybe UdpOutputSettings,
    OutputSettings -> Maybe MsSmoothOutputSettings
msSmoothOutputSettings :: Prelude.Maybe MsSmoothOutputSettings
  }
  deriving (OutputSettings -> OutputSettings -> Bool
(OutputSettings -> OutputSettings -> Bool)
-> (OutputSettings -> OutputSettings -> Bool) -> Eq OutputSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OutputSettings -> OutputSettings -> Bool
$c/= :: OutputSettings -> OutputSettings -> Bool
== :: OutputSettings -> OutputSettings -> Bool
$c== :: OutputSettings -> OutputSettings -> Bool
Prelude.Eq, ReadPrec [OutputSettings]
ReadPrec OutputSettings
Int -> ReadS OutputSettings
ReadS [OutputSettings]
(Int -> ReadS OutputSettings)
-> ReadS [OutputSettings]
-> ReadPrec OutputSettings
-> ReadPrec [OutputSettings]
-> Read OutputSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OutputSettings]
$creadListPrec :: ReadPrec [OutputSettings]
readPrec :: ReadPrec OutputSettings
$creadPrec :: ReadPrec OutputSettings
readList :: ReadS [OutputSettings]
$creadList :: ReadS [OutputSettings]
readsPrec :: Int -> ReadS OutputSettings
$creadsPrec :: Int -> ReadS OutputSettings
Prelude.Read, Int -> OutputSettings -> ShowS
[OutputSettings] -> ShowS
OutputSettings -> String
(Int -> OutputSettings -> ShowS)
-> (OutputSettings -> String)
-> ([OutputSettings] -> ShowS)
-> Show OutputSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OutputSettings] -> ShowS
$cshowList :: [OutputSettings] -> ShowS
show :: OutputSettings -> String
$cshow :: OutputSettings -> String
showsPrec :: Int -> OutputSettings -> ShowS
$cshowsPrec :: Int -> OutputSettings -> ShowS
Prelude.Show, (forall x. OutputSettings -> Rep OutputSettings x)
-> (forall x. Rep OutputSettings x -> OutputSettings)
-> Generic OutputSettings
forall x. Rep OutputSettings x -> OutputSettings
forall x. OutputSettings -> Rep OutputSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OutputSettings x -> OutputSettings
$cfrom :: forall x. OutputSettings -> Rep OutputSettings x
Prelude.Generic)

-- |
-- Create a value of 'OutputSettings' 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:
--
-- 'multiplexOutputSettings', 'outputSettings_multiplexOutputSettings' - Undocumented member.
--
-- 'archiveOutputSettings', 'outputSettings_archiveOutputSettings' - Undocumented member.
--
-- 'rtmpOutputSettings', 'outputSettings_rtmpOutputSettings' - Undocumented member.
--
-- 'mediaPackageOutputSettings', 'outputSettings_mediaPackageOutputSettings' - Undocumented member.
--
-- 'hlsOutputSettings', 'outputSettings_hlsOutputSettings' - Undocumented member.
--
-- 'frameCaptureOutputSettings', 'outputSettings_frameCaptureOutputSettings' - Undocumented member.
--
-- 'udpOutputSettings', 'outputSettings_udpOutputSettings' - Undocumented member.
--
-- 'msSmoothOutputSettings', 'outputSettings_msSmoothOutputSettings' - Undocumented member.
newOutputSettings ::
  OutputSettings
newOutputSettings :: OutputSettings
newOutputSettings =
  OutputSettings' :: Maybe MultiplexOutputSettings
-> Maybe ArchiveOutputSettings
-> Maybe RtmpOutputSettings
-> Maybe MediaPackageOutputSettings
-> Maybe HlsOutputSettings
-> Maybe FrameCaptureOutputSettings
-> Maybe UdpOutputSettings
-> Maybe MsSmoothOutputSettings
-> OutputSettings
OutputSettings'
    { $sel:multiplexOutputSettings:OutputSettings' :: Maybe MultiplexOutputSettings
multiplexOutputSettings =
        Maybe MultiplexOutputSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:archiveOutputSettings:OutputSettings' :: Maybe ArchiveOutputSettings
archiveOutputSettings = Maybe ArchiveOutputSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:rtmpOutputSettings:OutputSettings' :: Maybe RtmpOutputSettings
rtmpOutputSettings = Maybe RtmpOutputSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:mediaPackageOutputSettings:OutputSettings' :: Maybe MediaPackageOutputSettings
mediaPackageOutputSettings = Maybe MediaPackageOutputSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:hlsOutputSettings:OutputSettings' :: Maybe HlsOutputSettings
hlsOutputSettings = Maybe HlsOutputSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:frameCaptureOutputSettings:OutputSettings' :: Maybe FrameCaptureOutputSettings
frameCaptureOutputSettings = Maybe FrameCaptureOutputSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:udpOutputSettings:OutputSettings' :: Maybe UdpOutputSettings
udpOutputSettings = Maybe UdpOutputSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:msSmoothOutputSettings:OutputSettings' :: Maybe MsSmoothOutputSettings
msSmoothOutputSettings = Maybe MsSmoothOutputSettings
forall a. Maybe a
Prelude.Nothing
    }

-- | Undocumented member.
outputSettings_multiplexOutputSettings :: Lens.Lens' OutputSettings (Prelude.Maybe MultiplexOutputSettings)
outputSettings_multiplexOutputSettings :: (Maybe MultiplexOutputSettings
 -> f (Maybe MultiplexOutputSettings))
-> OutputSettings -> f OutputSettings
outputSettings_multiplexOutputSettings = (OutputSettings -> Maybe MultiplexOutputSettings)
-> (OutputSettings
    -> Maybe MultiplexOutputSettings -> OutputSettings)
-> Lens
     OutputSettings
     OutputSettings
     (Maybe MultiplexOutputSettings)
     (Maybe MultiplexOutputSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputSettings' {Maybe MultiplexOutputSettings
multiplexOutputSettings :: Maybe MultiplexOutputSettings
$sel:multiplexOutputSettings:OutputSettings' :: OutputSettings -> Maybe MultiplexOutputSettings
multiplexOutputSettings} -> Maybe MultiplexOutputSettings
multiplexOutputSettings) (\s :: OutputSettings
s@OutputSettings' {} Maybe MultiplexOutputSettings
a -> OutputSettings
s {$sel:multiplexOutputSettings:OutputSettings' :: Maybe MultiplexOutputSettings
multiplexOutputSettings = Maybe MultiplexOutputSettings
a} :: OutputSettings)

-- | Undocumented member.
outputSettings_archiveOutputSettings :: Lens.Lens' OutputSettings (Prelude.Maybe ArchiveOutputSettings)
outputSettings_archiveOutputSettings :: (Maybe ArchiveOutputSettings -> f (Maybe ArchiveOutputSettings))
-> OutputSettings -> f OutputSettings
outputSettings_archiveOutputSettings = (OutputSettings -> Maybe ArchiveOutputSettings)
-> (OutputSettings
    -> Maybe ArchiveOutputSettings -> OutputSettings)
-> Lens
     OutputSettings
     OutputSettings
     (Maybe ArchiveOutputSettings)
     (Maybe ArchiveOutputSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputSettings' {Maybe ArchiveOutputSettings
archiveOutputSettings :: Maybe ArchiveOutputSettings
$sel:archiveOutputSettings:OutputSettings' :: OutputSettings -> Maybe ArchiveOutputSettings
archiveOutputSettings} -> Maybe ArchiveOutputSettings
archiveOutputSettings) (\s :: OutputSettings
s@OutputSettings' {} Maybe ArchiveOutputSettings
a -> OutputSettings
s {$sel:archiveOutputSettings:OutputSettings' :: Maybe ArchiveOutputSettings
archiveOutputSettings = Maybe ArchiveOutputSettings
a} :: OutputSettings)

-- | Undocumented member.
outputSettings_rtmpOutputSettings :: Lens.Lens' OutputSettings (Prelude.Maybe RtmpOutputSettings)
outputSettings_rtmpOutputSettings :: (Maybe RtmpOutputSettings -> f (Maybe RtmpOutputSettings))
-> OutputSettings -> f OutputSettings
outputSettings_rtmpOutputSettings = (OutputSettings -> Maybe RtmpOutputSettings)
-> (OutputSettings -> Maybe RtmpOutputSettings -> OutputSettings)
-> Lens
     OutputSettings
     OutputSettings
     (Maybe RtmpOutputSettings)
     (Maybe RtmpOutputSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputSettings' {Maybe RtmpOutputSettings
rtmpOutputSettings :: Maybe RtmpOutputSettings
$sel:rtmpOutputSettings:OutputSettings' :: OutputSettings -> Maybe RtmpOutputSettings
rtmpOutputSettings} -> Maybe RtmpOutputSettings
rtmpOutputSettings) (\s :: OutputSettings
s@OutputSettings' {} Maybe RtmpOutputSettings
a -> OutputSettings
s {$sel:rtmpOutputSettings:OutputSettings' :: Maybe RtmpOutputSettings
rtmpOutputSettings = Maybe RtmpOutputSettings
a} :: OutputSettings)

-- | Undocumented member.
outputSettings_mediaPackageOutputSettings :: Lens.Lens' OutputSettings (Prelude.Maybe MediaPackageOutputSettings)
outputSettings_mediaPackageOutputSettings :: (Maybe MediaPackageOutputSettings
 -> f (Maybe MediaPackageOutputSettings))
-> OutputSettings -> f OutputSettings
outputSettings_mediaPackageOutputSettings = (OutputSettings -> Maybe MediaPackageOutputSettings)
-> (OutputSettings
    -> Maybe MediaPackageOutputSettings -> OutputSettings)
-> Lens
     OutputSettings
     OutputSettings
     (Maybe MediaPackageOutputSettings)
     (Maybe MediaPackageOutputSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputSettings' {Maybe MediaPackageOutputSettings
mediaPackageOutputSettings :: Maybe MediaPackageOutputSettings
$sel:mediaPackageOutputSettings:OutputSettings' :: OutputSettings -> Maybe MediaPackageOutputSettings
mediaPackageOutputSettings} -> Maybe MediaPackageOutputSettings
mediaPackageOutputSettings) (\s :: OutputSettings
s@OutputSettings' {} Maybe MediaPackageOutputSettings
a -> OutputSettings
s {$sel:mediaPackageOutputSettings:OutputSettings' :: Maybe MediaPackageOutputSettings
mediaPackageOutputSettings = Maybe MediaPackageOutputSettings
a} :: OutputSettings)

-- | Undocumented member.
outputSettings_hlsOutputSettings :: Lens.Lens' OutputSettings (Prelude.Maybe HlsOutputSettings)
outputSettings_hlsOutputSettings :: (Maybe HlsOutputSettings -> f (Maybe HlsOutputSettings))
-> OutputSettings -> f OutputSettings
outputSettings_hlsOutputSettings = (OutputSettings -> Maybe HlsOutputSettings)
-> (OutputSettings -> Maybe HlsOutputSettings -> OutputSettings)
-> Lens
     OutputSettings
     OutputSettings
     (Maybe HlsOutputSettings)
     (Maybe HlsOutputSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputSettings' {Maybe HlsOutputSettings
hlsOutputSettings :: Maybe HlsOutputSettings
$sel:hlsOutputSettings:OutputSettings' :: OutputSettings -> Maybe HlsOutputSettings
hlsOutputSettings} -> Maybe HlsOutputSettings
hlsOutputSettings) (\s :: OutputSettings
s@OutputSettings' {} Maybe HlsOutputSettings
a -> OutputSettings
s {$sel:hlsOutputSettings:OutputSettings' :: Maybe HlsOutputSettings
hlsOutputSettings = Maybe HlsOutputSettings
a} :: OutputSettings)

-- | Undocumented member.
outputSettings_frameCaptureOutputSettings :: Lens.Lens' OutputSettings (Prelude.Maybe FrameCaptureOutputSettings)
outputSettings_frameCaptureOutputSettings :: (Maybe FrameCaptureOutputSettings
 -> f (Maybe FrameCaptureOutputSettings))
-> OutputSettings -> f OutputSettings
outputSettings_frameCaptureOutputSettings = (OutputSettings -> Maybe FrameCaptureOutputSettings)
-> (OutputSettings
    -> Maybe FrameCaptureOutputSettings -> OutputSettings)
-> Lens
     OutputSettings
     OutputSettings
     (Maybe FrameCaptureOutputSettings)
     (Maybe FrameCaptureOutputSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputSettings' {Maybe FrameCaptureOutputSettings
frameCaptureOutputSettings :: Maybe FrameCaptureOutputSettings
$sel:frameCaptureOutputSettings:OutputSettings' :: OutputSettings -> Maybe FrameCaptureOutputSettings
frameCaptureOutputSettings} -> Maybe FrameCaptureOutputSettings
frameCaptureOutputSettings) (\s :: OutputSettings
s@OutputSettings' {} Maybe FrameCaptureOutputSettings
a -> OutputSettings
s {$sel:frameCaptureOutputSettings:OutputSettings' :: Maybe FrameCaptureOutputSettings
frameCaptureOutputSettings = Maybe FrameCaptureOutputSettings
a} :: OutputSettings)

-- | Undocumented member.
outputSettings_udpOutputSettings :: Lens.Lens' OutputSettings (Prelude.Maybe UdpOutputSettings)
outputSettings_udpOutputSettings :: (Maybe UdpOutputSettings -> f (Maybe UdpOutputSettings))
-> OutputSettings -> f OutputSettings
outputSettings_udpOutputSettings = (OutputSettings -> Maybe UdpOutputSettings)
-> (OutputSettings -> Maybe UdpOutputSettings -> OutputSettings)
-> Lens
     OutputSettings
     OutputSettings
     (Maybe UdpOutputSettings)
     (Maybe UdpOutputSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputSettings' {Maybe UdpOutputSettings
udpOutputSettings :: Maybe UdpOutputSettings
$sel:udpOutputSettings:OutputSettings' :: OutputSettings -> Maybe UdpOutputSettings
udpOutputSettings} -> Maybe UdpOutputSettings
udpOutputSettings) (\s :: OutputSettings
s@OutputSettings' {} Maybe UdpOutputSettings
a -> OutputSettings
s {$sel:udpOutputSettings:OutputSettings' :: Maybe UdpOutputSettings
udpOutputSettings = Maybe UdpOutputSettings
a} :: OutputSettings)

-- | Undocumented member.
outputSettings_msSmoothOutputSettings :: Lens.Lens' OutputSettings (Prelude.Maybe MsSmoothOutputSettings)
outputSettings_msSmoothOutputSettings :: (Maybe MsSmoothOutputSettings -> f (Maybe MsSmoothOutputSettings))
-> OutputSettings -> f OutputSettings
outputSettings_msSmoothOutputSettings = (OutputSettings -> Maybe MsSmoothOutputSettings)
-> (OutputSettings
    -> Maybe MsSmoothOutputSettings -> OutputSettings)
-> Lens
     OutputSettings
     OutputSettings
     (Maybe MsSmoothOutputSettings)
     (Maybe MsSmoothOutputSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputSettings' {Maybe MsSmoothOutputSettings
msSmoothOutputSettings :: Maybe MsSmoothOutputSettings
$sel:msSmoothOutputSettings:OutputSettings' :: OutputSettings -> Maybe MsSmoothOutputSettings
msSmoothOutputSettings} -> Maybe MsSmoothOutputSettings
msSmoothOutputSettings) (\s :: OutputSettings
s@OutputSettings' {} Maybe MsSmoothOutputSettings
a -> OutputSettings
s {$sel:msSmoothOutputSettings:OutputSettings' :: Maybe MsSmoothOutputSettings
msSmoothOutputSettings = Maybe MsSmoothOutputSettings
a} :: OutputSettings)

instance Core.FromJSON OutputSettings where
  parseJSON :: Value -> Parser OutputSettings
parseJSON =
    String
-> (Object -> Parser OutputSettings)
-> Value
-> Parser OutputSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"OutputSettings"
      ( \Object
x ->
          Maybe MultiplexOutputSettings
-> Maybe ArchiveOutputSettings
-> Maybe RtmpOutputSettings
-> Maybe MediaPackageOutputSettings
-> Maybe HlsOutputSettings
-> Maybe FrameCaptureOutputSettings
-> Maybe UdpOutputSettings
-> Maybe MsSmoothOutputSettings
-> OutputSettings
OutputSettings'
            (Maybe MultiplexOutputSettings
 -> Maybe ArchiveOutputSettings
 -> Maybe RtmpOutputSettings
 -> Maybe MediaPackageOutputSettings
 -> Maybe HlsOutputSettings
 -> Maybe FrameCaptureOutputSettings
 -> Maybe UdpOutputSettings
 -> Maybe MsSmoothOutputSettings
 -> OutputSettings)
-> Parser (Maybe MultiplexOutputSettings)
-> Parser
     (Maybe ArchiveOutputSettings
      -> Maybe RtmpOutputSettings
      -> Maybe MediaPackageOutputSettings
      -> Maybe HlsOutputSettings
      -> Maybe FrameCaptureOutputSettings
      -> Maybe UdpOutputSettings
      -> Maybe MsSmoothOutputSettings
      -> OutputSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MultiplexOutputSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"multiplexOutputSettings")
            Parser
  (Maybe ArchiveOutputSettings
   -> Maybe RtmpOutputSettings
   -> Maybe MediaPackageOutputSettings
   -> Maybe HlsOutputSettings
   -> Maybe FrameCaptureOutputSettings
   -> Maybe UdpOutputSettings
   -> Maybe MsSmoothOutputSettings
   -> OutputSettings)
-> Parser (Maybe ArchiveOutputSettings)
-> Parser
     (Maybe RtmpOutputSettings
      -> Maybe MediaPackageOutputSettings
      -> Maybe HlsOutputSettings
      -> Maybe FrameCaptureOutputSettings
      -> Maybe UdpOutputSettings
      -> Maybe MsSmoothOutputSettings
      -> OutputSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ArchiveOutputSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"archiveOutputSettings")
            Parser
  (Maybe RtmpOutputSettings
   -> Maybe MediaPackageOutputSettings
   -> Maybe HlsOutputSettings
   -> Maybe FrameCaptureOutputSettings
   -> Maybe UdpOutputSettings
   -> Maybe MsSmoothOutputSettings
   -> OutputSettings)
-> Parser (Maybe RtmpOutputSettings)
-> Parser
     (Maybe MediaPackageOutputSettings
      -> Maybe HlsOutputSettings
      -> Maybe FrameCaptureOutputSettings
      -> Maybe UdpOutputSettings
      -> Maybe MsSmoothOutputSettings
      -> OutputSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RtmpOutputSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"rtmpOutputSettings")
            Parser
  (Maybe MediaPackageOutputSettings
   -> Maybe HlsOutputSettings
   -> Maybe FrameCaptureOutputSettings
   -> Maybe UdpOutputSettings
   -> Maybe MsSmoothOutputSettings
   -> OutputSettings)
-> Parser (Maybe MediaPackageOutputSettings)
-> Parser
     (Maybe HlsOutputSettings
      -> Maybe FrameCaptureOutputSettings
      -> Maybe UdpOutputSettings
      -> Maybe MsSmoothOutputSettings
      -> OutputSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MediaPackageOutputSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mediaPackageOutputSettings")
            Parser
  (Maybe HlsOutputSettings
   -> Maybe FrameCaptureOutputSettings
   -> Maybe UdpOutputSettings
   -> Maybe MsSmoothOutputSettings
   -> OutputSettings)
-> Parser (Maybe HlsOutputSettings)
-> Parser
     (Maybe FrameCaptureOutputSettings
      -> Maybe UdpOutputSettings
      -> Maybe MsSmoothOutputSettings
      -> OutputSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HlsOutputSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hlsOutputSettings")
            Parser
  (Maybe FrameCaptureOutputSettings
   -> Maybe UdpOutputSettings
   -> Maybe MsSmoothOutputSettings
   -> OutputSettings)
-> Parser (Maybe FrameCaptureOutputSettings)
-> Parser
     (Maybe UdpOutputSettings
      -> Maybe MsSmoothOutputSettings -> OutputSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FrameCaptureOutputSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"frameCaptureOutputSettings")
            Parser
  (Maybe UdpOutputSettings
   -> Maybe MsSmoothOutputSettings -> OutputSettings)
-> Parser (Maybe UdpOutputSettings)
-> Parser (Maybe MsSmoothOutputSettings -> OutputSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe UdpOutputSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"udpOutputSettings")
            Parser (Maybe MsSmoothOutputSettings -> OutputSettings)
-> Parser (Maybe MsSmoothOutputSettings) -> Parser OutputSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MsSmoothOutputSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"msSmoothOutputSettings")
      )

instance Prelude.Hashable OutputSettings

instance Prelude.NFData OutputSettings

instance Core.ToJSON OutputSettings where
  toJSON :: OutputSettings -> Value
toJSON OutputSettings' {Maybe FrameCaptureOutputSettings
Maybe MediaPackageOutputSettings
Maybe MsSmoothOutputSettings
Maybe MultiplexOutputSettings
Maybe ArchiveOutputSettings
Maybe RtmpOutputSettings
Maybe HlsOutputSettings
Maybe UdpOutputSettings
msSmoothOutputSettings :: Maybe MsSmoothOutputSettings
udpOutputSettings :: Maybe UdpOutputSettings
frameCaptureOutputSettings :: Maybe FrameCaptureOutputSettings
hlsOutputSettings :: Maybe HlsOutputSettings
mediaPackageOutputSettings :: Maybe MediaPackageOutputSettings
rtmpOutputSettings :: Maybe RtmpOutputSettings
archiveOutputSettings :: Maybe ArchiveOutputSettings
multiplexOutputSettings :: Maybe MultiplexOutputSettings
$sel:msSmoothOutputSettings:OutputSettings' :: OutputSettings -> Maybe MsSmoothOutputSettings
$sel:udpOutputSettings:OutputSettings' :: OutputSettings -> Maybe UdpOutputSettings
$sel:frameCaptureOutputSettings:OutputSettings' :: OutputSettings -> Maybe FrameCaptureOutputSettings
$sel:hlsOutputSettings:OutputSettings' :: OutputSettings -> Maybe HlsOutputSettings
$sel:mediaPackageOutputSettings:OutputSettings' :: OutputSettings -> Maybe MediaPackageOutputSettings
$sel:rtmpOutputSettings:OutputSettings' :: OutputSettings -> Maybe RtmpOutputSettings
$sel:archiveOutputSettings:OutputSettings' :: OutputSettings -> Maybe ArchiveOutputSettings
$sel:multiplexOutputSettings:OutputSettings' :: OutputSettings -> Maybe MultiplexOutputSettings
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"multiplexOutputSettings" Text -> MultiplexOutputSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MultiplexOutputSettings -> Pair)
-> Maybe MultiplexOutputSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MultiplexOutputSettings
multiplexOutputSettings,
            (Text
"archiveOutputSettings" Text -> ArchiveOutputSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ArchiveOutputSettings -> Pair)
-> Maybe ArchiveOutputSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ArchiveOutputSettings
archiveOutputSettings,
            (Text
"rtmpOutputSettings" Text -> RtmpOutputSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (RtmpOutputSettings -> Pair)
-> Maybe RtmpOutputSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RtmpOutputSettings
rtmpOutputSettings,
            (Text
"mediaPackageOutputSettings" Text -> MediaPackageOutputSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MediaPackageOutputSettings -> Pair)
-> Maybe MediaPackageOutputSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MediaPackageOutputSettings
mediaPackageOutputSettings,
            (Text
"hlsOutputSettings" Text -> HlsOutputSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HlsOutputSettings -> Pair)
-> Maybe HlsOutputSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HlsOutputSettings
hlsOutputSettings,
            (Text
"frameCaptureOutputSettings" Text -> FrameCaptureOutputSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (FrameCaptureOutputSettings -> Pair)
-> Maybe FrameCaptureOutputSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FrameCaptureOutputSettings
frameCaptureOutputSettings,
            (Text
"udpOutputSettings" Text -> UdpOutputSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (UdpOutputSettings -> Pair)
-> Maybe UdpOutputSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UdpOutputSettings
udpOutputSettings,
            (Text
"msSmoothOutputSettings" Text -> MsSmoothOutputSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MsSmoothOutputSettings -> Pair)
-> Maybe MsSmoothOutputSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MsSmoothOutputSettings
msSmoothOutputSettings
          ]
      )