{-# 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.MsSmoothGroupSettings
-- 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.MediaConvert.Types.MsSmoothGroupSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.DestinationSettings
import Amazonka.MediaConvert.Types.MsSmoothAdditionalManifest
import Amazonka.MediaConvert.Types.MsSmoothAudioDeduplication
import Amazonka.MediaConvert.Types.MsSmoothEncryptionSettings
import Amazonka.MediaConvert.Types.MsSmoothFragmentLengthControl
import Amazonka.MediaConvert.Types.MsSmoothManifestEncoding
import qualified Amazonka.Prelude as Prelude

-- | Settings related to your Microsoft Smooth Streaming output package. For
-- more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/outputs-file-ABR.html.
-- When you work directly in your JSON job specification, include this
-- object and any required children when you set Type, under
-- OutputGroupSettings, to MS_SMOOTH_GROUP_SETTINGS.
--
-- /See:/ 'newMsSmoothGroupSettings' smart constructor.
data MsSmoothGroupSettings = MsSmoothGroupSettings'
  { -- | Specify how you want MediaConvert to determine the fragment length.
    -- Choose Exact (EXACT) to have the encoder use the exact length that you
    -- specify with the setting Fragment length (FragmentLength). This might
    -- result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have
    -- the encoder round up the segment lengths to match the next GOP boundary.
    MsSmoothGroupSettings -> Maybe Natural
fragmentLength :: Prelude.Maybe Prelude.Natural,
    -- | Use Manifest encoding (MsSmoothManifestEncoding) to specify the encoding
    -- format for the server and client manifest. Valid options are utf8 and
    -- utf16.
    MsSmoothGroupSettings -> Maybe MsSmoothManifestEncoding
manifestEncoding :: Prelude.Maybe MsSmoothManifestEncoding,
    -- | Use Destination (Destination) to specify the S3 output location and the
    -- output filename base. Destination accepts format identifiers. If you do
    -- not specify the base filename in the URI, the service will use the
    -- filename of the input file. If your job has multiple inputs, the service
    -- uses the filename of the first input file.
    MsSmoothGroupSettings -> Maybe Text
destination :: Prelude.Maybe Prelude.Text,
    -- | COMBINE_DUPLICATE_STREAMS combines identical audio encoding settings
    -- across a Microsoft Smooth output group into a single audio stream.
    MsSmoothGroupSettings -> Maybe MsSmoothAudioDeduplication
audioDeduplication :: Prelude.Maybe MsSmoothAudioDeduplication,
    -- | By default, the service creates one .ism Microsoft Smooth Streaming
    -- manifest for each Microsoft Smooth Streaming output group in your job.
    -- This default manifest references every output in the output group. To
    -- create additional manifests that reference a subset of the outputs in
    -- the output group, specify a list of them here.
    MsSmoothGroupSettings -> Maybe [MsSmoothAdditionalManifest]
additionalManifests :: Prelude.Maybe [MsSmoothAdditionalManifest],
    -- | Specify how you want MediaConvert to determine the fragment length.
    -- Choose Exact (EXACT) to have the encoder use the exact length that you
    -- specify with the setting Fragment length (FragmentLength). This might
    -- result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have
    -- the encoder round up the segment lengths to match the next GOP boundary.
    MsSmoothGroupSettings -> Maybe MsSmoothFragmentLengthControl
fragmentLengthControl :: Prelude.Maybe MsSmoothFragmentLengthControl,
    -- | Settings associated with the destination. Will vary based on the type of
    -- destination
    MsSmoothGroupSettings -> Maybe DestinationSettings
destinationSettings :: Prelude.Maybe DestinationSettings,
    -- | If you are using DRM, set DRM System (MsSmoothEncryptionSettings) to
    -- specify the value SpekeKeyProvider.
    MsSmoothGroupSettings -> Maybe MsSmoothEncryptionSettings
encryption :: Prelude.Maybe MsSmoothEncryptionSettings
  }
  deriving (MsSmoothGroupSettings -> MsSmoothGroupSettings -> Bool
(MsSmoothGroupSettings -> MsSmoothGroupSettings -> Bool)
-> (MsSmoothGroupSettings -> MsSmoothGroupSettings -> Bool)
-> Eq MsSmoothGroupSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsSmoothGroupSettings -> MsSmoothGroupSettings -> Bool
$c/= :: MsSmoothGroupSettings -> MsSmoothGroupSettings -> Bool
== :: MsSmoothGroupSettings -> MsSmoothGroupSettings -> Bool
$c== :: MsSmoothGroupSettings -> MsSmoothGroupSettings -> Bool
Prelude.Eq, ReadPrec [MsSmoothGroupSettings]
ReadPrec MsSmoothGroupSettings
Int -> ReadS MsSmoothGroupSettings
ReadS [MsSmoothGroupSettings]
(Int -> ReadS MsSmoothGroupSettings)
-> ReadS [MsSmoothGroupSettings]
-> ReadPrec MsSmoothGroupSettings
-> ReadPrec [MsSmoothGroupSettings]
-> Read MsSmoothGroupSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsSmoothGroupSettings]
$creadListPrec :: ReadPrec [MsSmoothGroupSettings]
readPrec :: ReadPrec MsSmoothGroupSettings
$creadPrec :: ReadPrec MsSmoothGroupSettings
readList :: ReadS [MsSmoothGroupSettings]
$creadList :: ReadS [MsSmoothGroupSettings]
readsPrec :: Int -> ReadS MsSmoothGroupSettings
$creadsPrec :: Int -> ReadS MsSmoothGroupSettings
Prelude.Read, Int -> MsSmoothGroupSettings -> ShowS
[MsSmoothGroupSettings] -> ShowS
MsSmoothGroupSettings -> String
(Int -> MsSmoothGroupSettings -> ShowS)
-> (MsSmoothGroupSettings -> String)
-> ([MsSmoothGroupSettings] -> ShowS)
-> Show MsSmoothGroupSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsSmoothGroupSettings] -> ShowS
$cshowList :: [MsSmoothGroupSettings] -> ShowS
show :: MsSmoothGroupSettings -> String
$cshow :: MsSmoothGroupSettings -> String
showsPrec :: Int -> MsSmoothGroupSettings -> ShowS
$cshowsPrec :: Int -> MsSmoothGroupSettings -> ShowS
Prelude.Show, (forall x. MsSmoothGroupSettings -> Rep MsSmoothGroupSettings x)
-> (forall x. Rep MsSmoothGroupSettings x -> MsSmoothGroupSettings)
-> Generic MsSmoothGroupSettings
forall x. Rep MsSmoothGroupSettings x -> MsSmoothGroupSettings
forall x. MsSmoothGroupSettings -> Rep MsSmoothGroupSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MsSmoothGroupSettings x -> MsSmoothGroupSettings
$cfrom :: forall x. MsSmoothGroupSettings -> Rep MsSmoothGroupSettings x
Prelude.Generic)

-- |
-- Create a value of 'MsSmoothGroupSettings' 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:
--
-- 'fragmentLength', 'msSmoothGroupSettings_fragmentLength' - Specify how you want MediaConvert to determine the fragment length.
-- Choose Exact (EXACT) to have the encoder use the exact length that you
-- specify with the setting Fragment length (FragmentLength). This might
-- result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have
-- the encoder round up the segment lengths to match the next GOP boundary.
--
-- 'manifestEncoding', 'msSmoothGroupSettings_manifestEncoding' - Use Manifest encoding (MsSmoothManifestEncoding) to specify the encoding
-- format for the server and client manifest. Valid options are utf8 and
-- utf16.
--
-- 'destination', 'msSmoothGroupSettings_destination' - Use Destination (Destination) to specify the S3 output location and the
-- output filename base. Destination accepts format identifiers. If you do
-- not specify the base filename in the URI, the service will use the
-- filename of the input file. If your job has multiple inputs, the service
-- uses the filename of the first input file.
--
-- 'audioDeduplication', 'msSmoothGroupSettings_audioDeduplication' - COMBINE_DUPLICATE_STREAMS combines identical audio encoding settings
-- across a Microsoft Smooth output group into a single audio stream.
--
-- 'additionalManifests', 'msSmoothGroupSettings_additionalManifests' - By default, the service creates one .ism Microsoft Smooth Streaming
-- manifest for each Microsoft Smooth Streaming output group in your job.
-- This default manifest references every output in the output group. To
-- create additional manifests that reference a subset of the outputs in
-- the output group, specify a list of them here.
--
-- 'fragmentLengthControl', 'msSmoothGroupSettings_fragmentLengthControl' - Specify how you want MediaConvert to determine the fragment length.
-- Choose Exact (EXACT) to have the encoder use the exact length that you
-- specify with the setting Fragment length (FragmentLength). This might
-- result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have
-- the encoder round up the segment lengths to match the next GOP boundary.
--
-- 'destinationSettings', 'msSmoothGroupSettings_destinationSettings' - Settings associated with the destination. Will vary based on the type of
-- destination
--
-- 'encryption', 'msSmoothGroupSettings_encryption' - If you are using DRM, set DRM System (MsSmoothEncryptionSettings) to
-- specify the value SpekeKeyProvider.
newMsSmoothGroupSettings ::
  MsSmoothGroupSettings
newMsSmoothGroupSettings :: MsSmoothGroupSettings
newMsSmoothGroupSettings =
  MsSmoothGroupSettings' :: Maybe Natural
-> Maybe MsSmoothManifestEncoding
-> Maybe Text
-> Maybe MsSmoothAudioDeduplication
-> Maybe [MsSmoothAdditionalManifest]
-> Maybe MsSmoothFragmentLengthControl
-> Maybe DestinationSettings
-> Maybe MsSmoothEncryptionSettings
-> MsSmoothGroupSettings
MsSmoothGroupSettings'
    { $sel:fragmentLength:MsSmoothGroupSettings' :: Maybe Natural
fragmentLength =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:manifestEncoding:MsSmoothGroupSettings' :: Maybe MsSmoothManifestEncoding
manifestEncoding = Maybe MsSmoothManifestEncoding
forall a. Maybe a
Prelude.Nothing,
      $sel:destination:MsSmoothGroupSettings' :: Maybe Text
destination = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:audioDeduplication:MsSmoothGroupSettings' :: Maybe MsSmoothAudioDeduplication
audioDeduplication = Maybe MsSmoothAudioDeduplication
forall a. Maybe a
Prelude.Nothing,
      $sel:additionalManifests:MsSmoothGroupSettings' :: Maybe [MsSmoothAdditionalManifest]
additionalManifests = Maybe [MsSmoothAdditionalManifest]
forall a. Maybe a
Prelude.Nothing,
      $sel:fragmentLengthControl:MsSmoothGroupSettings' :: Maybe MsSmoothFragmentLengthControl
fragmentLengthControl = Maybe MsSmoothFragmentLengthControl
forall a. Maybe a
Prelude.Nothing,
      $sel:destinationSettings:MsSmoothGroupSettings' :: Maybe DestinationSettings
destinationSettings = Maybe DestinationSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:encryption:MsSmoothGroupSettings' :: Maybe MsSmoothEncryptionSettings
encryption = Maybe MsSmoothEncryptionSettings
forall a. Maybe a
Prelude.Nothing
    }

-- | Specify how you want MediaConvert to determine the fragment length.
-- Choose Exact (EXACT) to have the encoder use the exact length that you
-- specify with the setting Fragment length (FragmentLength). This might
-- result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have
-- the encoder round up the segment lengths to match the next GOP boundary.
msSmoothGroupSettings_fragmentLength :: Lens.Lens' MsSmoothGroupSettings (Prelude.Maybe Prelude.Natural)
msSmoothGroupSettings_fragmentLength :: (Maybe Natural -> f (Maybe Natural))
-> MsSmoothGroupSettings -> f MsSmoothGroupSettings
msSmoothGroupSettings_fragmentLength = (MsSmoothGroupSettings -> Maybe Natural)
-> (MsSmoothGroupSettings
    -> Maybe Natural -> MsSmoothGroupSettings)
-> Lens
     MsSmoothGroupSettings
     MsSmoothGroupSettings
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MsSmoothGroupSettings' {Maybe Natural
fragmentLength :: Maybe Natural
$sel:fragmentLength:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe Natural
fragmentLength} -> Maybe Natural
fragmentLength) (\s :: MsSmoothGroupSettings
s@MsSmoothGroupSettings' {} Maybe Natural
a -> MsSmoothGroupSettings
s {$sel:fragmentLength:MsSmoothGroupSettings' :: Maybe Natural
fragmentLength = Maybe Natural
a} :: MsSmoothGroupSettings)

-- | Use Manifest encoding (MsSmoothManifestEncoding) to specify the encoding
-- format for the server and client manifest. Valid options are utf8 and
-- utf16.
msSmoothGroupSettings_manifestEncoding :: Lens.Lens' MsSmoothGroupSettings (Prelude.Maybe MsSmoothManifestEncoding)
msSmoothGroupSettings_manifestEncoding :: (Maybe MsSmoothManifestEncoding
 -> f (Maybe MsSmoothManifestEncoding))
-> MsSmoothGroupSettings -> f MsSmoothGroupSettings
msSmoothGroupSettings_manifestEncoding = (MsSmoothGroupSettings -> Maybe MsSmoothManifestEncoding)
-> (MsSmoothGroupSettings
    -> Maybe MsSmoothManifestEncoding -> MsSmoothGroupSettings)
-> Lens
     MsSmoothGroupSettings
     MsSmoothGroupSettings
     (Maybe MsSmoothManifestEncoding)
     (Maybe MsSmoothManifestEncoding)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MsSmoothGroupSettings' {Maybe MsSmoothManifestEncoding
manifestEncoding :: Maybe MsSmoothManifestEncoding
$sel:manifestEncoding:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe MsSmoothManifestEncoding
manifestEncoding} -> Maybe MsSmoothManifestEncoding
manifestEncoding) (\s :: MsSmoothGroupSettings
s@MsSmoothGroupSettings' {} Maybe MsSmoothManifestEncoding
a -> MsSmoothGroupSettings
s {$sel:manifestEncoding:MsSmoothGroupSettings' :: Maybe MsSmoothManifestEncoding
manifestEncoding = Maybe MsSmoothManifestEncoding
a} :: MsSmoothGroupSettings)

-- | Use Destination (Destination) to specify the S3 output location and the
-- output filename base. Destination accepts format identifiers. If you do
-- not specify the base filename in the URI, the service will use the
-- filename of the input file. If your job has multiple inputs, the service
-- uses the filename of the first input file.
msSmoothGroupSettings_destination :: Lens.Lens' MsSmoothGroupSettings (Prelude.Maybe Prelude.Text)
msSmoothGroupSettings_destination :: (Maybe Text -> f (Maybe Text))
-> MsSmoothGroupSettings -> f MsSmoothGroupSettings
msSmoothGroupSettings_destination = (MsSmoothGroupSettings -> Maybe Text)
-> (MsSmoothGroupSettings -> Maybe Text -> MsSmoothGroupSettings)
-> Lens
     MsSmoothGroupSettings
     MsSmoothGroupSettings
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MsSmoothGroupSettings' {Maybe Text
destination :: Maybe Text
$sel:destination:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe Text
destination} -> Maybe Text
destination) (\s :: MsSmoothGroupSettings
s@MsSmoothGroupSettings' {} Maybe Text
a -> MsSmoothGroupSettings
s {$sel:destination:MsSmoothGroupSettings' :: Maybe Text
destination = Maybe Text
a} :: MsSmoothGroupSettings)

-- | COMBINE_DUPLICATE_STREAMS combines identical audio encoding settings
-- across a Microsoft Smooth output group into a single audio stream.
msSmoothGroupSettings_audioDeduplication :: Lens.Lens' MsSmoothGroupSettings (Prelude.Maybe MsSmoothAudioDeduplication)
msSmoothGroupSettings_audioDeduplication :: (Maybe MsSmoothAudioDeduplication
 -> f (Maybe MsSmoothAudioDeduplication))
-> MsSmoothGroupSettings -> f MsSmoothGroupSettings
msSmoothGroupSettings_audioDeduplication = (MsSmoothGroupSettings -> Maybe MsSmoothAudioDeduplication)
-> (MsSmoothGroupSettings
    -> Maybe MsSmoothAudioDeduplication -> MsSmoothGroupSettings)
-> Lens
     MsSmoothGroupSettings
     MsSmoothGroupSettings
     (Maybe MsSmoothAudioDeduplication)
     (Maybe MsSmoothAudioDeduplication)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MsSmoothGroupSettings' {Maybe MsSmoothAudioDeduplication
audioDeduplication :: Maybe MsSmoothAudioDeduplication
$sel:audioDeduplication:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe MsSmoothAudioDeduplication
audioDeduplication} -> Maybe MsSmoothAudioDeduplication
audioDeduplication) (\s :: MsSmoothGroupSettings
s@MsSmoothGroupSettings' {} Maybe MsSmoothAudioDeduplication
a -> MsSmoothGroupSettings
s {$sel:audioDeduplication:MsSmoothGroupSettings' :: Maybe MsSmoothAudioDeduplication
audioDeduplication = Maybe MsSmoothAudioDeduplication
a} :: MsSmoothGroupSettings)

-- | By default, the service creates one .ism Microsoft Smooth Streaming
-- manifest for each Microsoft Smooth Streaming output group in your job.
-- This default manifest references every output in the output group. To
-- create additional manifests that reference a subset of the outputs in
-- the output group, specify a list of them here.
msSmoothGroupSettings_additionalManifests :: Lens.Lens' MsSmoothGroupSettings (Prelude.Maybe [MsSmoothAdditionalManifest])
msSmoothGroupSettings_additionalManifests :: (Maybe [MsSmoothAdditionalManifest]
 -> f (Maybe [MsSmoothAdditionalManifest]))
-> MsSmoothGroupSettings -> f MsSmoothGroupSettings
msSmoothGroupSettings_additionalManifests = (MsSmoothGroupSettings -> Maybe [MsSmoothAdditionalManifest])
-> (MsSmoothGroupSettings
    -> Maybe [MsSmoothAdditionalManifest] -> MsSmoothGroupSettings)
-> Lens
     MsSmoothGroupSettings
     MsSmoothGroupSettings
     (Maybe [MsSmoothAdditionalManifest])
     (Maybe [MsSmoothAdditionalManifest])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MsSmoothGroupSettings' {Maybe [MsSmoothAdditionalManifest]
additionalManifests :: Maybe [MsSmoothAdditionalManifest]
$sel:additionalManifests:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe [MsSmoothAdditionalManifest]
additionalManifests} -> Maybe [MsSmoothAdditionalManifest]
additionalManifests) (\s :: MsSmoothGroupSettings
s@MsSmoothGroupSettings' {} Maybe [MsSmoothAdditionalManifest]
a -> MsSmoothGroupSettings
s {$sel:additionalManifests:MsSmoothGroupSettings' :: Maybe [MsSmoothAdditionalManifest]
additionalManifests = Maybe [MsSmoothAdditionalManifest]
a} :: MsSmoothGroupSettings) ((Maybe [MsSmoothAdditionalManifest]
  -> f (Maybe [MsSmoothAdditionalManifest]))
 -> MsSmoothGroupSettings -> f MsSmoothGroupSettings)
-> ((Maybe [MsSmoothAdditionalManifest]
     -> f (Maybe [MsSmoothAdditionalManifest]))
    -> Maybe [MsSmoothAdditionalManifest]
    -> f (Maybe [MsSmoothAdditionalManifest]))
-> (Maybe [MsSmoothAdditionalManifest]
    -> f (Maybe [MsSmoothAdditionalManifest]))
-> MsSmoothGroupSettings
-> f MsSmoothGroupSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MsSmoothAdditionalManifest]
  [MsSmoothAdditionalManifest]
  [MsSmoothAdditionalManifest]
  [MsSmoothAdditionalManifest]
-> Iso
     (Maybe [MsSmoothAdditionalManifest])
     (Maybe [MsSmoothAdditionalManifest])
     (Maybe [MsSmoothAdditionalManifest])
     (Maybe [MsSmoothAdditionalManifest])
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
  [MsSmoothAdditionalManifest]
  [MsSmoothAdditionalManifest]
  [MsSmoothAdditionalManifest]
  [MsSmoothAdditionalManifest]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specify how you want MediaConvert to determine the fragment length.
-- Choose Exact (EXACT) to have the encoder use the exact length that you
-- specify with the setting Fragment length (FragmentLength). This might
-- result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have
-- the encoder round up the segment lengths to match the next GOP boundary.
msSmoothGroupSettings_fragmentLengthControl :: Lens.Lens' MsSmoothGroupSettings (Prelude.Maybe MsSmoothFragmentLengthControl)
msSmoothGroupSettings_fragmentLengthControl :: (Maybe MsSmoothFragmentLengthControl
 -> f (Maybe MsSmoothFragmentLengthControl))
-> MsSmoothGroupSettings -> f MsSmoothGroupSettings
msSmoothGroupSettings_fragmentLengthControl = (MsSmoothGroupSettings -> Maybe MsSmoothFragmentLengthControl)
-> (MsSmoothGroupSettings
    -> Maybe MsSmoothFragmentLengthControl -> MsSmoothGroupSettings)
-> Lens
     MsSmoothGroupSettings
     MsSmoothGroupSettings
     (Maybe MsSmoothFragmentLengthControl)
     (Maybe MsSmoothFragmentLengthControl)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MsSmoothGroupSettings' {Maybe MsSmoothFragmentLengthControl
fragmentLengthControl :: Maybe MsSmoothFragmentLengthControl
$sel:fragmentLengthControl:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe MsSmoothFragmentLengthControl
fragmentLengthControl} -> Maybe MsSmoothFragmentLengthControl
fragmentLengthControl) (\s :: MsSmoothGroupSettings
s@MsSmoothGroupSettings' {} Maybe MsSmoothFragmentLengthControl
a -> MsSmoothGroupSettings
s {$sel:fragmentLengthControl:MsSmoothGroupSettings' :: Maybe MsSmoothFragmentLengthControl
fragmentLengthControl = Maybe MsSmoothFragmentLengthControl
a} :: MsSmoothGroupSettings)

-- | Settings associated with the destination. Will vary based on the type of
-- destination
msSmoothGroupSettings_destinationSettings :: Lens.Lens' MsSmoothGroupSettings (Prelude.Maybe DestinationSettings)
msSmoothGroupSettings_destinationSettings :: (Maybe DestinationSettings -> f (Maybe DestinationSettings))
-> MsSmoothGroupSettings -> f MsSmoothGroupSettings
msSmoothGroupSettings_destinationSettings = (MsSmoothGroupSettings -> Maybe DestinationSettings)
-> (MsSmoothGroupSettings
    -> Maybe DestinationSettings -> MsSmoothGroupSettings)
-> Lens
     MsSmoothGroupSettings
     MsSmoothGroupSettings
     (Maybe DestinationSettings)
     (Maybe DestinationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MsSmoothGroupSettings' {Maybe DestinationSettings
destinationSettings :: Maybe DestinationSettings
$sel:destinationSettings:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe DestinationSettings
destinationSettings} -> Maybe DestinationSettings
destinationSettings) (\s :: MsSmoothGroupSettings
s@MsSmoothGroupSettings' {} Maybe DestinationSettings
a -> MsSmoothGroupSettings
s {$sel:destinationSettings:MsSmoothGroupSettings' :: Maybe DestinationSettings
destinationSettings = Maybe DestinationSettings
a} :: MsSmoothGroupSettings)

-- | If you are using DRM, set DRM System (MsSmoothEncryptionSettings) to
-- specify the value SpekeKeyProvider.
msSmoothGroupSettings_encryption :: Lens.Lens' MsSmoothGroupSettings (Prelude.Maybe MsSmoothEncryptionSettings)
msSmoothGroupSettings_encryption :: (Maybe MsSmoothEncryptionSettings
 -> f (Maybe MsSmoothEncryptionSettings))
-> MsSmoothGroupSettings -> f MsSmoothGroupSettings
msSmoothGroupSettings_encryption = (MsSmoothGroupSettings -> Maybe MsSmoothEncryptionSettings)
-> (MsSmoothGroupSettings
    -> Maybe MsSmoothEncryptionSettings -> MsSmoothGroupSettings)
-> Lens
     MsSmoothGroupSettings
     MsSmoothGroupSettings
     (Maybe MsSmoothEncryptionSettings)
     (Maybe MsSmoothEncryptionSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MsSmoothGroupSettings' {Maybe MsSmoothEncryptionSettings
encryption :: Maybe MsSmoothEncryptionSettings
$sel:encryption:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe MsSmoothEncryptionSettings
encryption} -> Maybe MsSmoothEncryptionSettings
encryption) (\s :: MsSmoothGroupSettings
s@MsSmoothGroupSettings' {} Maybe MsSmoothEncryptionSettings
a -> MsSmoothGroupSettings
s {$sel:encryption:MsSmoothGroupSettings' :: Maybe MsSmoothEncryptionSettings
encryption = Maybe MsSmoothEncryptionSettings
a} :: MsSmoothGroupSettings)

instance Core.FromJSON MsSmoothGroupSettings where
  parseJSON :: Value -> Parser MsSmoothGroupSettings
parseJSON =
    String
-> (Object -> Parser MsSmoothGroupSettings)
-> Value
-> Parser MsSmoothGroupSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MsSmoothGroupSettings"
      ( \Object
x ->
          Maybe Natural
-> Maybe MsSmoothManifestEncoding
-> Maybe Text
-> Maybe MsSmoothAudioDeduplication
-> Maybe [MsSmoothAdditionalManifest]
-> Maybe MsSmoothFragmentLengthControl
-> Maybe DestinationSettings
-> Maybe MsSmoothEncryptionSettings
-> MsSmoothGroupSettings
MsSmoothGroupSettings'
            (Maybe Natural
 -> Maybe MsSmoothManifestEncoding
 -> Maybe Text
 -> Maybe MsSmoothAudioDeduplication
 -> Maybe [MsSmoothAdditionalManifest]
 -> Maybe MsSmoothFragmentLengthControl
 -> Maybe DestinationSettings
 -> Maybe MsSmoothEncryptionSettings
 -> MsSmoothGroupSettings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe MsSmoothManifestEncoding
      -> Maybe Text
      -> Maybe MsSmoothAudioDeduplication
      -> Maybe [MsSmoothAdditionalManifest]
      -> Maybe MsSmoothFragmentLengthControl
      -> Maybe DestinationSettings
      -> Maybe MsSmoothEncryptionSettings
      -> MsSmoothGroupSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"fragmentLength")
            Parser
  (Maybe MsSmoothManifestEncoding
   -> Maybe Text
   -> Maybe MsSmoothAudioDeduplication
   -> Maybe [MsSmoothAdditionalManifest]
   -> Maybe MsSmoothFragmentLengthControl
   -> Maybe DestinationSettings
   -> Maybe MsSmoothEncryptionSettings
   -> MsSmoothGroupSettings)
-> Parser (Maybe MsSmoothManifestEncoding)
-> Parser
     (Maybe Text
      -> Maybe MsSmoothAudioDeduplication
      -> Maybe [MsSmoothAdditionalManifest]
      -> Maybe MsSmoothFragmentLengthControl
      -> Maybe DestinationSettings
      -> Maybe MsSmoothEncryptionSettings
      -> MsSmoothGroupSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MsSmoothManifestEncoding)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"manifestEncoding")
            Parser
  (Maybe Text
   -> Maybe MsSmoothAudioDeduplication
   -> Maybe [MsSmoothAdditionalManifest]
   -> Maybe MsSmoothFragmentLengthControl
   -> Maybe DestinationSettings
   -> Maybe MsSmoothEncryptionSettings
   -> MsSmoothGroupSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe MsSmoothAudioDeduplication
      -> Maybe [MsSmoothAdditionalManifest]
      -> Maybe MsSmoothFragmentLengthControl
      -> Maybe DestinationSettings
      -> Maybe MsSmoothEncryptionSettings
      -> MsSmoothGroupSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"destination")
            Parser
  (Maybe MsSmoothAudioDeduplication
   -> Maybe [MsSmoothAdditionalManifest]
   -> Maybe MsSmoothFragmentLengthControl
   -> Maybe DestinationSettings
   -> Maybe MsSmoothEncryptionSettings
   -> MsSmoothGroupSettings)
-> Parser (Maybe MsSmoothAudioDeduplication)
-> Parser
     (Maybe [MsSmoothAdditionalManifest]
      -> Maybe MsSmoothFragmentLengthControl
      -> Maybe DestinationSettings
      -> Maybe MsSmoothEncryptionSettings
      -> MsSmoothGroupSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MsSmoothAudioDeduplication)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"audioDeduplication")
            Parser
  (Maybe [MsSmoothAdditionalManifest]
   -> Maybe MsSmoothFragmentLengthControl
   -> Maybe DestinationSettings
   -> Maybe MsSmoothEncryptionSettings
   -> MsSmoothGroupSettings)
-> Parser (Maybe [MsSmoothAdditionalManifest])
-> Parser
     (Maybe MsSmoothFragmentLengthControl
      -> Maybe DestinationSettings
      -> Maybe MsSmoothEncryptionSettings
      -> MsSmoothGroupSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [MsSmoothAdditionalManifest]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"additionalManifests"
                            Parser (Maybe (Maybe [MsSmoothAdditionalManifest]))
-> Maybe [MsSmoothAdditionalManifest]
-> Parser (Maybe [MsSmoothAdditionalManifest])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [MsSmoothAdditionalManifest]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe MsSmoothFragmentLengthControl
   -> Maybe DestinationSettings
   -> Maybe MsSmoothEncryptionSettings
   -> MsSmoothGroupSettings)
-> Parser (Maybe MsSmoothFragmentLengthControl)
-> Parser
     (Maybe DestinationSettings
      -> Maybe MsSmoothEncryptionSettings -> MsSmoothGroupSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MsSmoothFragmentLengthControl)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"fragmentLengthControl")
            Parser
  (Maybe DestinationSettings
   -> Maybe MsSmoothEncryptionSettings -> MsSmoothGroupSettings)
-> Parser (Maybe DestinationSettings)
-> Parser
     (Maybe MsSmoothEncryptionSettings -> MsSmoothGroupSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DestinationSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"destinationSettings")
            Parser (Maybe MsSmoothEncryptionSettings -> MsSmoothGroupSettings)
-> Parser (Maybe MsSmoothEncryptionSettings)
-> Parser MsSmoothGroupSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MsSmoothEncryptionSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"encryption")
      )

instance Prelude.Hashable MsSmoothGroupSettings

instance Prelude.NFData MsSmoothGroupSettings

instance Core.ToJSON MsSmoothGroupSettings where
  toJSON :: MsSmoothGroupSettings -> Value
toJSON MsSmoothGroupSettings' {Maybe Natural
Maybe [MsSmoothAdditionalManifest]
Maybe Text
Maybe MsSmoothAudioDeduplication
Maybe MsSmoothFragmentLengthControl
Maybe MsSmoothManifestEncoding
Maybe DestinationSettings
Maybe MsSmoothEncryptionSettings
encryption :: Maybe MsSmoothEncryptionSettings
destinationSettings :: Maybe DestinationSettings
fragmentLengthControl :: Maybe MsSmoothFragmentLengthControl
additionalManifests :: Maybe [MsSmoothAdditionalManifest]
audioDeduplication :: Maybe MsSmoothAudioDeduplication
destination :: Maybe Text
manifestEncoding :: Maybe MsSmoothManifestEncoding
fragmentLength :: Maybe Natural
$sel:encryption:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe MsSmoothEncryptionSettings
$sel:destinationSettings:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe DestinationSettings
$sel:fragmentLengthControl:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe MsSmoothFragmentLengthControl
$sel:additionalManifests:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe [MsSmoothAdditionalManifest]
$sel:audioDeduplication:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe MsSmoothAudioDeduplication
$sel:destination:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe Text
$sel:manifestEncoding:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe MsSmoothManifestEncoding
$sel:fragmentLength:MsSmoothGroupSettings' :: MsSmoothGroupSettings -> Maybe Natural
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"fragmentLength" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
fragmentLength,
            (Text
"manifestEncoding" Text -> MsSmoothManifestEncoding -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MsSmoothManifestEncoding -> Pair)
-> Maybe MsSmoothManifestEncoding -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MsSmoothManifestEncoding
manifestEncoding,
            (Text
"destination" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
destination,
            (Text
"audioDeduplication" Text -> MsSmoothAudioDeduplication -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MsSmoothAudioDeduplication -> Pair)
-> Maybe MsSmoothAudioDeduplication -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MsSmoothAudioDeduplication
audioDeduplication,
            (Text
"additionalManifests" Text -> [MsSmoothAdditionalManifest] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([MsSmoothAdditionalManifest] -> Pair)
-> Maybe [MsSmoothAdditionalManifest] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [MsSmoothAdditionalManifest]
additionalManifests,
            (Text
"fragmentLengthControl" Text -> MsSmoothFragmentLengthControl -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MsSmoothFragmentLengthControl -> Pair)
-> Maybe MsSmoothFragmentLengthControl -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MsSmoothFragmentLengthControl
fragmentLengthControl,
            (Text
"destinationSettings" Text -> DestinationSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DestinationSettings -> Pair)
-> Maybe DestinationSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DestinationSettings
destinationSettings,
            (Text
"encryption" Text -> MsSmoothEncryptionSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MsSmoothEncryptionSettings -> Pair)
-> Maybe MsSmoothEncryptionSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MsSmoothEncryptionSettings
encryption
          ]
      )