{-# 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.HlsContentProtection 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
data HlsContentProtection = HlsContentProtection'
{
HlsContentProtection -> Maybe Text
initializationVector :: Prelude.Maybe Prelude.Text,
HlsContentProtection -> Maybe Text
key :: Prelude.Maybe Prelude.Text,
HlsContentProtection -> Maybe Text
keyMd5 :: Prelude.Maybe Prelude.Text,
HlsContentProtection -> Maybe Text
keyStoragePolicy :: Prelude.Maybe Prelude.Text,
HlsContentProtection -> Maybe Text
licenseAcquisitionUrl :: Prelude.Maybe Prelude.Text,
HlsContentProtection -> Maybe Text
method :: Prelude.Maybe Prelude.Text
}
deriving (HlsContentProtection -> HlsContentProtection -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsContentProtection -> HlsContentProtection -> Bool
$c/= :: HlsContentProtection -> HlsContentProtection -> Bool
== :: HlsContentProtection -> HlsContentProtection -> Bool
$c== :: HlsContentProtection -> HlsContentProtection -> Bool
Prelude.Eq, ReadPrec [HlsContentProtection]
ReadPrec HlsContentProtection
Int -> ReadS HlsContentProtection
ReadS [HlsContentProtection]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsContentProtection]
$creadListPrec :: ReadPrec [HlsContentProtection]
readPrec :: ReadPrec HlsContentProtection
$creadPrec :: ReadPrec HlsContentProtection
readList :: ReadS [HlsContentProtection]
$creadList :: ReadS [HlsContentProtection]
readsPrec :: Int -> ReadS HlsContentProtection
$creadsPrec :: Int -> ReadS HlsContentProtection
Prelude.Read, Int -> HlsContentProtection -> ShowS
[HlsContentProtection] -> ShowS
HlsContentProtection -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsContentProtection] -> ShowS
$cshowList :: [HlsContentProtection] -> ShowS
show :: HlsContentProtection -> String
$cshow :: HlsContentProtection -> String
showsPrec :: Int -> HlsContentProtection -> ShowS
$cshowsPrec :: Int -> HlsContentProtection -> ShowS
Prelude.Show, forall x. Rep HlsContentProtection x -> HlsContentProtection
forall x. HlsContentProtection -> Rep HlsContentProtection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HlsContentProtection x -> HlsContentProtection
$cfrom :: forall x. HlsContentProtection -> Rep HlsContentProtection x
Prelude.Generic)
newHlsContentProtection ::
HlsContentProtection
newHlsContentProtection :: HlsContentProtection
newHlsContentProtection =
HlsContentProtection'
{ $sel:initializationVector:HlsContentProtection' :: Maybe Text
initializationVector =
forall a. Maybe a
Prelude.Nothing,
$sel:key:HlsContentProtection' :: Maybe Text
key = forall a. Maybe a
Prelude.Nothing,
$sel:keyMd5:HlsContentProtection' :: Maybe Text
keyMd5 = forall a. Maybe a
Prelude.Nothing,
$sel:keyStoragePolicy:HlsContentProtection' :: Maybe Text
keyStoragePolicy = forall a. Maybe a
Prelude.Nothing,
$sel:licenseAcquisitionUrl:HlsContentProtection' :: Maybe Text
licenseAcquisitionUrl = forall a. Maybe a
Prelude.Nothing,
$sel:method:HlsContentProtection' :: Maybe Text
method = forall a. Maybe a
Prelude.Nothing
}
hlsContentProtection_initializationVector :: Lens.Lens' HlsContentProtection (Prelude.Maybe Prelude.Text)
hlsContentProtection_initializationVector :: Lens' HlsContentProtection (Maybe Text)
hlsContentProtection_initializationVector = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsContentProtection' {Maybe Text
initializationVector :: Maybe Text
$sel:initializationVector:HlsContentProtection' :: HlsContentProtection -> Maybe Text
initializationVector} -> Maybe Text
initializationVector) (\s :: HlsContentProtection
s@HlsContentProtection' {} Maybe Text
a -> HlsContentProtection
s {$sel:initializationVector:HlsContentProtection' :: Maybe Text
initializationVector = Maybe Text
a} :: HlsContentProtection)
hlsContentProtection_key :: Lens.Lens' HlsContentProtection (Prelude.Maybe Prelude.Text)
hlsContentProtection_key :: Lens' HlsContentProtection (Maybe Text)
hlsContentProtection_key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsContentProtection' {Maybe Text
key :: Maybe Text
$sel:key:HlsContentProtection' :: HlsContentProtection -> Maybe Text
key} -> Maybe Text
key) (\s :: HlsContentProtection
s@HlsContentProtection' {} Maybe Text
a -> HlsContentProtection
s {$sel:key:HlsContentProtection' :: Maybe Text
key = Maybe Text
a} :: HlsContentProtection)
hlsContentProtection_keyMd5 :: Lens.Lens' HlsContentProtection (Prelude.Maybe Prelude.Text)
hlsContentProtection_keyMd5 :: Lens' HlsContentProtection (Maybe Text)
hlsContentProtection_keyMd5 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsContentProtection' {Maybe Text
keyMd5 :: Maybe Text
$sel:keyMd5:HlsContentProtection' :: HlsContentProtection -> Maybe Text
keyMd5} -> Maybe Text
keyMd5) (\s :: HlsContentProtection
s@HlsContentProtection' {} Maybe Text
a -> HlsContentProtection
s {$sel:keyMd5:HlsContentProtection' :: Maybe Text
keyMd5 = Maybe Text
a} :: HlsContentProtection)
hlsContentProtection_keyStoragePolicy :: Lens.Lens' HlsContentProtection (Prelude.Maybe Prelude.Text)
hlsContentProtection_keyStoragePolicy :: Lens' HlsContentProtection (Maybe Text)
hlsContentProtection_keyStoragePolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsContentProtection' {Maybe Text
keyStoragePolicy :: Maybe Text
$sel:keyStoragePolicy:HlsContentProtection' :: HlsContentProtection -> Maybe Text
keyStoragePolicy} -> Maybe Text
keyStoragePolicy) (\s :: HlsContentProtection
s@HlsContentProtection' {} Maybe Text
a -> HlsContentProtection
s {$sel:keyStoragePolicy:HlsContentProtection' :: Maybe Text
keyStoragePolicy = Maybe Text
a} :: HlsContentProtection)
hlsContentProtection_licenseAcquisitionUrl :: Lens.Lens' HlsContentProtection (Prelude.Maybe Prelude.Text)
hlsContentProtection_licenseAcquisitionUrl :: Lens' HlsContentProtection (Maybe Text)
hlsContentProtection_licenseAcquisitionUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsContentProtection' {Maybe Text
licenseAcquisitionUrl :: Maybe Text
$sel:licenseAcquisitionUrl:HlsContentProtection' :: HlsContentProtection -> Maybe Text
licenseAcquisitionUrl} -> Maybe Text
licenseAcquisitionUrl) (\s :: HlsContentProtection
s@HlsContentProtection' {} Maybe Text
a -> HlsContentProtection
s {$sel:licenseAcquisitionUrl:HlsContentProtection' :: Maybe Text
licenseAcquisitionUrl = Maybe Text
a} :: HlsContentProtection)
hlsContentProtection_method :: Lens.Lens' HlsContentProtection (Prelude.Maybe Prelude.Text)
hlsContentProtection_method :: Lens' HlsContentProtection (Maybe Text)
hlsContentProtection_method = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsContentProtection' {Maybe Text
method :: Maybe Text
$sel:method:HlsContentProtection' :: HlsContentProtection -> Maybe Text
method} -> Maybe Text
method) (\s :: HlsContentProtection
s@HlsContentProtection' {} Maybe Text
a -> HlsContentProtection
s {$sel:method:HlsContentProtection' :: Maybe Text
method = Maybe Text
a} :: HlsContentProtection)
instance Data.FromJSON HlsContentProtection where
parseJSON :: Value -> Parser HlsContentProtection
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"HlsContentProtection"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> HlsContentProtection
HlsContentProtection'
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
"InitializationVector")
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
"Key")
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
"KeyMd5")
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
"KeyStoragePolicy")
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
"LicenseAcquisitionUrl")
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
"Method")
)
instance Prelude.Hashable HlsContentProtection where
hashWithSalt :: Int -> HlsContentProtection -> Int
hashWithSalt Int
_salt HlsContentProtection' {Maybe Text
method :: Maybe Text
licenseAcquisitionUrl :: Maybe Text
keyStoragePolicy :: Maybe Text
keyMd5 :: Maybe Text
key :: Maybe Text
initializationVector :: Maybe Text
$sel:method:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:licenseAcquisitionUrl:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:keyStoragePolicy:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:keyMd5:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:key:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:initializationVector:HlsContentProtection' :: HlsContentProtection -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
initializationVector
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
key
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
keyMd5
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
keyStoragePolicy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
licenseAcquisitionUrl
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
method
instance Prelude.NFData HlsContentProtection where
rnf :: HlsContentProtection -> ()
rnf HlsContentProtection' {Maybe Text
method :: Maybe Text
licenseAcquisitionUrl :: Maybe Text
keyStoragePolicy :: Maybe Text
keyMd5 :: Maybe Text
key :: Maybe Text
initializationVector :: Maybe Text
$sel:method:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:licenseAcquisitionUrl:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:keyStoragePolicy:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:keyMd5:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:key:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:initializationVector:HlsContentProtection' :: HlsContentProtection -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
initializationVector
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
key
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
keyMd5
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
keyStoragePolicy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
licenseAcquisitionUrl
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
method
instance Data.ToJSON HlsContentProtection where
toJSON :: HlsContentProtection -> Value
toJSON HlsContentProtection' {Maybe Text
method :: Maybe Text
licenseAcquisitionUrl :: Maybe Text
keyStoragePolicy :: Maybe Text
keyMd5 :: Maybe Text
key :: Maybe Text
initializationVector :: Maybe Text
$sel:method:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:licenseAcquisitionUrl:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:keyStoragePolicy:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:keyMd5:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:key:HlsContentProtection' :: HlsContentProtection -> Maybe Text
$sel:initializationVector:HlsContentProtection' :: HlsContentProtection -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"InitializationVector" 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
initializationVector,
(Key
"Key" 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
key,
(Key
"KeyMd5" 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
keyMd5,
(Key
"KeyStoragePolicy" 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
keyStoragePolicy,
(Key
"LicenseAcquisitionUrl" 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
licenseAcquisitionUrl,
(Key
"Method" 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
method
]
)