{-# 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.Playlist where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElasticTranscoder.Types.HlsContentProtection
import Amazonka.ElasticTranscoder.Types.PlayReadyDrm
import qualified Amazonka.Prelude as Prelude
data Playlist = Playlist'
{
Playlist -> Maybe Text
format :: Prelude.Maybe Prelude.Text,
Playlist -> Maybe HlsContentProtection
hlsContentProtection :: Prelude.Maybe HlsContentProtection,
Playlist -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Playlist -> Maybe [Text]
outputKeys :: Prelude.Maybe [Prelude.Text],
Playlist -> Maybe PlayReadyDrm
playReadyDrm :: Prelude.Maybe PlayReadyDrm,
Playlist -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
Playlist -> Maybe Text
statusDetail :: Prelude.Maybe Prelude.Text
}
deriving (Playlist -> Playlist -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Playlist -> Playlist -> Bool
$c/= :: Playlist -> Playlist -> Bool
== :: Playlist -> Playlist -> Bool
$c== :: Playlist -> Playlist -> Bool
Prelude.Eq, ReadPrec [Playlist]
ReadPrec Playlist
Int -> ReadS Playlist
ReadS [Playlist]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Playlist]
$creadListPrec :: ReadPrec [Playlist]
readPrec :: ReadPrec Playlist
$creadPrec :: ReadPrec Playlist
readList :: ReadS [Playlist]
$creadList :: ReadS [Playlist]
readsPrec :: Int -> ReadS Playlist
$creadsPrec :: Int -> ReadS Playlist
Prelude.Read, Int -> Playlist -> ShowS
[Playlist] -> ShowS
Playlist -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Playlist] -> ShowS
$cshowList :: [Playlist] -> ShowS
show :: Playlist -> String
$cshow :: Playlist -> String
showsPrec :: Int -> Playlist -> ShowS
$cshowsPrec :: Int -> Playlist -> ShowS
Prelude.Show, forall x. Rep Playlist x -> Playlist
forall x. Playlist -> Rep Playlist x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Playlist x -> Playlist
$cfrom :: forall x. Playlist -> Rep Playlist x
Prelude.Generic)
newPlaylist ::
Playlist
newPlaylist :: Playlist
newPlaylist =
Playlist'
{ $sel:format:Playlist' :: Maybe Text
format = forall a. Maybe a
Prelude.Nothing,
$sel:hlsContentProtection:Playlist' :: Maybe HlsContentProtection
hlsContentProtection = forall a. Maybe a
Prelude.Nothing,
$sel:name:Playlist' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:outputKeys:Playlist' :: Maybe [Text]
outputKeys = forall a. Maybe a
Prelude.Nothing,
$sel:playReadyDrm:Playlist' :: Maybe PlayReadyDrm
playReadyDrm = forall a. Maybe a
Prelude.Nothing,
$sel:status:Playlist' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
$sel:statusDetail:Playlist' :: Maybe Text
statusDetail = forall a. Maybe a
Prelude.Nothing
}
playlist_format :: Lens.Lens' Playlist (Prelude.Maybe Prelude.Text)
playlist_format :: Lens' Playlist (Maybe Text)
playlist_format = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Playlist' {Maybe Text
format :: Maybe Text
$sel:format:Playlist' :: Playlist -> Maybe Text
format} -> Maybe Text
format) (\s :: Playlist
s@Playlist' {} Maybe Text
a -> Playlist
s {$sel:format:Playlist' :: Maybe Text
format = Maybe Text
a} :: Playlist)
playlist_hlsContentProtection :: Lens.Lens' Playlist (Prelude.Maybe HlsContentProtection)
playlist_hlsContentProtection :: Lens' Playlist (Maybe HlsContentProtection)
playlist_hlsContentProtection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Playlist' {Maybe HlsContentProtection
hlsContentProtection :: Maybe HlsContentProtection
$sel:hlsContentProtection:Playlist' :: Playlist -> Maybe HlsContentProtection
hlsContentProtection} -> Maybe HlsContentProtection
hlsContentProtection) (\s :: Playlist
s@Playlist' {} Maybe HlsContentProtection
a -> Playlist
s {$sel:hlsContentProtection:Playlist' :: Maybe HlsContentProtection
hlsContentProtection = Maybe HlsContentProtection
a} :: Playlist)
playlist_name :: Lens.Lens' Playlist (Prelude.Maybe Prelude.Text)
playlist_name :: Lens' Playlist (Maybe Text)
playlist_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Playlist' {Maybe Text
name :: Maybe Text
$sel:name:Playlist' :: Playlist -> Maybe Text
name} -> Maybe Text
name) (\s :: Playlist
s@Playlist' {} Maybe Text
a -> Playlist
s {$sel:name:Playlist' :: Maybe Text
name = Maybe Text
a} :: Playlist)
playlist_outputKeys :: Lens.Lens' Playlist (Prelude.Maybe [Prelude.Text])
playlist_outputKeys :: Lens' Playlist (Maybe [Text])
playlist_outputKeys = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Playlist' {Maybe [Text]
outputKeys :: Maybe [Text]
$sel:outputKeys:Playlist' :: Playlist -> Maybe [Text]
outputKeys} -> Maybe [Text]
outputKeys) (\s :: Playlist
s@Playlist' {} Maybe [Text]
a -> Playlist
s {$sel:outputKeys:Playlist' :: Maybe [Text]
outputKeys = Maybe [Text]
a} :: Playlist) 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
playlist_playReadyDrm :: Lens.Lens' Playlist (Prelude.Maybe PlayReadyDrm)
playlist_playReadyDrm :: Lens' Playlist (Maybe PlayReadyDrm)
playlist_playReadyDrm = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Playlist' {Maybe PlayReadyDrm
playReadyDrm :: Maybe PlayReadyDrm
$sel:playReadyDrm:Playlist' :: Playlist -> Maybe PlayReadyDrm
playReadyDrm} -> Maybe PlayReadyDrm
playReadyDrm) (\s :: Playlist
s@Playlist' {} Maybe PlayReadyDrm
a -> Playlist
s {$sel:playReadyDrm:Playlist' :: Maybe PlayReadyDrm
playReadyDrm = Maybe PlayReadyDrm
a} :: Playlist)
playlist_status :: Lens.Lens' Playlist (Prelude.Maybe Prelude.Text)
playlist_status :: Lens' Playlist (Maybe Text)
playlist_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Playlist' {Maybe Text
status :: Maybe Text
$sel:status:Playlist' :: Playlist -> Maybe Text
status} -> Maybe Text
status) (\s :: Playlist
s@Playlist' {} Maybe Text
a -> Playlist
s {$sel:status:Playlist' :: Maybe Text
status = Maybe Text
a} :: Playlist)
playlist_statusDetail :: Lens.Lens' Playlist (Prelude.Maybe Prelude.Text)
playlist_statusDetail :: Lens' Playlist (Maybe Text)
playlist_statusDetail = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Playlist' {Maybe Text
statusDetail :: Maybe Text
$sel:statusDetail:Playlist' :: Playlist -> Maybe Text
statusDetail} -> Maybe Text
statusDetail) (\s :: Playlist
s@Playlist' {} Maybe Text
a -> Playlist
s {$sel:statusDetail:Playlist' :: Maybe Text
statusDetail = Maybe Text
a} :: Playlist)
instance Data.FromJSON Playlist where
parseJSON :: Value -> Parser Playlist
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Playlist"
( \Object
x ->
Maybe Text
-> Maybe HlsContentProtection
-> Maybe Text
-> Maybe [Text]
-> Maybe PlayReadyDrm
-> Maybe Text
-> Maybe Text
-> Playlist
Playlist'
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
"Format")
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
"HlsContentProtection")
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
"Name")
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
"OutputKeys" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"PlayReadyDrm")
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
"Status")
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
"StatusDetail")
)
instance Prelude.Hashable Playlist where
hashWithSalt :: Int -> Playlist -> Int
hashWithSalt Int
_salt Playlist' {Maybe [Text]
Maybe Text
Maybe HlsContentProtection
Maybe PlayReadyDrm
statusDetail :: Maybe Text
status :: Maybe Text
playReadyDrm :: Maybe PlayReadyDrm
outputKeys :: Maybe [Text]
name :: Maybe Text
hlsContentProtection :: Maybe HlsContentProtection
format :: Maybe Text
$sel:statusDetail:Playlist' :: Playlist -> Maybe Text
$sel:status:Playlist' :: Playlist -> Maybe Text
$sel:playReadyDrm:Playlist' :: Playlist -> Maybe PlayReadyDrm
$sel:outputKeys:Playlist' :: Playlist -> Maybe [Text]
$sel:name:Playlist' :: Playlist -> Maybe Text
$sel:hlsContentProtection:Playlist' :: Playlist -> Maybe HlsContentProtection
$sel:format:Playlist' :: Playlist -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
format
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsContentProtection
hlsContentProtection
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
outputKeys
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PlayReadyDrm
playReadyDrm
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
statusDetail
instance Prelude.NFData Playlist where
rnf :: Playlist -> ()
rnf Playlist' {Maybe [Text]
Maybe Text
Maybe HlsContentProtection
Maybe PlayReadyDrm
statusDetail :: Maybe Text
status :: Maybe Text
playReadyDrm :: Maybe PlayReadyDrm
outputKeys :: Maybe [Text]
name :: Maybe Text
hlsContentProtection :: Maybe HlsContentProtection
format :: Maybe Text
$sel:statusDetail:Playlist' :: Playlist -> Maybe Text
$sel:status:Playlist' :: Playlist -> Maybe Text
$sel:playReadyDrm:Playlist' :: Playlist -> Maybe PlayReadyDrm
$sel:outputKeys:Playlist' :: Playlist -> Maybe [Text]
$sel:name:Playlist' :: Playlist -> Maybe Text
$sel:hlsContentProtection:Playlist' :: Playlist -> Maybe HlsContentProtection
$sel:format:Playlist' :: Playlist -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
format
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsContentProtection
hlsContentProtection
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
outputKeys
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PlayReadyDrm
playReadyDrm
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusDetail