{-# 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.PlayReadyDrm where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PlayReadyDrm = PlayReadyDrm'
{
PlayReadyDrm -> Maybe Text
keyId :: Prelude.Maybe Prelude.Text,
PlayReadyDrm -> Maybe Text
format :: Prelude.Maybe Prelude.Text,
PlayReadyDrm -> Maybe Text
keyMd5 :: Prelude.Maybe Prelude.Text,
PlayReadyDrm -> Maybe Text
key :: Prelude.Maybe Prelude.Text,
PlayReadyDrm -> Maybe Text
initializationVector :: Prelude.Maybe Prelude.Text,
PlayReadyDrm -> Maybe Text
licenseAcquisitionUrl :: Prelude.Maybe Prelude.Text
}
deriving (PlayReadyDrm -> PlayReadyDrm -> Bool
(PlayReadyDrm -> PlayReadyDrm -> Bool)
-> (PlayReadyDrm -> PlayReadyDrm -> Bool) -> Eq PlayReadyDrm
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PlayReadyDrm -> PlayReadyDrm -> Bool
$c/= :: PlayReadyDrm -> PlayReadyDrm -> Bool
== :: PlayReadyDrm -> PlayReadyDrm -> Bool
$c== :: PlayReadyDrm -> PlayReadyDrm -> Bool
Prelude.Eq, ReadPrec [PlayReadyDrm]
ReadPrec PlayReadyDrm
Int -> ReadS PlayReadyDrm
ReadS [PlayReadyDrm]
(Int -> ReadS PlayReadyDrm)
-> ReadS [PlayReadyDrm]
-> ReadPrec PlayReadyDrm
-> ReadPrec [PlayReadyDrm]
-> Read PlayReadyDrm
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PlayReadyDrm]
$creadListPrec :: ReadPrec [PlayReadyDrm]
readPrec :: ReadPrec PlayReadyDrm
$creadPrec :: ReadPrec PlayReadyDrm
readList :: ReadS [PlayReadyDrm]
$creadList :: ReadS [PlayReadyDrm]
readsPrec :: Int -> ReadS PlayReadyDrm
$creadsPrec :: Int -> ReadS PlayReadyDrm
Prelude.Read, Int -> PlayReadyDrm -> ShowS
[PlayReadyDrm] -> ShowS
PlayReadyDrm -> String
(Int -> PlayReadyDrm -> ShowS)
-> (PlayReadyDrm -> String)
-> ([PlayReadyDrm] -> ShowS)
-> Show PlayReadyDrm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PlayReadyDrm] -> ShowS
$cshowList :: [PlayReadyDrm] -> ShowS
show :: PlayReadyDrm -> String
$cshow :: PlayReadyDrm -> String
showsPrec :: Int -> PlayReadyDrm -> ShowS
$cshowsPrec :: Int -> PlayReadyDrm -> ShowS
Prelude.Show, (forall x. PlayReadyDrm -> Rep PlayReadyDrm x)
-> (forall x. Rep PlayReadyDrm x -> PlayReadyDrm)
-> Generic PlayReadyDrm
forall x. Rep PlayReadyDrm x -> PlayReadyDrm
forall x. PlayReadyDrm -> Rep PlayReadyDrm x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PlayReadyDrm x -> PlayReadyDrm
$cfrom :: forall x. PlayReadyDrm -> Rep PlayReadyDrm x
Prelude.Generic)
newPlayReadyDrm ::
PlayReadyDrm
newPlayReadyDrm :: PlayReadyDrm
newPlayReadyDrm =
PlayReadyDrm' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PlayReadyDrm
PlayReadyDrm'
{ $sel:keyId:PlayReadyDrm' :: Maybe Text
keyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:format:PlayReadyDrm' :: Maybe Text
format = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:keyMd5:PlayReadyDrm' :: Maybe Text
keyMd5 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:key:PlayReadyDrm' :: Maybe Text
key = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:initializationVector:PlayReadyDrm' :: Maybe Text
initializationVector = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:licenseAcquisitionUrl:PlayReadyDrm' :: Maybe Text
licenseAcquisitionUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
playReadyDrm_keyId :: Lens.Lens' PlayReadyDrm (Prelude.Maybe Prelude.Text)
playReadyDrm_keyId :: (Maybe Text -> f (Maybe Text)) -> PlayReadyDrm -> f PlayReadyDrm
playReadyDrm_keyId = (PlayReadyDrm -> Maybe Text)
-> (PlayReadyDrm -> Maybe Text -> PlayReadyDrm)
-> Lens PlayReadyDrm PlayReadyDrm (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlayReadyDrm' {Maybe Text
keyId :: Maybe Text
$sel:keyId:PlayReadyDrm' :: PlayReadyDrm -> Maybe Text
keyId} -> Maybe Text
keyId) (\s :: PlayReadyDrm
s@PlayReadyDrm' {} Maybe Text
a -> PlayReadyDrm
s {$sel:keyId:PlayReadyDrm' :: Maybe Text
keyId = Maybe Text
a} :: PlayReadyDrm)
playReadyDrm_format :: Lens.Lens' PlayReadyDrm (Prelude.Maybe Prelude.Text)
playReadyDrm_format :: (Maybe Text -> f (Maybe Text)) -> PlayReadyDrm -> f PlayReadyDrm
playReadyDrm_format = (PlayReadyDrm -> Maybe Text)
-> (PlayReadyDrm -> Maybe Text -> PlayReadyDrm)
-> Lens PlayReadyDrm PlayReadyDrm (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlayReadyDrm' {Maybe Text
format :: Maybe Text
$sel:format:PlayReadyDrm' :: PlayReadyDrm -> Maybe Text
format} -> Maybe Text
format) (\s :: PlayReadyDrm
s@PlayReadyDrm' {} Maybe Text
a -> PlayReadyDrm
s {$sel:format:PlayReadyDrm' :: Maybe Text
format = Maybe Text
a} :: PlayReadyDrm)
playReadyDrm_keyMd5 :: Lens.Lens' PlayReadyDrm (Prelude.Maybe Prelude.Text)
playReadyDrm_keyMd5 :: (Maybe Text -> f (Maybe Text)) -> PlayReadyDrm -> f PlayReadyDrm
playReadyDrm_keyMd5 = (PlayReadyDrm -> Maybe Text)
-> (PlayReadyDrm -> Maybe Text -> PlayReadyDrm)
-> Lens PlayReadyDrm PlayReadyDrm (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlayReadyDrm' {Maybe Text
keyMd5 :: Maybe Text
$sel:keyMd5:PlayReadyDrm' :: PlayReadyDrm -> Maybe Text
keyMd5} -> Maybe Text
keyMd5) (\s :: PlayReadyDrm
s@PlayReadyDrm' {} Maybe Text
a -> PlayReadyDrm
s {$sel:keyMd5:PlayReadyDrm' :: Maybe Text
keyMd5 = Maybe Text
a} :: PlayReadyDrm)
playReadyDrm_key :: Lens.Lens' PlayReadyDrm (Prelude.Maybe Prelude.Text)
playReadyDrm_key :: (Maybe Text -> f (Maybe Text)) -> PlayReadyDrm -> f PlayReadyDrm
playReadyDrm_key = (PlayReadyDrm -> Maybe Text)
-> (PlayReadyDrm -> Maybe Text -> PlayReadyDrm)
-> Lens PlayReadyDrm PlayReadyDrm (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlayReadyDrm' {Maybe Text
key :: Maybe Text
$sel:key:PlayReadyDrm' :: PlayReadyDrm -> Maybe Text
key} -> Maybe Text
key) (\s :: PlayReadyDrm
s@PlayReadyDrm' {} Maybe Text
a -> PlayReadyDrm
s {$sel:key:PlayReadyDrm' :: Maybe Text
key = Maybe Text
a} :: PlayReadyDrm)
playReadyDrm_initializationVector :: Lens.Lens' PlayReadyDrm (Prelude.Maybe Prelude.Text)
playReadyDrm_initializationVector :: (Maybe Text -> f (Maybe Text)) -> PlayReadyDrm -> f PlayReadyDrm
playReadyDrm_initializationVector = (PlayReadyDrm -> Maybe Text)
-> (PlayReadyDrm -> Maybe Text -> PlayReadyDrm)
-> Lens PlayReadyDrm PlayReadyDrm (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlayReadyDrm' {Maybe Text
initializationVector :: Maybe Text
$sel:initializationVector:PlayReadyDrm' :: PlayReadyDrm -> Maybe Text
initializationVector} -> Maybe Text
initializationVector) (\s :: PlayReadyDrm
s@PlayReadyDrm' {} Maybe Text
a -> PlayReadyDrm
s {$sel:initializationVector:PlayReadyDrm' :: Maybe Text
initializationVector = Maybe Text
a} :: PlayReadyDrm)
playReadyDrm_licenseAcquisitionUrl :: Lens.Lens' PlayReadyDrm (Prelude.Maybe Prelude.Text)
playReadyDrm_licenseAcquisitionUrl :: (Maybe Text -> f (Maybe Text)) -> PlayReadyDrm -> f PlayReadyDrm
playReadyDrm_licenseAcquisitionUrl = (PlayReadyDrm -> Maybe Text)
-> (PlayReadyDrm -> Maybe Text -> PlayReadyDrm)
-> Lens PlayReadyDrm PlayReadyDrm (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlayReadyDrm' {Maybe Text
licenseAcquisitionUrl :: Maybe Text
$sel:licenseAcquisitionUrl:PlayReadyDrm' :: PlayReadyDrm -> Maybe Text
licenseAcquisitionUrl} -> Maybe Text
licenseAcquisitionUrl) (\s :: PlayReadyDrm
s@PlayReadyDrm' {} Maybe Text
a -> PlayReadyDrm
s {$sel:licenseAcquisitionUrl:PlayReadyDrm' :: Maybe Text
licenseAcquisitionUrl = Maybe Text
a} :: PlayReadyDrm)
instance Core.FromJSON PlayReadyDrm where
parseJSON :: Value -> Parser PlayReadyDrm
parseJSON =
String
-> (Object -> Parser PlayReadyDrm) -> Value -> Parser PlayReadyDrm
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PlayReadyDrm"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PlayReadyDrm
PlayReadyDrm'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PlayReadyDrm)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PlayReadyDrm)
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
"KeyId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PlayReadyDrm)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> PlayReadyDrm)
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
"Format")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> PlayReadyDrm)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> PlayReadyDrm)
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
"KeyMd5")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> PlayReadyDrm)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> PlayReadyDrm)
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
"Key")
Parser (Maybe Text -> Maybe Text -> PlayReadyDrm)
-> Parser (Maybe Text) -> Parser (Maybe Text -> PlayReadyDrm)
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
"InitializationVector")
Parser (Maybe Text -> PlayReadyDrm)
-> Parser (Maybe Text) -> Parser PlayReadyDrm
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
"LicenseAcquisitionUrl")
)
instance Prelude.Hashable PlayReadyDrm
instance Prelude.NFData PlayReadyDrm
instance Core.ToJSON PlayReadyDrm where
toJSON :: PlayReadyDrm -> Value
toJSON PlayReadyDrm' {Maybe Text
licenseAcquisitionUrl :: Maybe Text
initializationVector :: Maybe Text
key :: Maybe Text
keyMd5 :: Maybe Text
format :: Maybe Text
keyId :: Maybe Text
$sel:licenseAcquisitionUrl:PlayReadyDrm' :: PlayReadyDrm -> Maybe Text
$sel:initializationVector:PlayReadyDrm' :: PlayReadyDrm -> Maybe Text
$sel:key:PlayReadyDrm' :: PlayReadyDrm -> Maybe Text
$sel:keyMd5:PlayReadyDrm' :: PlayReadyDrm -> Maybe Text
$sel:format:PlayReadyDrm' :: PlayReadyDrm -> Maybe Text
$sel:keyId:PlayReadyDrm' :: PlayReadyDrm -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"KeyId" 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
keyId,
(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
"KeyMd5" 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
keyMd5,
(Text
"Key" 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
key,
(Text
"InitializationVector" 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
initializationVector,
(Text
"LicenseAcquisitionUrl" 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
licenseAcquisitionUrl
]
)