{-# 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.MediaConnect.Types.FmtpRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConnect.Types.Colorimetry
import Amazonka.MediaConnect.Types.Range
import Amazonka.MediaConnect.Types.ScanMode
import Amazonka.MediaConnect.Types.Tcs
import qualified Amazonka.Prelude as Prelude
data FmtpRequest = FmtpRequest'
{
FmtpRequest -> Maybe Tcs
tcs :: Prelude.Maybe Tcs,
FmtpRequest -> Maybe Text
exactFramerate :: Prelude.Maybe Prelude.Text,
FmtpRequest -> Maybe Text
par :: Prelude.Maybe Prelude.Text,
FmtpRequest -> Maybe ScanMode
scanMode :: Prelude.Maybe ScanMode,
FmtpRequest -> Maybe Range
range :: Prelude.Maybe Range,
FmtpRequest -> Maybe Text
channelOrder :: Prelude.Maybe Prelude.Text,
FmtpRequest -> Maybe Colorimetry
colorimetry :: Prelude.Maybe Colorimetry
}
deriving (FmtpRequest -> FmtpRequest -> Bool
(FmtpRequest -> FmtpRequest -> Bool)
-> (FmtpRequest -> FmtpRequest -> Bool) -> Eq FmtpRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FmtpRequest -> FmtpRequest -> Bool
$c/= :: FmtpRequest -> FmtpRequest -> Bool
== :: FmtpRequest -> FmtpRequest -> Bool
$c== :: FmtpRequest -> FmtpRequest -> Bool
Prelude.Eq, ReadPrec [FmtpRequest]
ReadPrec FmtpRequest
Int -> ReadS FmtpRequest
ReadS [FmtpRequest]
(Int -> ReadS FmtpRequest)
-> ReadS [FmtpRequest]
-> ReadPrec FmtpRequest
-> ReadPrec [FmtpRequest]
-> Read FmtpRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FmtpRequest]
$creadListPrec :: ReadPrec [FmtpRequest]
readPrec :: ReadPrec FmtpRequest
$creadPrec :: ReadPrec FmtpRequest
readList :: ReadS [FmtpRequest]
$creadList :: ReadS [FmtpRequest]
readsPrec :: Int -> ReadS FmtpRequest
$creadsPrec :: Int -> ReadS FmtpRequest
Prelude.Read, Int -> FmtpRequest -> ShowS
[FmtpRequest] -> ShowS
FmtpRequest -> String
(Int -> FmtpRequest -> ShowS)
-> (FmtpRequest -> String)
-> ([FmtpRequest] -> ShowS)
-> Show FmtpRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FmtpRequest] -> ShowS
$cshowList :: [FmtpRequest] -> ShowS
show :: FmtpRequest -> String
$cshow :: FmtpRequest -> String
showsPrec :: Int -> FmtpRequest -> ShowS
$cshowsPrec :: Int -> FmtpRequest -> ShowS
Prelude.Show, (forall x. FmtpRequest -> Rep FmtpRequest x)
-> (forall x. Rep FmtpRequest x -> FmtpRequest)
-> Generic FmtpRequest
forall x. Rep FmtpRequest x -> FmtpRequest
forall x. FmtpRequest -> Rep FmtpRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FmtpRequest x -> FmtpRequest
$cfrom :: forall x. FmtpRequest -> Rep FmtpRequest x
Prelude.Generic)
newFmtpRequest ::
FmtpRequest
newFmtpRequest :: FmtpRequest
newFmtpRequest =
FmtpRequest' :: Maybe Tcs
-> Maybe Text
-> Maybe Text
-> Maybe ScanMode
-> Maybe Range
-> Maybe Text
-> Maybe Colorimetry
-> FmtpRequest
FmtpRequest'
{ $sel:tcs:FmtpRequest' :: Maybe Tcs
tcs = Maybe Tcs
forall a. Maybe a
Prelude.Nothing,
$sel:exactFramerate:FmtpRequest' :: Maybe Text
exactFramerate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:par:FmtpRequest' :: Maybe Text
par = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:scanMode:FmtpRequest' :: Maybe ScanMode
scanMode = Maybe ScanMode
forall a. Maybe a
Prelude.Nothing,
$sel:range:FmtpRequest' :: Maybe Range
range = Maybe Range
forall a. Maybe a
Prelude.Nothing,
$sel:channelOrder:FmtpRequest' :: Maybe Text
channelOrder = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:colorimetry:FmtpRequest' :: Maybe Colorimetry
colorimetry = Maybe Colorimetry
forall a. Maybe a
Prelude.Nothing
}
fmtpRequest_tcs :: Lens.Lens' FmtpRequest (Prelude.Maybe Tcs)
fmtpRequest_tcs :: (Maybe Tcs -> f (Maybe Tcs)) -> FmtpRequest -> f FmtpRequest
fmtpRequest_tcs = (FmtpRequest -> Maybe Tcs)
-> (FmtpRequest -> Maybe Tcs -> FmtpRequest)
-> Lens FmtpRequest FmtpRequest (Maybe Tcs) (Maybe Tcs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FmtpRequest' {Maybe Tcs
tcs :: Maybe Tcs
$sel:tcs:FmtpRequest' :: FmtpRequest -> Maybe Tcs
tcs} -> Maybe Tcs
tcs) (\s :: FmtpRequest
s@FmtpRequest' {} Maybe Tcs
a -> FmtpRequest
s {$sel:tcs:FmtpRequest' :: Maybe Tcs
tcs = Maybe Tcs
a} :: FmtpRequest)
fmtpRequest_exactFramerate :: Lens.Lens' FmtpRequest (Prelude.Maybe Prelude.Text)
fmtpRequest_exactFramerate :: (Maybe Text -> f (Maybe Text)) -> FmtpRequest -> f FmtpRequest
fmtpRequest_exactFramerate = (FmtpRequest -> Maybe Text)
-> (FmtpRequest -> Maybe Text -> FmtpRequest)
-> Lens FmtpRequest FmtpRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FmtpRequest' {Maybe Text
exactFramerate :: Maybe Text
$sel:exactFramerate:FmtpRequest' :: FmtpRequest -> Maybe Text
exactFramerate} -> Maybe Text
exactFramerate) (\s :: FmtpRequest
s@FmtpRequest' {} Maybe Text
a -> FmtpRequest
s {$sel:exactFramerate:FmtpRequest' :: Maybe Text
exactFramerate = Maybe Text
a} :: FmtpRequest)
fmtpRequest_par :: Lens.Lens' FmtpRequest (Prelude.Maybe Prelude.Text)
fmtpRequest_par :: (Maybe Text -> f (Maybe Text)) -> FmtpRequest -> f FmtpRequest
fmtpRequest_par = (FmtpRequest -> Maybe Text)
-> (FmtpRequest -> Maybe Text -> FmtpRequest)
-> Lens FmtpRequest FmtpRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FmtpRequest' {Maybe Text
par :: Maybe Text
$sel:par:FmtpRequest' :: FmtpRequest -> Maybe Text
par} -> Maybe Text
par) (\s :: FmtpRequest
s@FmtpRequest' {} Maybe Text
a -> FmtpRequest
s {$sel:par:FmtpRequest' :: Maybe Text
par = Maybe Text
a} :: FmtpRequest)
fmtpRequest_scanMode :: Lens.Lens' FmtpRequest (Prelude.Maybe ScanMode)
fmtpRequest_scanMode :: (Maybe ScanMode -> f (Maybe ScanMode))
-> FmtpRequest -> f FmtpRequest
fmtpRequest_scanMode = (FmtpRequest -> Maybe ScanMode)
-> (FmtpRequest -> Maybe ScanMode -> FmtpRequest)
-> Lens FmtpRequest FmtpRequest (Maybe ScanMode) (Maybe ScanMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FmtpRequest' {Maybe ScanMode
scanMode :: Maybe ScanMode
$sel:scanMode:FmtpRequest' :: FmtpRequest -> Maybe ScanMode
scanMode} -> Maybe ScanMode
scanMode) (\s :: FmtpRequest
s@FmtpRequest' {} Maybe ScanMode
a -> FmtpRequest
s {$sel:scanMode:FmtpRequest' :: Maybe ScanMode
scanMode = Maybe ScanMode
a} :: FmtpRequest)
fmtpRequest_range :: Lens.Lens' FmtpRequest (Prelude.Maybe Range)
fmtpRequest_range :: (Maybe Range -> f (Maybe Range)) -> FmtpRequest -> f FmtpRequest
fmtpRequest_range = (FmtpRequest -> Maybe Range)
-> (FmtpRequest -> Maybe Range -> FmtpRequest)
-> Lens FmtpRequest FmtpRequest (Maybe Range) (Maybe Range)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FmtpRequest' {Maybe Range
range :: Maybe Range
$sel:range:FmtpRequest' :: FmtpRequest -> Maybe Range
range} -> Maybe Range
range) (\s :: FmtpRequest
s@FmtpRequest' {} Maybe Range
a -> FmtpRequest
s {$sel:range:FmtpRequest' :: Maybe Range
range = Maybe Range
a} :: FmtpRequest)
fmtpRequest_channelOrder :: Lens.Lens' FmtpRequest (Prelude.Maybe Prelude.Text)
fmtpRequest_channelOrder :: (Maybe Text -> f (Maybe Text)) -> FmtpRequest -> f FmtpRequest
fmtpRequest_channelOrder = (FmtpRequest -> Maybe Text)
-> (FmtpRequest -> Maybe Text -> FmtpRequest)
-> Lens FmtpRequest FmtpRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FmtpRequest' {Maybe Text
channelOrder :: Maybe Text
$sel:channelOrder:FmtpRequest' :: FmtpRequest -> Maybe Text
channelOrder} -> Maybe Text
channelOrder) (\s :: FmtpRequest
s@FmtpRequest' {} Maybe Text
a -> FmtpRequest
s {$sel:channelOrder:FmtpRequest' :: Maybe Text
channelOrder = Maybe Text
a} :: FmtpRequest)
fmtpRequest_colorimetry :: Lens.Lens' FmtpRequest (Prelude.Maybe Colorimetry)
fmtpRequest_colorimetry :: (Maybe Colorimetry -> f (Maybe Colorimetry))
-> FmtpRequest -> f FmtpRequest
fmtpRequest_colorimetry = (FmtpRequest -> Maybe Colorimetry)
-> (FmtpRequest -> Maybe Colorimetry -> FmtpRequest)
-> Lens
FmtpRequest FmtpRequest (Maybe Colorimetry) (Maybe Colorimetry)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FmtpRequest' {Maybe Colorimetry
colorimetry :: Maybe Colorimetry
$sel:colorimetry:FmtpRequest' :: FmtpRequest -> Maybe Colorimetry
colorimetry} -> Maybe Colorimetry
colorimetry) (\s :: FmtpRequest
s@FmtpRequest' {} Maybe Colorimetry
a -> FmtpRequest
s {$sel:colorimetry:FmtpRequest' :: Maybe Colorimetry
colorimetry = Maybe Colorimetry
a} :: FmtpRequest)
instance Prelude.Hashable FmtpRequest
instance Prelude.NFData FmtpRequest
instance Core.ToJSON FmtpRequest where
toJSON :: FmtpRequest -> Value
toJSON FmtpRequest' {Maybe Text
Maybe Colorimetry
Maybe Range
Maybe ScanMode
Maybe Tcs
colorimetry :: Maybe Colorimetry
channelOrder :: Maybe Text
range :: Maybe Range
scanMode :: Maybe ScanMode
par :: Maybe Text
exactFramerate :: Maybe Text
tcs :: Maybe Tcs
$sel:colorimetry:FmtpRequest' :: FmtpRequest -> Maybe Colorimetry
$sel:channelOrder:FmtpRequest' :: FmtpRequest -> Maybe Text
$sel:range:FmtpRequest' :: FmtpRequest -> Maybe Range
$sel:scanMode:FmtpRequest' :: FmtpRequest -> Maybe ScanMode
$sel:par:FmtpRequest' :: FmtpRequest -> Maybe Text
$sel:exactFramerate:FmtpRequest' :: FmtpRequest -> Maybe Text
$sel:tcs:FmtpRequest' :: FmtpRequest -> Maybe Tcs
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"tcs" Text -> Tcs -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Tcs -> Pair) -> Maybe Tcs -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Tcs
tcs,
(Text
"exactFramerate" 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
exactFramerate,
(Text
"par" 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
par,
(Text
"scanMode" Text -> ScanMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ScanMode -> Pair) -> Maybe ScanMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ScanMode
scanMode,
(Text
"range" Text -> Range -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Range -> Pair) -> Maybe Range -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Range
range,
(Text
"channelOrder" 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
channelOrder,
(Text
"colorimetry" Text -> Colorimetry -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Colorimetry -> Pair) -> Maybe Colorimetry -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Colorimetry
colorimetry
]
)