{-# 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.HlsInputSettings 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.HlsScte35SourceType
import qualified Amazonka.Prelude as Prelude
data HlsInputSettings = HlsInputSettings'
{
HlsInputSettings -> Maybe Natural
bandwidth :: Prelude.Maybe Prelude.Natural,
HlsInputSettings -> Maybe Natural
bufferSegments :: Prelude.Maybe Prelude.Natural,
HlsInputSettings -> Maybe Natural
retries :: Prelude.Maybe Prelude.Natural,
HlsInputSettings -> Maybe Natural
retryInterval :: Prelude.Maybe Prelude.Natural,
HlsInputSettings -> Maybe HlsScte35SourceType
scte35Source :: Prelude.Maybe HlsScte35SourceType
}
deriving (HlsInputSettings -> HlsInputSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsInputSettings -> HlsInputSettings -> Bool
$c/= :: HlsInputSettings -> HlsInputSettings -> Bool
== :: HlsInputSettings -> HlsInputSettings -> Bool
$c== :: HlsInputSettings -> HlsInputSettings -> Bool
Prelude.Eq, ReadPrec [HlsInputSettings]
ReadPrec HlsInputSettings
Int -> ReadS HlsInputSettings
ReadS [HlsInputSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsInputSettings]
$creadListPrec :: ReadPrec [HlsInputSettings]
readPrec :: ReadPrec HlsInputSettings
$creadPrec :: ReadPrec HlsInputSettings
readList :: ReadS [HlsInputSettings]
$creadList :: ReadS [HlsInputSettings]
readsPrec :: Int -> ReadS HlsInputSettings
$creadsPrec :: Int -> ReadS HlsInputSettings
Prelude.Read, Int -> HlsInputSettings -> ShowS
[HlsInputSettings] -> ShowS
HlsInputSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsInputSettings] -> ShowS
$cshowList :: [HlsInputSettings] -> ShowS
show :: HlsInputSettings -> String
$cshow :: HlsInputSettings -> String
showsPrec :: Int -> HlsInputSettings -> ShowS
$cshowsPrec :: Int -> HlsInputSettings -> ShowS
Prelude.Show, forall x. Rep HlsInputSettings x -> HlsInputSettings
forall x. HlsInputSettings -> Rep HlsInputSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HlsInputSettings x -> HlsInputSettings
$cfrom :: forall x. HlsInputSettings -> Rep HlsInputSettings x
Prelude.Generic)
newHlsInputSettings ::
HlsInputSettings
newHlsInputSettings :: HlsInputSettings
newHlsInputSettings =
HlsInputSettings'
{ $sel:bandwidth:HlsInputSettings' :: Maybe Natural
bandwidth = forall a. Maybe a
Prelude.Nothing,
$sel:bufferSegments:HlsInputSettings' :: Maybe Natural
bufferSegments = forall a. Maybe a
Prelude.Nothing,
$sel:retries:HlsInputSettings' :: Maybe Natural
retries = forall a. Maybe a
Prelude.Nothing,
$sel:retryInterval:HlsInputSettings' :: Maybe Natural
retryInterval = forall a. Maybe a
Prelude.Nothing,
$sel:scte35Source:HlsInputSettings' :: Maybe HlsScte35SourceType
scte35Source = forall a. Maybe a
Prelude.Nothing
}
hlsInputSettings_bandwidth :: Lens.Lens' HlsInputSettings (Prelude.Maybe Prelude.Natural)
hlsInputSettings_bandwidth :: Lens' HlsInputSettings (Maybe Natural)
hlsInputSettings_bandwidth = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsInputSettings' {Maybe Natural
bandwidth :: Maybe Natural
$sel:bandwidth:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
bandwidth} -> Maybe Natural
bandwidth) (\s :: HlsInputSettings
s@HlsInputSettings' {} Maybe Natural
a -> HlsInputSettings
s {$sel:bandwidth:HlsInputSettings' :: Maybe Natural
bandwidth = Maybe Natural
a} :: HlsInputSettings)
hlsInputSettings_bufferSegments :: Lens.Lens' HlsInputSettings (Prelude.Maybe Prelude.Natural)
hlsInputSettings_bufferSegments :: Lens' HlsInputSettings (Maybe Natural)
hlsInputSettings_bufferSegments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsInputSettings' {Maybe Natural
bufferSegments :: Maybe Natural
$sel:bufferSegments:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
bufferSegments} -> Maybe Natural
bufferSegments) (\s :: HlsInputSettings
s@HlsInputSettings' {} Maybe Natural
a -> HlsInputSettings
s {$sel:bufferSegments:HlsInputSettings' :: Maybe Natural
bufferSegments = Maybe Natural
a} :: HlsInputSettings)
hlsInputSettings_retries :: Lens.Lens' HlsInputSettings (Prelude.Maybe Prelude.Natural)
hlsInputSettings_retries :: Lens' HlsInputSettings (Maybe Natural)
hlsInputSettings_retries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsInputSettings' {Maybe Natural
retries :: Maybe Natural
$sel:retries:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
retries} -> Maybe Natural
retries) (\s :: HlsInputSettings
s@HlsInputSettings' {} Maybe Natural
a -> HlsInputSettings
s {$sel:retries:HlsInputSettings' :: Maybe Natural
retries = Maybe Natural
a} :: HlsInputSettings)
hlsInputSettings_retryInterval :: Lens.Lens' HlsInputSettings (Prelude.Maybe Prelude.Natural)
hlsInputSettings_retryInterval :: Lens' HlsInputSettings (Maybe Natural)
hlsInputSettings_retryInterval = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsInputSettings' {Maybe Natural
retryInterval :: Maybe Natural
$sel:retryInterval:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
retryInterval} -> Maybe Natural
retryInterval) (\s :: HlsInputSettings
s@HlsInputSettings' {} Maybe Natural
a -> HlsInputSettings
s {$sel:retryInterval:HlsInputSettings' :: Maybe Natural
retryInterval = Maybe Natural
a} :: HlsInputSettings)
hlsInputSettings_scte35Source :: Lens.Lens' HlsInputSettings (Prelude.Maybe HlsScte35SourceType)
hlsInputSettings_scte35Source :: Lens' HlsInputSettings (Maybe HlsScte35SourceType)
hlsInputSettings_scte35Source = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsInputSettings' {Maybe HlsScte35SourceType
scte35Source :: Maybe HlsScte35SourceType
$sel:scte35Source:HlsInputSettings' :: HlsInputSettings -> Maybe HlsScte35SourceType
scte35Source} -> Maybe HlsScte35SourceType
scte35Source) (\s :: HlsInputSettings
s@HlsInputSettings' {} Maybe HlsScte35SourceType
a -> HlsInputSettings
s {$sel:scte35Source:HlsInputSettings' :: Maybe HlsScte35SourceType
scte35Source = Maybe HlsScte35SourceType
a} :: HlsInputSettings)
instance Data.FromJSON HlsInputSettings where
parseJSON :: Value -> Parser HlsInputSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"HlsInputSettings"
( \Object
x ->
Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe HlsScte35SourceType
-> HlsInputSettings
HlsInputSettings'
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
"bandwidth")
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
"bufferSegments")
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
"retries")
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
"retryInterval")
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
"scte35Source")
)
instance Prelude.Hashable HlsInputSettings where
hashWithSalt :: Int -> HlsInputSettings -> Int
hashWithSalt Int
_salt HlsInputSettings' {Maybe Natural
Maybe HlsScte35SourceType
scte35Source :: Maybe HlsScte35SourceType
retryInterval :: Maybe Natural
retries :: Maybe Natural
bufferSegments :: Maybe Natural
bandwidth :: Maybe Natural
$sel:scte35Source:HlsInputSettings' :: HlsInputSettings -> Maybe HlsScte35SourceType
$sel:retryInterval:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
$sel:retries:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
$sel:bufferSegments:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
$sel:bandwidth:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
bandwidth
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
bufferSegments
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
retries
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
retryInterval
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsScte35SourceType
scte35Source
instance Prelude.NFData HlsInputSettings where
rnf :: HlsInputSettings -> ()
rnf HlsInputSettings' {Maybe Natural
Maybe HlsScte35SourceType
scte35Source :: Maybe HlsScte35SourceType
retryInterval :: Maybe Natural
retries :: Maybe Natural
bufferSegments :: Maybe Natural
bandwidth :: Maybe Natural
$sel:scte35Source:HlsInputSettings' :: HlsInputSettings -> Maybe HlsScte35SourceType
$sel:retryInterval:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
$sel:retries:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
$sel:bufferSegments:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
$sel:bandwidth:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
bandwidth
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
bufferSegments
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
retries
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
retryInterval
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsScte35SourceType
scte35Source
instance Data.ToJSON HlsInputSettings where
toJSON :: HlsInputSettings -> Value
toJSON HlsInputSettings' {Maybe Natural
Maybe HlsScte35SourceType
scte35Source :: Maybe HlsScte35SourceType
retryInterval :: Maybe Natural
retries :: Maybe Natural
bufferSegments :: Maybe Natural
bandwidth :: Maybe Natural
$sel:scte35Source:HlsInputSettings' :: HlsInputSettings -> Maybe HlsScte35SourceType
$sel:retryInterval:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
$sel:retries:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
$sel:bufferSegments:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
$sel:bandwidth:HlsInputSettings' :: HlsInputSettings -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"bandwidth" 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
bandwidth,
(Key
"bufferSegments" 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
bufferSegments,
(Key
"retries" 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
retries,
(Key
"retryInterval" 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
retryInterval,
(Key
"scte35Source" 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 HlsScte35SourceType
scte35Source
]
)