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