{-# 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.HlsMediaStoreSettings 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.HlsMediaStoreStorageClass
import qualified Amazonka.Prelude as Prelude
data HlsMediaStoreSettings = HlsMediaStoreSettings'
{
HlsMediaStoreSettings -> Maybe Natural
connectionRetryInterval :: Prelude.Maybe Prelude.Natural,
HlsMediaStoreSettings -> Maybe Natural
filecacheDuration :: Prelude.Maybe Prelude.Natural,
HlsMediaStoreSettings -> Maybe HlsMediaStoreStorageClass
mediaStoreStorageClass :: Prelude.Maybe HlsMediaStoreStorageClass,
HlsMediaStoreSettings -> Maybe Natural
numRetries :: Prelude.Maybe Prelude.Natural,
HlsMediaStoreSettings -> Maybe Natural
restartDelay :: Prelude.Maybe Prelude.Natural
}
deriving (HlsMediaStoreSettings -> HlsMediaStoreSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsMediaStoreSettings -> HlsMediaStoreSettings -> Bool
$c/= :: HlsMediaStoreSettings -> HlsMediaStoreSettings -> Bool
== :: HlsMediaStoreSettings -> HlsMediaStoreSettings -> Bool
$c== :: HlsMediaStoreSettings -> HlsMediaStoreSettings -> Bool
Prelude.Eq, ReadPrec [HlsMediaStoreSettings]
ReadPrec HlsMediaStoreSettings
Int -> ReadS HlsMediaStoreSettings
ReadS [HlsMediaStoreSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsMediaStoreSettings]
$creadListPrec :: ReadPrec [HlsMediaStoreSettings]
readPrec :: ReadPrec HlsMediaStoreSettings
$creadPrec :: ReadPrec HlsMediaStoreSettings
readList :: ReadS [HlsMediaStoreSettings]
$creadList :: ReadS [HlsMediaStoreSettings]
readsPrec :: Int -> ReadS HlsMediaStoreSettings
$creadsPrec :: Int -> ReadS HlsMediaStoreSettings
Prelude.Read, Int -> HlsMediaStoreSettings -> ShowS
[HlsMediaStoreSettings] -> ShowS
HlsMediaStoreSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsMediaStoreSettings] -> ShowS
$cshowList :: [HlsMediaStoreSettings] -> ShowS
show :: HlsMediaStoreSettings -> String
$cshow :: HlsMediaStoreSettings -> String
showsPrec :: Int -> HlsMediaStoreSettings -> ShowS
$cshowsPrec :: Int -> HlsMediaStoreSettings -> ShowS
Prelude.Show, forall x. Rep HlsMediaStoreSettings x -> HlsMediaStoreSettings
forall x. HlsMediaStoreSettings -> Rep HlsMediaStoreSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HlsMediaStoreSettings x -> HlsMediaStoreSettings
$cfrom :: forall x. HlsMediaStoreSettings -> Rep HlsMediaStoreSettings x
Prelude.Generic)
newHlsMediaStoreSettings ::
HlsMediaStoreSettings
newHlsMediaStoreSettings :: HlsMediaStoreSettings
newHlsMediaStoreSettings =
HlsMediaStoreSettings'
{ $sel:connectionRetryInterval:HlsMediaStoreSettings' :: Maybe Natural
connectionRetryInterval =
forall a. Maybe a
Prelude.Nothing,
$sel:filecacheDuration:HlsMediaStoreSettings' :: Maybe Natural
filecacheDuration = forall a. Maybe a
Prelude.Nothing,
$sel:mediaStoreStorageClass:HlsMediaStoreSettings' :: Maybe HlsMediaStoreStorageClass
mediaStoreStorageClass = forall a. Maybe a
Prelude.Nothing,
$sel:numRetries:HlsMediaStoreSettings' :: Maybe Natural
numRetries = forall a. Maybe a
Prelude.Nothing,
$sel:restartDelay:HlsMediaStoreSettings' :: Maybe Natural
restartDelay = forall a. Maybe a
Prelude.Nothing
}
hlsMediaStoreSettings_connectionRetryInterval :: Lens.Lens' HlsMediaStoreSettings (Prelude.Maybe Prelude.Natural)
hlsMediaStoreSettings_connectionRetryInterval :: Lens' HlsMediaStoreSettings (Maybe Natural)
hlsMediaStoreSettings_connectionRetryInterval = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsMediaStoreSettings' {Maybe Natural
connectionRetryInterval :: Maybe Natural
$sel:connectionRetryInterval:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe Natural
connectionRetryInterval} -> Maybe Natural
connectionRetryInterval) (\s :: HlsMediaStoreSettings
s@HlsMediaStoreSettings' {} Maybe Natural
a -> HlsMediaStoreSettings
s {$sel:connectionRetryInterval:HlsMediaStoreSettings' :: Maybe Natural
connectionRetryInterval = Maybe Natural
a} :: HlsMediaStoreSettings)
hlsMediaStoreSettings_filecacheDuration :: Lens.Lens' HlsMediaStoreSettings (Prelude.Maybe Prelude.Natural)
hlsMediaStoreSettings_filecacheDuration :: Lens' HlsMediaStoreSettings (Maybe Natural)
hlsMediaStoreSettings_filecacheDuration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsMediaStoreSettings' {Maybe Natural
filecacheDuration :: Maybe Natural
$sel:filecacheDuration:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe Natural
filecacheDuration} -> Maybe Natural
filecacheDuration) (\s :: HlsMediaStoreSettings
s@HlsMediaStoreSettings' {} Maybe Natural
a -> HlsMediaStoreSettings
s {$sel:filecacheDuration:HlsMediaStoreSettings' :: Maybe Natural
filecacheDuration = Maybe Natural
a} :: HlsMediaStoreSettings)
hlsMediaStoreSettings_mediaStoreStorageClass :: Lens.Lens' HlsMediaStoreSettings (Prelude.Maybe HlsMediaStoreStorageClass)
hlsMediaStoreSettings_mediaStoreStorageClass :: Lens' HlsMediaStoreSettings (Maybe HlsMediaStoreStorageClass)
hlsMediaStoreSettings_mediaStoreStorageClass = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsMediaStoreSettings' {Maybe HlsMediaStoreStorageClass
mediaStoreStorageClass :: Maybe HlsMediaStoreStorageClass
$sel:mediaStoreStorageClass:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe HlsMediaStoreStorageClass
mediaStoreStorageClass} -> Maybe HlsMediaStoreStorageClass
mediaStoreStorageClass) (\s :: HlsMediaStoreSettings
s@HlsMediaStoreSettings' {} Maybe HlsMediaStoreStorageClass
a -> HlsMediaStoreSettings
s {$sel:mediaStoreStorageClass:HlsMediaStoreSettings' :: Maybe HlsMediaStoreStorageClass
mediaStoreStorageClass = Maybe HlsMediaStoreStorageClass
a} :: HlsMediaStoreSettings)
hlsMediaStoreSettings_numRetries :: Lens.Lens' HlsMediaStoreSettings (Prelude.Maybe Prelude.Natural)
hlsMediaStoreSettings_numRetries :: Lens' HlsMediaStoreSettings (Maybe Natural)
hlsMediaStoreSettings_numRetries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsMediaStoreSettings' {Maybe Natural
numRetries :: Maybe Natural
$sel:numRetries:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe Natural
numRetries} -> Maybe Natural
numRetries) (\s :: HlsMediaStoreSettings
s@HlsMediaStoreSettings' {} Maybe Natural
a -> HlsMediaStoreSettings
s {$sel:numRetries:HlsMediaStoreSettings' :: Maybe Natural
numRetries = Maybe Natural
a} :: HlsMediaStoreSettings)
hlsMediaStoreSettings_restartDelay :: Lens.Lens' HlsMediaStoreSettings (Prelude.Maybe Prelude.Natural)
hlsMediaStoreSettings_restartDelay :: Lens' HlsMediaStoreSettings (Maybe Natural)
hlsMediaStoreSettings_restartDelay = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsMediaStoreSettings' {Maybe Natural
restartDelay :: Maybe Natural
$sel:restartDelay:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe Natural
restartDelay} -> Maybe Natural
restartDelay) (\s :: HlsMediaStoreSettings
s@HlsMediaStoreSettings' {} Maybe Natural
a -> HlsMediaStoreSettings
s {$sel:restartDelay:HlsMediaStoreSettings' :: Maybe Natural
restartDelay = Maybe Natural
a} :: HlsMediaStoreSettings)
instance Data.FromJSON HlsMediaStoreSettings where
parseJSON :: Value -> Parser HlsMediaStoreSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"HlsMediaStoreSettings"
( \Object
x ->
Maybe Natural
-> Maybe Natural
-> Maybe HlsMediaStoreStorageClass
-> Maybe Natural
-> Maybe Natural
-> HlsMediaStoreSettings
HlsMediaStoreSettings'
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
"mediaStoreStorageClass")
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")
)
instance Prelude.Hashable HlsMediaStoreSettings where
hashWithSalt :: Int -> HlsMediaStoreSettings -> Int
hashWithSalt Int
_salt HlsMediaStoreSettings' {Maybe Natural
Maybe HlsMediaStoreStorageClass
restartDelay :: Maybe Natural
numRetries :: Maybe Natural
mediaStoreStorageClass :: Maybe HlsMediaStoreStorageClass
filecacheDuration :: Maybe Natural
connectionRetryInterval :: Maybe Natural
$sel:restartDelay:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe Natural
$sel:numRetries:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe Natural
$sel:mediaStoreStorageClass:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe HlsMediaStoreStorageClass
$sel:filecacheDuration:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe Natural
$sel:connectionRetryInterval:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> 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 HlsMediaStoreStorageClass
mediaStoreStorageClass
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
numRetries
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
restartDelay
instance Prelude.NFData HlsMediaStoreSettings where
rnf :: HlsMediaStoreSettings -> ()
rnf HlsMediaStoreSettings' {Maybe Natural
Maybe HlsMediaStoreStorageClass
restartDelay :: Maybe Natural
numRetries :: Maybe Natural
mediaStoreStorageClass :: Maybe HlsMediaStoreStorageClass
filecacheDuration :: Maybe Natural
connectionRetryInterval :: Maybe Natural
$sel:restartDelay:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe Natural
$sel:numRetries:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe Natural
$sel:mediaStoreStorageClass:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe HlsMediaStoreStorageClass
$sel:filecacheDuration:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe Natural
$sel:connectionRetryInterval:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> 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 HlsMediaStoreStorageClass
mediaStoreStorageClass
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
instance Data.ToJSON HlsMediaStoreSettings where
toJSON :: HlsMediaStoreSettings -> Value
toJSON HlsMediaStoreSettings' {Maybe Natural
Maybe HlsMediaStoreStorageClass
restartDelay :: Maybe Natural
numRetries :: Maybe Natural
mediaStoreStorageClass :: Maybe HlsMediaStoreStorageClass
filecacheDuration :: Maybe Natural
connectionRetryInterval :: Maybe Natural
$sel:restartDelay:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe Natural
$sel:numRetries:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe Natural
$sel:mediaStoreStorageClass:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe HlsMediaStoreStorageClass
$sel:filecacheDuration:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> Maybe Natural
$sel:connectionRetryInterval:HlsMediaStoreSettings' :: HlsMediaStoreSettings -> 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
"mediaStoreStorageClass" 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 HlsMediaStoreStorageClass
mediaStoreStorageClass,
(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
]
)