{-# 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.MediaConvert.Types.ContainerSettings
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.ContainerSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types.CmfcSettings
import Amazonka.MediaConvert.Types.ContainerType
import Amazonka.MediaConvert.Types.F4vSettings
import Amazonka.MediaConvert.Types.M2tsSettings
import Amazonka.MediaConvert.Types.M3u8Settings
import Amazonka.MediaConvert.Types.MovSettings
import Amazonka.MediaConvert.Types.Mp4Settings
import Amazonka.MediaConvert.Types.MpdSettings
import Amazonka.MediaConvert.Types.MxfSettings
import qualified Amazonka.Prelude as Prelude

-- | Container specific settings.
--
-- /See:/ 'newContainerSettings' smart constructor.
data ContainerSettings = ContainerSettings'
  { -- | These settings relate to the fragmented MP4 container for the segments
    -- in your CMAF outputs.
    ContainerSettings -> Maybe CmfcSettings
cmfcSettings :: Prelude.Maybe CmfcSettings,
    -- | Container for this output. Some containers require a container settings
    -- object. If not specified, the default object will be created.
    ContainerSettings -> Maybe ContainerType
container :: Prelude.Maybe ContainerType,
    -- | Settings for F4v container
    ContainerSettings -> Maybe F4vSettings
f4vSettings :: Prelude.Maybe F4vSettings,
    -- | MPEG-2 TS container settings. These apply to outputs in a File output
    -- group when the output\'s container (ContainerType) is MPEG-2 Transport
    -- Stream (M2TS). In these assets, data is organized by the program map
    -- table (PMT). Each transport stream program contains subsets of data,
    -- including audio, video, and metadata. Each of these subsets of data has
    -- a numerical label called a packet identifier (PID). Each transport
    -- stream program corresponds to one MediaConvert output. The PMT lists the
    -- types of data in a program along with their PID. Downstream systems and
    -- players use the program map table to look up the PID for each type of
    -- data it accesses and then uses the PIDs to locate specific data within
    -- the asset.
    ContainerSettings -> Maybe M2tsSettings
m2tsSettings :: Prelude.Maybe M2tsSettings,
    -- | These settings relate to the MPEG-2 transport stream (MPEG2-TS)
    -- container for the MPEG2-TS segments in your HLS outputs.
    ContainerSettings -> Maybe M3u8Settings
m3u8Settings :: Prelude.Maybe M3u8Settings,
    -- | These settings relate to your QuickTime MOV output container.
    ContainerSettings -> Maybe MovSettings
movSettings :: Prelude.Maybe MovSettings,
    -- | These settings relate to your MP4 output container. You can create audio
    -- only outputs with this container. For more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/supported-codecs-containers-audio-only.html#output-codecs-and-containers-supported-for-audio-only.
    ContainerSettings -> Maybe Mp4Settings
mp4Settings :: Prelude.Maybe Mp4Settings,
    -- | These settings relate to the fragmented MP4 container for the segments
    -- in your DASH outputs.
    ContainerSettings -> Maybe MpdSettings
mpdSettings :: Prelude.Maybe MpdSettings,
    -- | These settings relate to your MXF output container.
    ContainerSettings -> Maybe MxfSettings
mxfSettings :: Prelude.Maybe MxfSettings
  }
  deriving (ContainerSettings -> ContainerSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContainerSettings -> ContainerSettings -> Bool
$c/= :: ContainerSettings -> ContainerSettings -> Bool
== :: ContainerSettings -> ContainerSettings -> Bool
$c== :: ContainerSettings -> ContainerSettings -> Bool
Prelude.Eq, ReadPrec [ContainerSettings]
ReadPrec ContainerSettings
Int -> ReadS ContainerSettings
ReadS [ContainerSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContainerSettings]
$creadListPrec :: ReadPrec [ContainerSettings]
readPrec :: ReadPrec ContainerSettings
$creadPrec :: ReadPrec ContainerSettings
readList :: ReadS [ContainerSettings]
$creadList :: ReadS [ContainerSettings]
readsPrec :: Int -> ReadS ContainerSettings
$creadsPrec :: Int -> ReadS ContainerSettings
Prelude.Read, Int -> ContainerSettings -> ShowS
[ContainerSettings] -> ShowS
ContainerSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContainerSettings] -> ShowS
$cshowList :: [ContainerSettings] -> ShowS
show :: ContainerSettings -> String
$cshow :: ContainerSettings -> String
showsPrec :: Int -> ContainerSettings -> ShowS
$cshowsPrec :: Int -> ContainerSettings -> ShowS
Prelude.Show, forall x. Rep ContainerSettings x -> ContainerSettings
forall x. ContainerSettings -> Rep ContainerSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContainerSettings x -> ContainerSettings
$cfrom :: forall x. ContainerSettings -> Rep ContainerSettings x
Prelude.Generic)

-- |
-- Create a value of 'ContainerSettings' 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:
--
-- 'cmfcSettings', 'containerSettings_cmfcSettings' - These settings relate to the fragmented MP4 container for the segments
-- in your CMAF outputs.
--
-- 'container', 'containerSettings_container' - Container for this output. Some containers require a container settings
-- object. If not specified, the default object will be created.
--
-- 'f4vSettings', 'containerSettings_f4vSettings' - Settings for F4v container
--
-- 'm2tsSettings', 'containerSettings_m2tsSettings' - MPEG-2 TS container settings. These apply to outputs in a File output
-- group when the output\'s container (ContainerType) is MPEG-2 Transport
-- Stream (M2TS). In these assets, data is organized by the program map
-- table (PMT). Each transport stream program contains subsets of data,
-- including audio, video, and metadata. Each of these subsets of data has
-- a numerical label called a packet identifier (PID). Each transport
-- stream program corresponds to one MediaConvert output. The PMT lists the
-- types of data in a program along with their PID. Downstream systems and
-- players use the program map table to look up the PID for each type of
-- data it accesses and then uses the PIDs to locate specific data within
-- the asset.
--
-- 'm3u8Settings', 'containerSettings_m3u8Settings' - These settings relate to the MPEG-2 transport stream (MPEG2-TS)
-- container for the MPEG2-TS segments in your HLS outputs.
--
-- 'movSettings', 'containerSettings_movSettings' - These settings relate to your QuickTime MOV output container.
--
-- 'mp4Settings', 'containerSettings_mp4Settings' - These settings relate to your MP4 output container. You can create audio
-- only outputs with this container. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/supported-codecs-containers-audio-only.html#output-codecs-and-containers-supported-for-audio-only.
--
-- 'mpdSettings', 'containerSettings_mpdSettings' - These settings relate to the fragmented MP4 container for the segments
-- in your DASH outputs.
--
-- 'mxfSettings', 'containerSettings_mxfSettings' - These settings relate to your MXF output container.
newContainerSettings ::
  ContainerSettings
newContainerSettings :: ContainerSettings
newContainerSettings =
  ContainerSettings'
    { $sel:cmfcSettings:ContainerSettings' :: Maybe CmfcSettings
cmfcSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:container:ContainerSettings' :: Maybe ContainerType
container = forall a. Maybe a
Prelude.Nothing,
      $sel:f4vSettings:ContainerSettings' :: Maybe F4vSettings
f4vSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:m2tsSettings:ContainerSettings' :: Maybe M2tsSettings
m2tsSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:m3u8Settings:ContainerSettings' :: Maybe M3u8Settings
m3u8Settings = forall a. Maybe a
Prelude.Nothing,
      $sel:movSettings:ContainerSettings' :: Maybe MovSettings
movSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:mp4Settings:ContainerSettings' :: Maybe Mp4Settings
mp4Settings = forall a. Maybe a
Prelude.Nothing,
      $sel:mpdSettings:ContainerSettings' :: Maybe MpdSettings
mpdSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:mxfSettings:ContainerSettings' :: Maybe MxfSettings
mxfSettings = forall a. Maybe a
Prelude.Nothing
    }

-- | These settings relate to the fragmented MP4 container for the segments
-- in your CMAF outputs.
containerSettings_cmfcSettings :: Lens.Lens' ContainerSettings (Prelude.Maybe CmfcSettings)
containerSettings_cmfcSettings :: Lens' ContainerSettings (Maybe CmfcSettings)
containerSettings_cmfcSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerSettings' {Maybe CmfcSettings
cmfcSettings :: Maybe CmfcSettings
$sel:cmfcSettings:ContainerSettings' :: ContainerSettings -> Maybe CmfcSettings
cmfcSettings} -> Maybe CmfcSettings
cmfcSettings) (\s :: ContainerSettings
s@ContainerSettings' {} Maybe CmfcSettings
a -> ContainerSettings
s {$sel:cmfcSettings:ContainerSettings' :: Maybe CmfcSettings
cmfcSettings = Maybe CmfcSettings
a} :: ContainerSettings)

-- | Container for this output. Some containers require a container settings
-- object. If not specified, the default object will be created.
containerSettings_container :: Lens.Lens' ContainerSettings (Prelude.Maybe ContainerType)
containerSettings_container :: Lens' ContainerSettings (Maybe ContainerType)
containerSettings_container = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerSettings' {Maybe ContainerType
container :: Maybe ContainerType
$sel:container:ContainerSettings' :: ContainerSettings -> Maybe ContainerType
container} -> Maybe ContainerType
container) (\s :: ContainerSettings
s@ContainerSettings' {} Maybe ContainerType
a -> ContainerSettings
s {$sel:container:ContainerSettings' :: Maybe ContainerType
container = Maybe ContainerType
a} :: ContainerSettings)

-- | Settings for F4v container
containerSettings_f4vSettings :: Lens.Lens' ContainerSettings (Prelude.Maybe F4vSettings)
containerSettings_f4vSettings :: Lens' ContainerSettings (Maybe F4vSettings)
containerSettings_f4vSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerSettings' {Maybe F4vSettings
f4vSettings :: Maybe F4vSettings
$sel:f4vSettings:ContainerSettings' :: ContainerSettings -> Maybe F4vSettings
f4vSettings} -> Maybe F4vSettings
f4vSettings) (\s :: ContainerSettings
s@ContainerSettings' {} Maybe F4vSettings
a -> ContainerSettings
s {$sel:f4vSettings:ContainerSettings' :: Maybe F4vSettings
f4vSettings = Maybe F4vSettings
a} :: ContainerSettings)

-- | MPEG-2 TS container settings. These apply to outputs in a File output
-- group when the output\'s container (ContainerType) is MPEG-2 Transport
-- Stream (M2TS). In these assets, data is organized by the program map
-- table (PMT). Each transport stream program contains subsets of data,
-- including audio, video, and metadata. Each of these subsets of data has
-- a numerical label called a packet identifier (PID). Each transport
-- stream program corresponds to one MediaConvert output. The PMT lists the
-- types of data in a program along with their PID. Downstream systems and
-- players use the program map table to look up the PID for each type of
-- data it accesses and then uses the PIDs to locate specific data within
-- the asset.
containerSettings_m2tsSettings :: Lens.Lens' ContainerSettings (Prelude.Maybe M2tsSettings)
containerSettings_m2tsSettings :: Lens' ContainerSettings (Maybe M2tsSettings)
containerSettings_m2tsSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerSettings' {Maybe M2tsSettings
m2tsSettings :: Maybe M2tsSettings
$sel:m2tsSettings:ContainerSettings' :: ContainerSettings -> Maybe M2tsSettings
m2tsSettings} -> Maybe M2tsSettings
m2tsSettings) (\s :: ContainerSettings
s@ContainerSettings' {} Maybe M2tsSettings
a -> ContainerSettings
s {$sel:m2tsSettings:ContainerSettings' :: Maybe M2tsSettings
m2tsSettings = Maybe M2tsSettings
a} :: ContainerSettings)

-- | These settings relate to the MPEG-2 transport stream (MPEG2-TS)
-- container for the MPEG2-TS segments in your HLS outputs.
containerSettings_m3u8Settings :: Lens.Lens' ContainerSettings (Prelude.Maybe M3u8Settings)
containerSettings_m3u8Settings :: Lens' ContainerSettings (Maybe M3u8Settings)
containerSettings_m3u8Settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerSettings' {Maybe M3u8Settings
m3u8Settings :: Maybe M3u8Settings
$sel:m3u8Settings:ContainerSettings' :: ContainerSettings -> Maybe M3u8Settings
m3u8Settings} -> Maybe M3u8Settings
m3u8Settings) (\s :: ContainerSettings
s@ContainerSettings' {} Maybe M3u8Settings
a -> ContainerSettings
s {$sel:m3u8Settings:ContainerSettings' :: Maybe M3u8Settings
m3u8Settings = Maybe M3u8Settings
a} :: ContainerSettings)

-- | These settings relate to your QuickTime MOV output container.
containerSettings_movSettings :: Lens.Lens' ContainerSettings (Prelude.Maybe MovSettings)
containerSettings_movSettings :: Lens' ContainerSettings (Maybe MovSettings)
containerSettings_movSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerSettings' {Maybe MovSettings
movSettings :: Maybe MovSettings
$sel:movSettings:ContainerSettings' :: ContainerSettings -> Maybe MovSettings
movSettings} -> Maybe MovSettings
movSettings) (\s :: ContainerSettings
s@ContainerSettings' {} Maybe MovSettings
a -> ContainerSettings
s {$sel:movSettings:ContainerSettings' :: Maybe MovSettings
movSettings = Maybe MovSettings
a} :: ContainerSettings)

-- | These settings relate to your MP4 output container. You can create audio
-- only outputs with this container. For more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/supported-codecs-containers-audio-only.html#output-codecs-and-containers-supported-for-audio-only.
containerSettings_mp4Settings :: Lens.Lens' ContainerSettings (Prelude.Maybe Mp4Settings)
containerSettings_mp4Settings :: Lens' ContainerSettings (Maybe Mp4Settings)
containerSettings_mp4Settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerSettings' {Maybe Mp4Settings
mp4Settings :: Maybe Mp4Settings
$sel:mp4Settings:ContainerSettings' :: ContainerSettings -> Maybe Mp4Settings
mp4Settings} -> Maybe Mp4Settings
mp4Settings) (\s :: ContainerSettings
s@ContainerSettings' {} Maybe Mp4Settings
a -> ContainerSettings
s {$sel:mp4Settings:ContainerSettings' :: Maybe Mp4Settings
mp4Settings = Maybe Mp4Settings
a} :: ContainerSettings)

-- | These settings relate to the fragmented MP4 container for the segments
-- in your DASH outputs.
containerSettings_mpdSettings :: Lens.Lens' ContainerSettings (Prelude.Maybe MpdSettings)
containerSettings_mpdSettings :: Lens' ContainerSettings (Maybe MpdSettings)
containerSettings_mpdSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerSettings' {Maybe MpdSettings
mpdSettings :: Maybe MpdSettings
$sel:mpdSettings:ContainerSettings' :: ContainerSettings -> Maybe MpdSettings
mpdSettings} -> Maybe MpdSettings
mpdSettings) (\s :: ContainerSettings
s@ContainerSettings' {} Maybe MpdSettings
a -> ContainerSettings
s {$sel:mpdSettings:ContainerSettings' :: Maybe MpdSettings
mpdSettings = Maybe MpdSettings
a} :: ContainerSettings)

-- | These settings relate to your MXF output container.
containerSettings_mxfSettings :: Lens.Lens' ContainerSettings (Prelude.Maybe MxfSettings)
containerSettings_mxfSettings :: Lens' ContainerSettings (Maybe MxfSettings)
containerSettings_mxfSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerSettings' {Maybe MxfSettings
mxfSettings :: Maybe MxfSettings
$sel:mxfSettings:ContainerSettings' :: ContainerSettings -> Maybe MxfSettings
mxfSettings} -> Maybe MxfSettings
mxfSettings) (\s :: ContainerSettings
s@ContainerSettings' {} Maybe MxfSettings
a -> ContainerSettings
s {$sel:mxfSettings:ContainerSettings' :: Maybe MxfSettings
mxfSettings = Maybe MxfSettings
a} :: ContainerSettings)

instance Data.FromJSON ContainerSettings where
  parseJSON :: Value -> Parser ContainerSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ContainerSettings"
      ( \Object
x ->
          Maybe CmfcSettings
-> Maybe ContainerType
-> Maybe F4vSettings
-> Maybe M2tsSettings
-> Maybe M3u8Settings
-> Maybe MovSettings
-> Maybe Mp4Settings
-> Maybe MpdSettings
-> Maybe MxfSettings
-> ContainerSettings
ContainerSettings'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"cmfcSettings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"container")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"f4vSettings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"m2tsSettings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"m3u8Settings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"movSettings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"mp4Settings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"mpdSettings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"mxfSettings")
      )

instance Prelude.Hashable ContainerSettings where
  hashWithSalt :: Int -> ContainerSettings -> Int
hashWithSalt Int
_salt ContainerSettings' {Maybe CmfcSettings
Maybe ContainerType
Maybe F4vSettings
Maybe MovSettings
Maybe Mp4Settings
Maybe MpdSettings
Maybe MxfSettings
Maybe M2tsSettings
Maybe M3u8Settings
mxfSettings :: Maybe MxfSettings
mpdSettings :: Maybe MpdSettings
mp4Settings :: Maybe Mp4Settings
movSettings :: Maybe MovSettings
m3u8Settings :: Maybe M3u8Settings
m2tsSettings :: Maybe M2tsSettings
f4vSettings :: Maybe F4vSettings
container :: Maybe ContainerType
cmfcSettings :: Maybe CmfcSettings
$sel:mxfSettings:ContainerSettings' :: ContainerSettings -> Maybe MxfSettings
$sel:mpdSettings:ContainerSettings' :: ContainerSettings -> Maybe MpdSettings
$sel:mp4Settings:ContainerSettings' :: ContainerSettings -> Maybe Mp4Settings
$sel:movSettings:ContainerSettings' :: ContainerSettings -> Maybe MovSettings
$sel:m3u8Settings:ContainerSettings' :: ContainerSettings -> Maybe M3u8Settings
$sel:m2tsSettings:ContainerSettings' :: ContainerSettings -> Maybe M2tsSettings
$sel:f4vSettings:ContainerSettings' :: ContainerSettings -> Maybe F4vSettings
$sel:container:ContainerSettings' :: ContainerSettings -> Maybe ContainerType
$sel:cmfcSettings:ContainerSettings' :: ContainerSettings -> Maybe CmfcSettings
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CmfcSettings
cmfcSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ContainerType
container
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe F4vSettings
f4vSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe M2tsSettings
m2tsSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe M3u8Settings
m3u8Settings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MovSettings
movSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Mp4Settings
mp4Settings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MpdSettings
mpdSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MxfSettings
mxfSettings

instance Prelude.NFData ContainerSettings where
  rnf :: ContainerSettings -> ()
rnf ContainerSettings' {Maybe CmfcSettings
Maybe ContainerType
Maybe F4vSettings
Maybe MovSettings
Maybe Mp4Settings
Maybe MpdSettings
Maybe MxfSettings
Maybe M2tsSettings
Maybe M3u8Settings
mxfSettings :: Maybe MxfSettings
mpdSettings :: Maybe MpdSettings
mp4Settings :: Maybe Mp4Settings
movSettings :: Maybe MovSettings
m3u8Settings :: Maybe M3u8Settings
m2tsSettings :: Maybe M2tsSettings
f4vSettings :: Maybe F4vSettings
container :: Maybe ContainerType
cmfcSettings :: Maybe CmfcSettings
$sel:mxfSettings:ContainerSettings' :: ContainerSettings -> Maybe MxfSettings
$sel:mpdSettings:ContainerSettings' :: ContainerSettings -> Maybe MpdSettings
$sel:mp4Settings:ContainerSettings' :: ContainerSettings -> Maybe Mp4Settings
$sel:movSettings:ContainerSettings' :: ContainerSettings -> Maybe MovSettings
$sel:m3u8Settings:ContainerSettings' :: ContainerSettings -> Maybe M3u8Settings
$sel:m2tsSettings:ContainerSettings' :: ContainerSettings -> Maybe M2tsSettings
$sel:f4vSettings:ContainerSettings' :: ContainerSettings -> Maybe F4vSettings
$sel:container:ContainerSettings' :: ContainerSettings -> Maybe ContainerType
$sel:cmfcSettings:ContainerSettings' :: ContainerSettings -> Maybe CmfcSettings
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe CmfcSettings
cmfcSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ContainerType
container
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe F4vSettings
f4vSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe M2tsSettings
m2tsSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe M3u8Settings
m3u8Settings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MovSettings
movSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Mp4Settings
mp4Settings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MpdSettings
mpdSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MxfSettings
mxfSettings

instance Data.ToJSON ContainerSettings where
  toJSON :: ContainerSettings -> Value
toJSON ContainerSettings' {Maybe CmfcSettings
Maybe ContainerType
Maybe F4vSettings
Maybe MovSettings
Maybe Mp4Settings
Maybe MpdSettings
Maybe MxfSettings
Maybe M2tsSettings
Maybe M3u8Settings
mxfSettings :: Maybe MxfSettings
mpdSettings :: Maybe MpdSettings
mp4Settings :: Maybe Mp4Settings
movSettings :: Maybe MovSettings
m3u8Settings :: Maybe M3u8Settings
m2tsSettings :: Maybe M2tsSettings
f4vSettings :: Maybe F4vSettings
container :: Maybe ContainerType
cmfcSettings :: Maybe CmfcSettings
$sel:mxfSettings:ContainerSettings' :: ContainerSettings -> Maybe MxfSettings
$sel:mpdSettings:ContainerSettings' :: ContainerSettings -> Maybe MpdSettings
$sel:mp4Settings:ContainerSettings' :: ContainerSettings -> Maybe Mp4Settings
$sel:movSettings:ContainerSettings' :: ContainerSettings -> Maybe MovSettings
$sel:m3u8Settings:ContainerSettings' :: ContainerSettings -> Maybe M3u8Settings
$sel:m2tsSettings:ContainerSettings' :: ContainerSettings -> Maybe M2tsSettings
$sel:f4vSettings:ContainerSettings' :: ContainerSettings -> Maybe F4vSettings
$sel:container:ContainerSettings' :: ContainerSettings -> Maybe ContainerType
$sel:cmfcSettings:ContainerSettings' :: ContainerSettings -> Maybe CmfcSettings
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"cmfcSettings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CmfcSettings
cmfcSettings,
            (Key
"container" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ContainerType
container,
            (Key
"f4vSettings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe F4vSettings
f4vSettings,
            (Key
"m2tsSettings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe M2tsSettings
m2tsSettings,
            (Key
"m3u8Settings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe M3u8Settings
m3u8Settings,
            (Key
"movSettings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MovSettings
movSettings,
            (Key
"mp4Settings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Mp4Settings
mp4Settings,
            (Key
"mpdSettings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MpdSettings
mpdSettings,
            (Key
"mxfSettings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MxfSettings
mxfSettings
          ]
      )