{-# 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.Lens as Lens
import Amazonka.MediaLive.Types.HlsAkamaiHttpTransferMode
import qualified Amazonka.Prelude as Prelude
data HlsAkamaiSettings = HlsAkamaiSettings'
{
HlsAkamaiSettings -> Maybe HlsAkamaiHttpTransferMode
httpTransferMode :: Prelude.Maybe HlsAkamaiHttpTransferMode,
HlsAkamaiSettings -> Maybe Natural
numRetries :: Prelude.Maybe Prelude.Natural,
HlsAkamaiSettings -> Maybe Text
token :: Prelude.Maybe Prelude.Text,
HlsAkamaiSettings -> Maybe Natural
connectionRetryInterval :: Prelude.Maybe Prelude.Natural,
HlsAkamaiSettings -> Maybe Natural
filecacheDuration :: Prelude.Maybe Prelude.Natural,
HlsAkamaiSettings -> Maybe Natural
restartDelay :: Prelude.Maybe Prelude.Natural,
HlsAkamaiSettings -> Maybe Text
salt :: Prelude.Maybe Prelude.Text
}
deriving (HlsAkamaiSettings -> HlsAkamaiSettings -> Bool
(HlsAkamaiSettings -> HlsAkamaiSettings -> Bool)
-> (HlsAkamaiSettings -> HlsAkamaiSettings -> Bool)
-> Eq HlsAkamaiSettings
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]
(Int -> ReadS HlsAkamaiSettings)
-> ReadS [HlsAkamaiSettings]
-> ReadPrec HlsAkamaiSettings
-> ReadPrec [HlsAkamaiSettings]
-> Read 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
(Int -> HlsAkamaiSettings -> ShowS)
-> (HlsAkamaiSettings -> String)
-> ([HlsAkamaiSettings] -> ShowS)
-> Show HlsAkamaiSettings
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. HlsAkamaiSettings -> Rep HlsAkamaiSettings x)
-> (forall x. Rep HlsAkamaiSettings x -> HlsAkamaiSettings)
-> Generic HlsAkamaiSettings
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' :: Maybe HlsAkamaiHttpTransferMode
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> HlsAkamaiSettings
HlsAkamaiSettings'
{ $sel:httpTransferMode:HlsAkamaiSettings' :: Maybe HlsAkamaiHttpTransferMode
httpTransferMode =
Maybe HlsAkamaiHttpTransferMode
forall a. Maybe a
Prelude.Nothing,
$sel:numRetries:HlsAkamaiSettings' :: Maybe Natural
numRetries = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:token:HlsAkamaiSettings' :: Maybe Text
token = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:connectionRetryInterval:HlsAkamaiSettings' :: Maybe Natural
connectionRetryInterval = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:filecacheDuration:HlsAkamaiSettings' :: Maybe Natural
filecacheDuration = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:restartDelay:HlsAkamaiSettings' :: Maybe Natural
restartDelay = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:salt:HlsAkamaiSettings' :: Maybe Text
salt = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
hlsAkamaiSettings_httpTransferMode :: Lens.Lens' HlsAkamaiSettings (Prelude.Maybe HlsAkamaiHttpTransferMode)
hlsAkamaiSettings_httpTransferMode :: (Maybe HlsAkamaiHttpTransferMode
-> f (Maybe HlsAkamaiHttpTransferMode))
-> HlsAkamaiSettings -> f HlsAkamaiSettings
hlsAkamaiSettings_httpTransferMode = (HlsAkamaiSettings -> Maybe HlsAkamaiHttpTransferMode)
-> (HlsAkamaiSettings
-> Maybe HlsAkamaiHttpTransferMode -> HlsAkamaiSettings)
-> Lens
HlsAkamaiSettings
HlsAkamaiSettings
(Maybe HlsAkamaiHttpTransferMode)
(Maybe HlsAkamaiHttpTransferMode)
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 :: (Maybe Natural -> f (Maybe Natural))
-> HlsAkamaiSettings -> f HlsAkamaiSettings
hlsAkamaiSettings_numRetries = (HlsAkamaiSettings -> Maybe Natural)
-> (HlsAkamaiSettings -> Maybe Natural -> HlsAkamaiSettings)
-> Lens
HlsAkamaiSettings HlsAkamaiSettings (Maybe Natural) (Maybe Natural)
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_token :: Lens.Lens' HlsAkamaiSettings (Prelude.Maybe Prelude.Text)
hlsAkamaiSettings_token :: (Maybe Text -> f (Maybe Text))
-> HlsAkamaiSettings -> f HlsAkamaiSettings
hlsAkamaiSettings_token = (HlsAkamaiSettings -> Maybe Text)
-> (HlsAkamaiSettings -> Maybe Text -> HlsAkamaiSettings)
-> Lens
HlsAkamaiSettings HlsAkamaiSettings (Maybe Text) (Maybe Text)
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)
hlsAkamaiSettings_connectionRetryInterval :: Lens.Lens' HlsAkamaiSettings (Prelude.Maybe Prelude.Natural)
hlsAkamaiSettings_connectionRetryInterval :: (Maybe Natural -> f (Maybe Natural))
-> HlsAkamaiSettings -> f HlsAkamaiSettings
hlsAkamaiSettings_connectionRetryInterval = (HlsAkamaiSettings -> Maybe Natural)
-> (HlsAkamaiSettings -> Maybe Natural -> HlsAkamaiSettings)
-> Lens
HlsAkamaiSettings HlsAkamaiSettings (Maybe Natural) (Maybe Natural)
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 :: (Maybe Natural -> f (Maybe Natural))
-> HlsAkamaiSettings -> f HlsAkamaiSettings
hlsAkamaiSettings_filecacheDuration = (HlsAkamaiSettings -> Maybe Natural)
-> (HlsAkamaiSettings -> Maybe Natural -> HlsAkamaiSettings)
-> Lens
HlsAkamaiSettings HlsAkamaiSettings (Maybe Natural) (Maybe Natural)
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_restartDelay :: Lens.Lens' HlsAkamaiSettings (Prelude.Maybe Prelude.Natural)
hlsAkamaiSettings_restartDelay :: (Maybe Natural -> f (Maybe Natural))
-> HlsAkamaiSettings -> f HlsAkamaiSettings
hlsAkamaiSettings_restartDelay = (HlsAkamaiSettings -> Maybe Natural)
-> (HlsAkamaiSettings -> Maybe Natural -> HlsAkamaiSettings)
-> Lens
HlsAkamaiSettings HlsAkamaiSettings (Maybe Natural) (Maybe Natural)
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 :: (Maybe Text -> f (Maybe Text))
-> HlsAkamaiSettings -> f HlsAkamaiSettings
hlsAkamaiSettings_salt = (HlsAkamaiSettings -> Maybe Text)
-> (HlsAkamaiSettings -> Maybe Text -> HlsAkamaiSettings)
-> Lens
HlsAkamaiSettings HlsAkamaiSettings (Maybe Text) (Maybe Text)
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)
instance Core.FromJSON HlsAkamaiSettings where
parseJSON :: Value -> Parser HlsAkamaiSettings
parseJSON =
String
-> (Object -> Parser HlsAkamaiSettings)
-> Value
-> Parser HlsAkamaiSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"HlsAkamaiSettings"
( \Object
x ->
Maybe HlsAkamaiHttpTransferMode
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> HlsAkamaiSettings
HlsAkamaiSettings'
(Maybe HlsAkamaiHttpTransferMode
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> HlsAkamaiSettings)
-> Parser (Maybe HlsAkamaiHttpTransferMode)
-> Parser
(Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> HlsAkamaiSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe HlsAkamaiHttpTransferMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"httpTransferMode")
Parser
(Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> HlsAkamaiSettings)
-> Parser (Maybe Natural)
-> Parser
(Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> HlsAkamaiSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"numRetries")
Parser
(Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> HlsAkamaiSettings)
-> Parser (Maybe Text)
-> Parser
(Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> HlsAkamaiSettings)
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
"token")
Parser
(Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> HlsAkamaiSettings)
-> Parser (Maybe Natural)
-> Parser
(Maybe Natural -> Maybe Natural -> Maybe Text -> HlsAkamaiSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"connectionRetryInterval")
Parser
(Maybe Natural -> Maybe Natural -> Maybe Text -> HlsAkamaiSettings)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> Maybe Text -> HlsAkamaiSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"filecacheDuration")
Parser (Maybe Natural -> Maybe Text -> HlsAkamaiSettings)
-> Parser (Maybe Natural)
-> Parser (Maybe Text -> HlsAkamaiSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"restartDelay")
Parser (Maybe Text -> HlsAkamaiSettings)
-> Parser (Maybe Text) -> Parser HlsAkamaiSettings
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
"salt")
)
instance Prelude.Hashable HlsAkamaiSettings
instance Prelude.NFData HlsAkamaiSettings
instance Core.ToJSON HlsAkamaiSettings where
toJSON :: HlsAkamaiSettings -> Value
toJSON HlsAkamaiSettings' {Maybe Natural
Maybe Text
Maybe HlsAkamaiHttpTransferMode
salt :: Maybe Text
restartDelay :: Maybe Natural
filecacheDuration :: Maybe Natural
connectionRetryInterval :: Maybe Natural
token :: Maybe Text
numRetries :: Maybe Natural
httpTransferMode :: Maybe HlsAkamaiHttpTransferMode
$sel:salt:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Text
$sel:restartDelay:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
$sel:filecacheDuration:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
$sel:connectionRetryInterval:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
$sel:token:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Text
$sel:numRetries:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe Natural
$sel:httpTransferMode:HlsAkamaiSettings' :: HlsAkamaiSettings -> Maybe HlsAkamaiHttpTransferMode
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"httpTransferMode" Text -> HlsAkamaiHttpTransferMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HlsAkamaiHttpTransferMode -> Pair)
-> Maybe HlsAkamaiHttpTransferMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HlsAkamaiHttpTransferMode
httpTransferMode,
(Text
"numRetries" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
numRetries,
(Text
"token" 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
token,
(Text
"connectionRetryInterval" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
connectionRetryInterval,
(Text
"filecacheDuration" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
filecacheDuration,
(Text
"restartDelay" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
restartDelay,
(Text
"salt" 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
salt
]
)