{-# 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 #-}
module Amazonka.MediaConvert.Types.HlsAdditionalManifest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data HlsAdditionalManifest = HlsAdditionalManifest'
{
HlsAdditionalManifest -> Maybe Text
manifestNameModifier :: Prelude.Maybe Prelude.Text,
HlsAdditionalManifest -> Maybe [Text]
selectedOutputs :: Prelude.Maybe [Prelude.Text]
}
deriving (HlsAdditionalManifest -> HlsAdditionalManifest -> Bool
(HlsAdditionalManifest -> HlsAdditionalManifest -> Bool)
-> (HlsAdditionalManifest -> HlsAdditionalManifest -> Bool)
-> Eq HlsAdditionalManifest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsAdditionalManifest -> HlsAdditionalManifest -> Bool
$c/= :: HlsAdditionalManifest -> HlsAdditionalManifest -> Bool
== :: HlsAdditionalManifest -> HlsAdditionalManifest -> Bool
$c== :: HlsAdditionalManifest -> HlsAdditionalManifest -> Bool
Prelude.Eq, ReadPrec [HlsAdditionalManifest]
ReadPrec HlsAdditionalManifest
Int -> ReadS HlsAdditionalManifest
ReadS [HlsAdditionalManifest]
(Int -> ReadS HlsAdditionalManifest)
-> ReadS [HlsAdditionalManifest]
-> ReadPrec HlsAdditionalManifest
-> ReadPrec [HlsAdditionalManifest]
-> Read HlsAdditionalManifest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsAdditionalManifest]
$creadListPrec :: ReadPrec [HlsAdditionalManifest]
readPrec :: ReadPrec HlsAdditionalManifest
$creadPrec :: ReadPrec HlsAdditionalManifest
readList :: ReadS [HlsAdditionalManifest]
$creadList :: ReadS [HlsAdditionalManifest]
readsPrec :: Int -> ReadS HlsAdditionalManifest
$creadsPrec :: Int -> ReadS HlsAdditionalManifest
Prelude.Read, Int -> HlsAdditionalManifest -> ShowS
[HlsAdditionalManifest] -> ShowS
HlsAdditionalManifest -> String
(Int -> HlsAdditionalManifest -> ShowS)
-> (HlsAdditionalManifest -> String)
-> ([HlsAdditionalManifest] -> ShowS)
-> Show HlsAdditionalManifest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsAdditionalManifest] -> ShowS
$cshowList :: [HlsAdditionalManifest] -> ShowS
show :: HlsAdditionalManifest -> String
$cshow :: HlsAdditionalManifest -> String
showsPrec :: Int -> HlsAdditionalManifest -> ShowS
$cshowsPrec :: Int -> HlsAdditionalManifest -> ShowS
Prelude.Show, (forall x. HlsAdditionalManifest -> Rep HlsAdditionalManifest x)
-> (forall x. Rep HlsAdditionalManifest x -> HlsAdditionalManifest)
-> Generic HlsAdditionalManifest
forall x. Rep HlsAdditionalManifest x -> HlsAdditionalManifest
forall x. HlsAdditionalManifest -> Rep HlsAdditionalManifest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HlsAdditionalManifest x -> HlsAdditionalManifest
$cfrom :: forall x. HlsAdditionalManifest -> Rep HlsAdditionalManifest x
Prelude.Generic)
newHlsAdditionalManifest ::
HlsAdditionalManifest
newHlsAdditionalManifest :: HlsAdditionalManifest
newHlsAdditionalManifest =
HlsAdditionalManifest' :: Maybe Text -> Maybe [Text] -> HlsAdditionalManifest
HlsAdditionalManifest'
{ $sel:manifestNameModifier:HlsAdditionalManifest' :: Maybe Text
manifestNameModifier =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:selectedOutputs:HlsAdditionalManifest' :: Maybe [Text]
selectedOutputs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
hlsAdditionalManifest_manifestNameModifier :: Lens.Lens' HlsAdditionalManifest (Prelude.Maybe Prelude.Text)
hlsAdditionalManifest_manifestNameModifier :: (Maybe Text -> f (Maybe Text))
-> HlsAdditionalManifest -> f HlsAdditionalManifest
hlsAdditionalManifest_manifestNameModifier = (HlsAdditionalManifest -> Maybe Text)
-> (HlsAdditionalManifest -> Maybe Text -> HlsAdditionalManifest)
-> Lens
HlsAdditionalManifest
HlsAdditionalManifest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsAdditionalManifest' {Maybe Text
manifestNameModifier :: Maybe Text
$sel:manifestNameModifier:HlsAdditionalManifest' :: HlsAdditionalManifest -> Maybe Text
manifestNameModifier} -> Maybe Text
manifestNameModifier) (\s :: HlsAdditionalManifest
s@HlsAdditionalManifest' {} Maybe Text
a -> HlsAdditionalManifest
s {$sel:manifestNameModifier:HlsAdditionalManifest' :: Maybe Text
manifestNameModifier = Maybe Text
a} :: HlsAdditionalManifest)
hlsAdditionalManifest_selectedOutputs :: Lens.Lens' HlsAdditionalManifest (Prelude.Maybe [Prelude.Text])
hlsAdditionalManifest_selectedOutputs :: (Maybe [Text] -> f (Maybe [Text]))
-> HlsAdditionalManifest -> f HlsAdditionalManifest
hlsAdditionalManifest_selectedOutputs = (HlsAdditionalManifest -> Maybe [Text])
-> (HlsAdditionalManifest -> Maybe [Text] -> HlsAdditionalManifest)
-> Lens
HlsAdditionalManifest
HlsAdditionalManifest
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsAdditionalManifest' {Maybe [Text]
selectedOutputs :: Maybe [Text]
$sel:selectedOutputs:HlsAdditionalManifest' :: HlsAdditionalManifest -> Maybe [Text]
selectedOutputs} -> Maybe [Text]
selectedOutputs) (\s :: HlsAdditionalManifest
s@HlsAdditionalManifest' {} Maybe [Text]
a -> HlsAdditionalManifest
s {$sel:selectedOutputs:HlsAdditionalManifest' :: Maybe [Text]
selectedOutputs = Maybe [Text]
a} :: HlsAdditionalManifest) ((Maybe [Text] -> f (Maybe [Text]))
-> HlsAdditionalManifest -> f HlsAdditionalManifest)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> HlsAdditionalManifest
-> f HlsAdditionalManifest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON HlsAdditionalManifest where
parseJSON :: Value -> Parser HlsAdditionalManifest
parseJSON =
String
-> (Object -> Parser HlsAdditionalManifest)
-> Value
-> Parser HlsAdditionalManifest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"HlsAdditionalManifest"
( \Object
x ->
Maybe Text -> Maybe [Text] -> HlsAdditionalManifest
HlsAdditionalManifest'
(Maybe Text -> Maybe [Text] -> HlsAdditionalManifest)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> HlsAdditionalManifest)
forall (f :: * -> *) a b. Functor 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
"manifestNameModifier")
Parser (Maybe [Text] -> HlsAdditionalManifest)
-> Parser (Maybe [Text]) -> Parser HlsAdditionalManifest
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"selectedOutputs"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable HlsAdditionalManifest
instance Prelude.NFData HlsAdditionalManifest
instance Core.ToJSON HlsAdditionalManifest where
toJSON :: HlsAdditionalManifest -> Value
toJSON HlsAdditionalManifest' {Maybe [Text]
Maybe Text
selectedOutputs :: Maybe [Text]
manifestNameModifier :: Maybe Text
$sel:selectedOutputs:HlsAdditionalManifest' :: HlsAdditionalManifest -> Maybe [Text]
$sel:manifestNameModifier:HlsAdditionalManifest' :: HlsAdditionalManifest -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"manifestNameModifier" 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
manifestNameModifier,
(Text
"selectedOutputs" 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]
selectedOutputs
]
)