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

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Specify the details for each additional Microsoft Smooth Streaming
-- manifest that you want the service to generate for this output group.
-- Each manifest can reference a different subset of outputs in the group.
--
-- /See:/ 'newMsSmoothAdditionalManifest' smart constructor.
data MsSmoothAdditionalManifest = MsSmoothAdditionalManifest'
  { -- | Specify a name modifier that the service adds to the name of this
    -- manifest to make it different from the file names of the other main
    -- manifests in the output group. For example, say that the default main
    -- manifest for your Microsoft Smooth group is film-name.ismv. If you enter
    -- \"-no-premium\" for this setting, then the file name the service
    -- generates for this top-level manifest is film-name-no-premium.ismv.
    MsSmoothAdditionalManifest -> Maybe Text
manifestNameModifier :: Prelude.Maybe Prelude.Text,
    -- | Specify the outputs that you want this additional top-level manifest to
    -- reference.
    MsSmoothAdditionalManifest -> Maybe [Text]
selectedOutputs :: Prelude.Maybe [Prelude.Text]
  }
  deriving (MsSmoothAdditionalManifest -> MsSmoothAdditionalManifest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MsSmoothAdditionalManifest -> MsSmoothAdditionalManifest -> Bool
$c/= :: MsSmoothAdditionalManifest -> MsSmoothAdditionalManifest -> Bool
== :: MsSmoothAdditionalManifest -> MsSmoothAdditionalManifest -> Bool
$c== :: MsSmoothAdditionalManifest -> MsSmoothAdditionalManifest -> Bool
Prelude.Eq, ReadPrec [MsSmoothAdditionalManifest]
ReadPrec MsSmoothAdditionalManifest
Int -> ReadS MsSmoothAdditionalManifest
ReadS [MsSmoothAdditionalManifest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MsSmoothAdditionalManifest]
$creadListPrec :: ReadPrec [MsSmoothAdditionalManifest]
readPrec :: ReadPrec MsSmoothAdditionalManifest
$creadPrec :: ReadPrec MsSmoothAdditionalManifest
readList :: ReadS [MsSmoothAdditionalManifest]
$creadList :: ReadS [MsSmoothAdditionalManifest]
readsPrec :: Int -> ReadS MsSmoothAdditionalManifest
$creadsPrec :: Int -> ReadS MsSmoothAdditionalManifest
Prelude.Read, Int -> MsSmoothAdditionalManifest -> ShowS
[MsSmoothAdditionalManifest] -> ShowS
MsSmoothAdditionalManifest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MsSmoothAdditionalManifest] -> ShowS
$cshowList :: [MsSmoothAdditionalManifest] -> ShowS
show :: MsSmoothAdditionalManifest -> String
$cshow :: MsSmoothAdditionalManifest -> String
showsPrec :: Int -> MsSmoothAdditionalManifest -> ShowS
$cshowsPrec :: Int -> MsSmoothAdditionalManifest -> ShowS
Prelude.Show, forall x.
Rep MsSmoothAdditionalManifest x -> MsSmoothAdditionalManifest
forall x.
MsSmoothAdditionalManifest -> Rep MsSmoothAdditionalManifest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MsSmoothAdditionalManifest x -> MsSmoothAdditionalManifest
$cfrom :: forall x.
MsSmoothAdditionalManifest -> Rep MsSmoothAdditionalManifest x
Prelude.Generic)

-- |
-- Create a value of 'MsSmoothAdditionalManifest' 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:
--
-- 'manifestNameModifier', 'msSmoothAdditionalManifest_manifestNameModifier' - Specify a name modifier that the service adds to the name of this
-- manifest to make it different from the file names of the other main
-- manifests in the output group. For example, say that the default main
-- manifest for your Microsoft Smooth group is film-name.ismv. If you enter
-- \"-no-premium\" for this setting, then the file name the service
-- generates for this top-level manifest is film-name-no-premium.ismv.
--
-- 'selectedOutputs', 'msSmoothAdditionalManifest_selectedOutputs' - Specify the outputs that you want this additional top-level manifest to
-- reference.
newMsSmoothAdditionalManifest ::
  MsSmoothAdditionalManifest
newMsSmoothAdditionalManifest :: MsSmoothAdditionalManifest
newMsSmoothAdditionalManifest =
  MsSmoothAdditionalManifest'
    { $sel:manifestNameModifier:MsSmoothAdditionalManifest' :: Maybe Text
manifestNameModifier =
        forall a. Maybe a
Prelude.Nothing,
      $sel:selectedOutputs:MsSmoothAdditionalManifest' :: Maybe [Text]
selectedOutputs = forall a. Maybe a
Prelude.Nothing
    }

-- | Specify a name modifier that the service adds to the name of this
-- manifest to make it different from the file names of the other main
-- manifests in the output group. For example, say that the default main
-- manifest for your Microsoft Smooth group is film-name.ismv. If you enter
-- \"-no-premium\" for this setting, then the file name the service
-- generates for this top-level manifest is film-name-no-premium.ismv.
msSmoothAdditionalManifest_manifestNameModifier :: Lens.Lens' MsSmoothAdditionalManifest (Prelude.Maybe Prelude.Text)
msSmoothAdditionalManifest_manifestNameModifier :: Lens' MsSmoothAdditionalManifest (Maybe Text)
msSmoothAdditionalManifest_manifestNameModifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MsSmoothAdditionalManifest' {Maybe Text
manifestNameModifier :: Maybe Text
$sel:manifestNameModifier:MsSmoothAdditionalManifest' :: MsSmoothAdditionalManifest -> Maybe Text
manifestNameModifier} -> Maybe Text
manifestNameModifier) (\s :: MsSmoothAdditionalManifest
s@MsSmoothAdditionalManifest' {} Maybe Text
a -> MsSmoothAdditionalManifest
s {$sel:manifestNameModifier:MsSmoothAdditionalManifest' :: Maybe Text
manifestNameModifier = Maybe Text
a} :: MsSmoothAdditionalManifest)

-- | Specify the outputs that you want this additional top-level manifest to
-- reference.
msSmoothAdditionalManifest_selectedOutputs :: Lens.Lens' MsSmoothAdditionalManifest (Prelude.Maybe [Prelude.Text])
msSmoothAdditionalManifest_selectedOutputs :: Lens' MsSmoothAdditionalManifest (Maybe [Text])
msSmoothAdditionalManifest_selectedOutputs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MsSmoothAdditionalManifest' {Maybe [Text]
selectedOutputs :: Maybe [Text]
$sel:selectedOutputs:MsSmoothAdditionalManifest' :: MsSmoothAdditionalManifest -> Maybe [Text]
selectedOutputs} -> Maybe [Text]
selectedOutputs) (\s :: MsSmoothAdditionalManifest
s@MsSmoothAdditionalManifest' {} Maybe [Text]
a -> MsSmoothAdditionalManifest
s {$sel:selectedOutputs:MsSmoothAdditionalManifest' :: Maybe [Text]
selectedOutputs = Maybe [Text]
a} :: MsSmoothAdditionalManifest) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Data.FromJSON MsSmoothAdditionalManifest where
  parseJSON :: Value -> Parser MsSmoothAdditionalManifest
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"MsSmoothAdditionalManifest"
      ( \Object
x ->
          Maybe Text -> Maybe [Text] -> MsSmoothAdditionalManifest
MsSmoothAdditionalManifest'
            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
"manifestNameModifier")
            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
"selectedOutputs"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable MsSmoothAdditionalManifest where
  hashWithSalt :: Int -> MsSmoothAdditionalManifest -> Int
hashWithSalt Int
_salt MsSmoothAdditionalManifest' {Maybe [Text]
Maybe Text
selectedOutputs :: Maybe [Text]
manifestNameModifier :: Maybe Text
$sel:selectedOutputs:MsSmoothAdditionalManifest' :: MsSmoothAdditionalManifest -> Maybe [Text]
$sel:manifestNameModifier:MsSmoothAdditionalManifest' :: MsSmoothAdditionalManifest -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
manifestNameModifier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
selectedOutputs

instance Prelude.NFData MsSmoothAdditionalManifest where
  rnf :: MsSmoothAdditionalManifest -> ()
rnf MsSmoothAdditionalManifest' {Maybe [Text]
Maybe Text
selectedOutputs :: Maybe [Text]
manifestNameModifier :: Maybe Text
$sel:selectedOutputs:MsSmoothAdditionalManifest' :: MsSmoothAdditionalManifest -> Maybe [Text]
$sel:manifestNameModifier:MsSmoothAdditionalManifest' :: MsSmoothAdditionalManifest -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
manifestNameModifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
selectedOutputs

instance Data.ToJSON MsSmoothAdditionalManifest where
  toJSON :: MsSmoothAdditionalManifest -> Value
toJSON MsSmoothAdditionalManifest' {Maybe [Text]
Maybe Text
selectedOutputs :: Maybe [Text]
manifestNameModifier :: Maybe Text
$sel:selectedOutputs:MsSmoothAdditionalManifest' :: MsSmoothAdditionalManifest -> Maybe [Text]
$sel:manifestNameModifier:MsSmoothAdditionalManifest' :: MsSmoothAdditionalManifest -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"manifestNameModifier" 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 Text
manifestNameModifier,
            (Key
"selectedOutputs" 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 [Text]
selectedOutputs
          ]
      )