{-# 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.MediaLive.Types.HlsAkamaiSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.HlsAkamaiHttpTransferMode
import qualified Amazonka.Prelude as Prelude
data HlsAkamaiSettings = HlsAkamaiSettings'
{
HlsAkamaiSettings -> Maybe Natural
connectionRetryInterval :: Prelude.Maybe Prelude.Natural,
HlsAkamaiSettings -> Maybe Natural
filecacheDuration :: Prelude.Maybe Prelude.Natural,
HlsAkamaiSettings -> Maybe HlsAkamaiHttpTransferMode
httpTransferMode :: Prelude.Maybe HlsAkamaiHttpTransferMode,
HlsAkamaiSettings -> Maybe Natural
numRetries :: Prelude.Maybe Prelude.Natural,
HlsAkamaiSettings -> Maybe Natural
restartDelay :: Prelude.Maybe Prelude.Natural,
HlsAkamaiSettings -> Maybe Text
salt :: Prelude.Maybe Prelude.Text,
HlsAkamaiSettings -> Maybe Text
token :: Prelude.Maybe Prelude.Text
}
deriving (HlsAkamaiSettings -> HlsAkamaiSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsAkamaiSettings -> HlsAkamaiSettings -> Bool
$c/= :: HlsAkamaiSettings -> HlsAkamaiSettings -> Bool
== :: HlsAkamaiSettings -> HlsAkamaiSettings -> Bool
$c== :: HlsAkamaiSettings -> HlsAkamaiSettings -> Bool
Prelude.Eq, ReadPrec [HlsAkamaiSettings]
ReadPrec HlsAkamaiSettings
Int -> ReadS HlsAkamaiSettings
ReadS [HlsAkamaiSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsAkamaiSettings]
$creadListPrec :: ReadPrec [HlsAkamaiSettings]
readPrec :: ReadPrec HlsAkamaiSettings
$creadPrec :: ReadPrec HlsAkamaiSettings
readList :: ReadS [HlsAkamaiSettings]
$creadList :: ReadS [HlsAkamaiSettings]
readsPrec :: Int -> ReadS HlsAkamaiSettings
$creadsPrec :: Int -> ReadS HlsAkamaiSettings
Prelude.Read, Int -> HlsAkamaiSettings -> ShowS
[HlsAkamaiSettings] -> ShowS
HlsAkamaiSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsAkamaiSettings] -> ShowS
$cshowList :: [HlsAkamaiSettings] -> ShowS
show :: HlsAkamaiSettings -> String
$cshow :: HlsAkamaiSettings -> String
showsPrec :: Int -> HlsAkamaiSettings -> ShowS
$cshowsPrec :: Int -> HlsAkamaiSettings -> ShowS
Prelude.Show, forall x. Rep HlsAkamaiSettings x -> HlsAkamaiSettings
forall x. HlsAkamaiSettings -> Rep HlsAkamaiSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HlsAkamaiSettings x -> HlsAkamaiSettings
$cfrom :: forall x. HlsAkamaiSettings -> Rep HlsAkamaiSettings x
Prelude.Generic)
newHlsAkamaiSettings ::
HlsAkamaiSettings
newHlsAkamaiSettings :: HlsAkamaiSettings
newHlsAkamaiSettings =
HlsAkamaiSettings'
{ $sel:connectionRetryInterval:HlsAkamaiSettings' :: Maybe Natural
connectionRetryInterval =
forall a. Maybe a
Prelude.Nothing,
$sel:filecacheDuration:HlsAkamaiSettings' :: Maybe Natural
filecacheDuration = forall a. Maybe a
Prelude.Nothing,
$sel:httpTransferMode:HlsAkamaiSettings' :: Maybe HlsAkamaiHttpTransferMode
httpTransferMode = forall a. Maybe a
Prelude.Nothing,
$sel:numRetries:HlsAkamaiSettings' :: Maybe Natural
numRetries = forall a. Maybe a
Prelude.Nothing,
$sel:restartDelay:HlsAkamaiSettings' :: Maybe Natural
restartDelay = forall a. Maybe a
Prelude.Nothing,
$sel:salt:HlsAkamaiSettings' :: Maybe Text
salt = forall a. Maybe a
Prelude.Nothing,
$sel:token:HlsAkamaiSettings' :: Maybe Text
token = forall a. Maybe a
Prelude.Nothing
}
hlsAkamaiSettings_connectionRetryInterval :: Lens.Lens' HlsAkamaiSettings (Prelude.Maybe Prelude.Natural)
hlsAkamaiSettings_connectionRetryInterval :: Lens' HlsAkamaiSettings (Maybe Natural)
hlsAkamaiSettings_connectionRetryInterval = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsAkamaiSettings' {Maybe Natural
connectionRetryInterval :: Maybe Natural
$sel:connectionRetryInterval:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
connectionRetryInterval} -> Maybe Natural
connectionRetryInterval) (\s :: HlsAkamaiSettings
s@HlsAkamaiSettings' {} Maybe Natural
a -> HlsAkamaiSettings
s {$sel:connectionRetryInterval:HlsAkamaiSettings' :: Maybe Natural
connectionRetryInterval = Maybe Natural
a} :: HlsAkamaiSettings)
hlsAkamaiSettings_filecacheDuration :: Lens.Lens' HlsAkamaiSettings (Prelude.Maybe Prelude.Natural)
hlsAkamaiSettings_filecacheDuration :: Lens' HlsAkamaiSettings (Maybe Natural)
hlsAkamaiSettings_filecacheDuration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsAkamaiSettings' {Maybe Natural
filecacheDuration :: Maybe Natural
$sel:filecacheDuration:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
filecacheDuration} -> Maybe Natural
filecacheDuration) (\s :: HlsAkamaiSettings
s@HlsAkamaiSettings' {} Maybe Natural
a -> HlsAkamaiSettings
s {$sel:filecacheDuration:HlsAkamaiSettings' :: Maybe Natural
filecacheDuration = Maybe Natural
a} :: HlsAkamaiSettings)
hlsAkamaiSettings_httpTransferMode :: Lens.Lens' HlsAkamaiSettings (Prelude.Maybe HlsAkamaiHttpTransferMode)
hlsAkamaiSettings_httpTransferMode :: Lens' HlsAkamaiSettings (Maybe HlsAkamaiHttpTransferMode)
hlsAkamaiSettings_httpTransferMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsAkamaiSettings' {Maybe HlsAkamaiHttpTransferMode
httpTransferMode :: Maybe HlsAkamaiHttpTransferMode
$sel:httpTransferMode:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe HlsAkamaiHttpTransferMode
httpTransferMode} -> Maybe HlsAkamaiHttpTransferMode
httpTransferMode) (\s :: HlsAkamaiSettings
s@HlsAkamaiSettings' {} Maybe HlsAkamaiHttpTransferMode
a -> HlsAkamaiSettings
s {$sel:httpTransferMode:HlsAkamaiSettings' :: Maybe HlsAkamaiHttpTransferMode
httpTransferMode = Maybe HlsAkamaiHttpTransferMode
a} :: HlsAkamaiSettings)
hlsAkamaiSettings_numRetries :: Lens.Lens' HlsAkamaiSettings (Prelude.Maybe Prelude.Natural)
hlsAkamaiSettings_numRetries :: Lens' HlsAkamaiSettings (Maybe Natural)
hlsAkamaiSettings_numRetries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsAkamaiSettings' {Maybe Natural
numRetries :: Maybe Natural
$sel:numRetries:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
numRetries} -> Maybe Natural
numRetries) (\s :: HlsAkamaiSettings
s@HlsAkamaiSettings' {} Maybe Natural
a -> HlsAkamaiSettings
s {$sel:numRetries:HlsAkamaiSettings' :: Maybe Natural
numRetries = Maybe Natural
a} :: HlsAkamaiSettings)
hlsAkamaiSettings_restartDelay :: Lens.Lens' HlsAkamaiSettings (Prelude.Maybe Prelude.Natural)
hlsAkamaiSettings_restartDelay :: Lens' HlsAkamaiSettings (Maybe Natural)
hlsAkamaiSettings_restartDelay = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsAkamaiSettings' {Maybe Natural
restartDelay :: Maybe Natural
$sel:restartDelay:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
restartDelay} -> Maybe Natural
restartDelay) (\s :: HlsAkamaiSettings
s@HlsAkamaiSettings' {} Maybe Natural
a -> HlsAkamaiSettings
s {$sel:restartDelay:HlsAkamaiSettings' :: Maybe Natural
restartDelay = Maybe Natural
a} :: HlsAkamaiSettings)
hlsAkamaiSettings_salt :: Lens.Lens' HlsAkamaiSettings (Prelude.Maybe Prelude.Text)
hlsAkamaiSettings_salt :: Lens' HlsAkamaiSettings (Maybe Text)
hlsAkamaiSettings_salt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsAkamaiSettings' {Maybe Text
salt :: Maybe Text
$sel:salt:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Text
salt} -> Maybe Text
salt) (\s :: HlsAkamaiSettings
s@HlsAkamaiSettings' {} Maybe Text
a -> HlsAkamaiSettings
s {$sel:salt:HlsAkamaiSettings' :: Maybe Text
salt = Maybe Text
a} :: HlsAkamaiSettings)
hlsAkamaiSettings_token :: Lens.Lens' HlsAkamaiSettings (Prelude.Maybe Prelude.Text)
hlsAkamaiSettings_token :: Lens' HlsAkamaiSettings (Maybe Text)
hlsAkamaiSettings_token = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsAkamaiSettings' {Maybe Text
token :: Maybe Text
$sel:token:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Text
token} -> Maybe Text
token) (\s :: HlsAkamaiSettings
s@HlsAkamaiSettings' {} Maybe Text
a -> HlsAkamaiSettings
s {$sel:token:HlsAkamaiSettings' :: Maybe Text
token = Maybe Text
a} :: HlsAkamaiSettings)
instance Data.FromJSON HlsAkamaiSettings where
parseJSON :: Value -> Parser HlsAkamaiSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"HlsAkamaiSettings"
( \Object
x ->
Maybe Natural
-> Maybe Natural
-> Maybe HlsAkamaiHttpTransferMode
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> HlsAkamaiSettings
HlsAkamaiSettings'
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
"connectionRetryInterval")
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
"filecacheDuration")
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
"httpTransferMode")
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
"numRetries")
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
"restartDelay")
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
"salt")
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
"token")
)
instance Prelude.Hashable HlsAkamaiSettings where
hashWithSalt :: Int -> HlsAkamaiSettings -> Int
hashWithSalt Int
_salt HlsAkamaiSettings' {Maybe Natural
Maybe Text
Maybe HlsAkamaiHttpTransferMode
token :: Maybe Text
salt :: Maybe Text
restartDelay :: Maybe Natural
numRetries :: Maybe Natural
httpTransferMode :: Maybe HlsAkamaiHttpTransferMode
filecacheDuration :: Maybe Natural
connectionRetryInterval :: Maybe Natural
$sel:token:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Text
$sel:salt:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Text
$sel:restartDelay:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
$sel:numRetries:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
$sel:httpTransferMode:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe HlsAkamaiHttpTransferMode
$sel:filecacheDuration:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
$sel:connectionRetryInterval:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
connectionRetryInterval
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
filecacheDuration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsAkamaiHttpTransferMode
httpTransferMode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
numRetries
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
restartDelay
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
token
instance Prelude.NFData HlsAkamaiSettings where
rnf :: HlsAkamaiSettings -> ()
rnf HlsAkamaiSettings' {Maybe Natural
Maybe Text
Maybe HlsAkamaiHttpTransferMode
token :: Maybe Text
salt :: Maybe Text
restartDelay :: Maybe Natural
numRetries :: Maybe Natural
httpTransferMode :: Maybe HlsAkamaiHttpTransferMode
filecacheDuration :: Maybe Natural
connectionRetryInterval :: Maybe Natural
$sel:token:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Text
$sel:salt:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Text
$sel:restartDelay:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
$sel:numRetries:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
$sel:httpTransferMode:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe HlsAkamaiHttpTransferMode
$sel:filecacheDuration:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
$sel:connectionRetryInterval:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
connectionRetryInterval
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
filecacheDuration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsAkamaiHttpTransferMode
httpTransferMode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
numRetries
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
restartDelay
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
salt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
token
instance Data.ToJSON HlsAkamaiSettings where
toJSON :: HlsAkamaiSettings -> Value
toJSON HlsAkamaiSettings' {Maybe Natural
Maybe Text
Maybe HlsAkamaiHttpTransferMode
token :: Maybe Text
salt :: Maybe Text
restartDelay :: Maybe Natural
numRetries :: Maybe Natural
httpTransferMode :: Maybe HlsAkamaiHttpTransferMode
filecacheDuration :: Maybe Natural
connectionRetryInterval :: Maybe Natural
$sel:token:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Text
$sel:salt:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Text
$sel:restartDelay:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
$sel:numRetries:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
$sel:httpTransferMode:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe HlsAkamaiHttpTransferMode
$sel:filecacheDuration:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
$sel:connectionRetryInterval:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"connectionRetryInterval" 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 Natural
connectionRetryInterval,
(Key
"filecacheDuration" 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 Natural
filecacheDuration,
(Key
"httpTransferMode" 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 HlsAkamaiHttpTransferMode
httpTransferMode,
(Key
"numRetries" 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 Natural
numRetries,
(Key
"restartDelay" 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 Natural
restartDelay,
(Key
"salt" 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
salt,
(Key
"token" 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
token
]
)