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