{-# 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.ElasticTranscoder.Types.CreateJobPlaylist where
import qualified Amazonka.Core as Core
import Amazonka.ElasticTranscoder.Types.HlsContentProtection
import Amazonka.ElasticTranscoder.Types.PlayReadyDrm
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CreateJobPlaylist = CreateJobPlaylist'
{
CreateJobPlaylist -> Maybe PlayReadyDrm
playReadyDrm :: Prelude.Maybe PlayReadyDrm,
CreateJobPlaylist -> Maybe Text
format :: Prelude.Maybe Prelude.Text,
CreateJobPlaylist -> Maybe [Text]
outputKeys :: Prelude.Maybe [Prelude.Text],
CreateJobPlaylist -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CreateJobPlaylist -> Maybe HlsContentProtection
hlsContentProtection :: Prelude.Maybe HlsContentProtection
}
deriving (CreateJobPlaylist -> CreateJobPlaylist -> Bool
(CreateJobPlaylist -> CreateJobPlaylist -> Bool)
-> (CreateJobPlaylist -> CreateJobPlaylist -> Bool)
-> Eq CreateJobPlaylist
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateJobPlaylist -> CreateJobPlaylist -> Bool
$c/= :: CreateJobPlaylist -> CreateJobPlaylist -> Bool
== :: CreateJobPlaylist -> CreateJobPlaylist -> Bool
$c== :: CreateJobPlaylist -> CreateJobPlaylist -> Bool
Prelude.Eq, ReadPrec [CreateJobPlaylist]
ReadPrec CreateJobPlaylist
Int -> ReadS CreateJobPlaylist
ReadS [CreateJobPlaylist]
(Int -> ReadS CreateJobPlaylist)
-> ReadS [CreateJobPlaylist]
-> ReadPrec CreateJobPlaylist
-> ReadPrec [CreateJobPlaylist]
-> Read CreateJobPlaylist
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateJobPlaylist]
$creadListPrec :: ReadPrec [CreateJobPlaylist]
readPrec :: ReadPrec CreateJobPlaylist
$creadPrec :: ReadPrec CreateJobPlaylist
readList :: ReadS [CreateJobPlaylist]
$creadList :: ReadS [CreateJobPlaylist]
readsPrec :: Int -> ReadS CreateJobPlaylist
$creadsPrec :: Int -> ReadS CreateJobPlaylist
Prelude.Read, Int -> CreateJobPlaylist -> ShowS
[CreateJobPlaylist] -> ShowS
CreateJobPlaylist -> String
(Int -> CreateJobPlaylist -> ShowS)
-> (CreateJobPlaylist -> String)
-> ([CreateJobPlaylist] -> ShowS)
-> Show CreateJobPlaylist
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateJobPlaylist] -> ShowS
$cshowList :: [CreateJobPlaylist] -> ShowS
show :: CreateJobPlaylist -> String
$cshow :: CreateJobPlaylist -> String
showsPrec :: Int -> CreateJobPlaylist -> ShowS
$cshowsPrec :: Int -> CreateJobPlaylist -> ShowS
Prelude.Show, (forall x. CreateJobPlaylist -> Rep CreateJobPlaylist x)
-> (forall x. Rep CreateJobPlaylist x -> CreateJobPlaylist)
-> Generic CreateJobPlaylist
forall x. Rep CreateJobPlaylist x -> CreateJobPlaylist
forall x. CreateJobPlaylist -> Rep CreateJobPlaylist x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateJobPlaylist x -> CreateJobPlaylist
$cfrom :: forall x. CreateJobPlaylist -> Rep CreateJobPlaylist x
Prelude.Generic)
newCreateJobPlaylist ::
CreateJobPlaylist
newCreateJobPlaylist :: CreateJobPlaylist
newCreateJobPlaylist =
CreateJobPlaylist' :: Maybe PlayReadyDrm
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe HlsContentProtection
-> CreateJobPlaylist
CreateJobPlaylist'
{ $sel:playReadyDrm:CreateJobPlaylist' :: Maybe PlayReadyDrm
playReadyDrm = Maybe PlayReadyDrm
forall a. Maybe a
Prelude.Nothing,
$sel:format:CreateJobPlaylist' :: Maybe Text
format = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:outputKeys:CreateJobPlaylist' :: Maybe [Text]
outputKeys = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateJobPlaylist' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hlsContentProtection:CreateJobPlaylist' :: Maybe HlsContentProtection
hlsContentProtection = Maybe HlsContentProtection
forall a. Maybe a
Prelude.Nothing
}
createJobPlaylist_playReadyDrm :: Lens.Lens' CreateJobPlaylist (Prelude.Maybe PlayReadyDrm)
createJobPlaylist_playReadyDrm :: (Maybe PlayReadyDrm -> f (Maybe PlayReadyDrm))
-> CreateJobPlaylist -> f CreateJobPlaylist
createJobPlaylist_playReadyDrm = (CreateJobPlaylist -> Maybe PlayReadyDrm)
-> (CreateJobPlaylist -> Maybe PlayReadyDrm -> CreateJobPlaylist)
-> Lens
CreateJobPlaylist
CreateJobPlaylist
(Maybe PlayReadyDrm)
(Maybe PlayReadyDrm)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobPlaylist' {Maybe PlayReadyDrm
playReadyDrm :: Maybe PlayReadyDrm
$sel:playReadyDrm:CreateJobPlaylist' :: CreateJobPlaylist -> Maybe PlayReadyDrm
playReadyDrm} -> Maybe PlayReadyDrm
playReadyDrm) (\s :: CreateJobPlaylist
s@CreateJobPlaylist' {} Maybe PlayReadyDrm
a -> CreateJobPlaylist
s {$sel:playReadyDrm:CreateJobPlaylist' :: Maybe PlayReadyDrm
playReadyDrm = Maybe PlayReadyDrm
a} :: CreateJobPlaylist)
createJobPlaylist_format :: Lens.Lens' CreateJobPlaylist (Prelude.Maybe Prelude.Text)
createJobPlaylist_format :: (Maybe Text -> f (Maybe Text))
-> CreateJobPlaylist -> f CreateJobPlaylist
createJobPlaylist_format = (CreateJobPlaylist -> Maybe Text)
-> (CreateJobPlaylist -> Maybe Text -> CreateJobPlaylist)
-> Lens
CreateJobPlaylist CreateJobPlaylist (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobPlaylist' {Maybe Text
format :: Maybe Text
$sel:format:CreateJobPlaylist' :: CreateJobPlaylist -> Maybe Text
format} -> Maybe Text
format) (\s :: CreateJobPlaylist
s@CreateJobPlaylist' {} Maybe Text
a -> CreateJobPlaylist
s {$sel:format:CreateJobPlaylist' :: Maybe Text
format = Maybe Text
a} :: CreateJobPlaylist)
createJobPlaylist_outputKeys :: Lens.Lens' CreateJobPlaylist (Prelude.Maybe [Prelude.Text])
createJobPlaylist_outputKeys :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateJobPlaylist -> f CreateJobPlaylist
createJobPlaylist_outputKeys = (CreateJobPlaylist -> Maybe [Text])
-> (CreateJobPlaylist -> Maybe [Text] -> CreateJobPlaylist)
-> Lens
CreateJobPlaylist CreateJobPlaylist (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobPlaylist' {Maybe [Text]
outputKeys :: Maybe [Text]
$sel:outputKeys:CreateJobPlaylist' :: CreateJobPlaylist -> Maybe [Text]
outputKeys} -> Maybe [Text]
outputKeys) (\s :: CreateJobPlaylist
s@CreateJobPlaylist' {} Maybe [Text]
a -> CreateJobPlaylist
s {$sel:outputKeys:CreateJobPlaylist' :: Maybe [Text]
outputKeys = Maybe [Text]
a} :: CreateJobPlaylist) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateJobPlaylist -> f CreateJobPlaylist)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateJobPlaylist
-> f CreateJobPlaylist
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
createJobPlaylist_name :: Lens.Lens' CreateJobPlaylist (Prelude.Maybe Prelude.Text)
createJobPlaylist_name :: (Maybe Text -> f (Maybe Text))
-> CreateJobPlaylist -> f CreateJobPlaylist
createJobPlaylist_name = (CreateJobPlaylist -> Maybe Text)
-> (CreateJobPlaylist -> Maybe Text -> CreateJobPlaylist)
-> Lens
CreateJobPlaylist CreateJobPlaylist (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobPlaylist' {Maybe Text
name :: Maybe Text
$sel:name:CreateJobPlaylist' :: CreateJobPlaylist -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateJobPlaylist
s@CreateJobPlaylist' {} Maybe Text
a -> CreateJobPlaylist
s {$sel:name:CreateJobPlaylist' :: Maybe Text
name = Maybe Text
a} :: CreateJobPlaylist)
createJobPlaylist_hlsContentProtection :: Lens.Lens' CreateJobPlaylist (Prelude.Maybe HlsContentProtection)
createJobPlaylist_hlsContentProtection :: (Maybe HlsContentProtection -> f (Maybe HlsContentProtection))
-> CreateJobPlaylist -> f CreateJobPlaylist
createJobPlaylist_hlsContentProtection = (CreateJobPlaylist -> Maybe HlsContentProtection)
-> (CreateJobPlaylist
-> Maybe HlsContentProtection -> CreateJobPlaylist)
-> Lens
CreateJobPlaylist
CreateJobPlaylist
(Maybe HlsContentProtection)
(Maybe HlsContentProtection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobPlaylist' {Maybe HlsContentProtection
hlsContentProtection :: Maybe HlsContentProtection
$sel:hlsContentProtection:CreateJobPlaylist' :: CreateJobPlaylist -> Maybe HlsContentProtection
hlsContentProtection} -> Maybe HlsContentProtection
hlsContentProtection) (\s :: CreateJobPlaylist
s@CreateJobPlaylist' {} Maybe HlsContentProtection
a -> CreateJobPlaylist
s {$sel:hlsContentProtection:CreateJobPlaylist' :: Maybe HlsContentProtection
hlsContentProtection = Maybe HlsContentProtection
a} :: CreateJobPlaylist)
instance Prelude.Hashable CreateJobPlaylist
instance Prelude.NFData CreateJobPlaylist
instance Core.ToJSON CreateJobPlaylist where
toJSON :: CreateJobPlaylist -> Value
toJSON CreateJobPlaylist' {Maybe [Text]
Maybe Text
Maybe HlsContentProtection
Maybe PlayReadyDrm
hlsContentProtection :: Maybe HlsContentProtection
name :: Maybe Text
outputKeys :: Maybe [Text]
format :: Maybe Text
playReadyDrm :: Maybe PlayReadyDrm
$sel:hlsContentProtection:CreateJobPlaylist' :: CreateJobPlaylist -> Maybe HlsContentProtection
$sel:name:CreateJobPlaylist' :: CreateJobPlaylist -> Maybe Text
$sel:outputKeys:CreateJobPlaylist' :: CreateJobPlaylist -> Maybe [Text]
$sel:format:CreateJobPlaylist' :: CreateJobPlaylist -> Maybe Text
$sel:playReadyDrm:CreateJobPlaylist' :: CreateJobPlaylist -> Maybe PlayReadyDrm
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"PlayReadyDrm" Text -> PlayReadyDrm -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PlayReadyDrm -> Pair) -> Maybe PlayReadyDrm -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PlayReadyDrm
playReadyDrm,
(Text
"Format" 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
format,
(Text
"OutputKeys" 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]
outputKeys,
(Text
"Name" 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
name,
(Text
"HlsContentProtection" Text -> HlsContentProtection -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HlsContentProtection -> Pair)
-> Maybe HlsContentProtection -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HlsContentProtection
hlsContentProtection
]
)