{-# 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.Fmtp 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 Fmtp = Fmtp'
{
Fmtp -> Maybe Tcs
tcs :: Prelude.Maybe Tcs,
Fmtp -> Maybe Text
exactFramerate :: Prelude.Maybe Prelude.Text,
Fmtp -> Maybe Text
par :: Prelude.Maybe Prelude.Text,
Fmtp -> Maybe ScanMode
scanMode :: Prelude.Maybe ScanMode,
Fmtp -> Maybe Range
range :: Prelude.Maybe Range,
Fmtp -> Maybe Text
channelOrder :: Prelude.Maybe Prelude.Text,
Fmtp -> Maybe Colorimetry
colorimetry :: Prelude.Maybe Colorimetry
}
deriving (Fmtp -> Fmtp -> Bool
(Fmtp -> Fmtp -> Bool) -> (Fmtp -> Fmtp -> Bool) -> Eq Fmtp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Fmtp -> Fmtp -> Bool
$c/= :: Fmtp -> Fmtp -> Bool
== :: Fmtp -> Fmtp -> Bool
$c== :: Fmtp -> Fmtp -> Bool
Prelude.Eq, ReadPrec [Fmtp]
ReadPrec Fmtp
Int -> ReadS Fmtp
ReadS [Fmtp]
(Int -> ReadS Fmtp)
-> ReadS [Fmtp] -> ReadPrec Fmtp -> ReadPrec [Fmtp] -> Read Fmtp
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Fmtp]
$creadListPrec :: ReadPrec [Fmtp]
readPrec :: ReadPrec Fmtp
$creadPrec :: ReadPrec Fmtp
readList :: ReadS [Fmtp]
$creadList :: ReadS [Fmtp]
readsPrec :: Int -> ReadS Fmtp
$creadsPrec :: Int -> ReadS Fmtp
Prelude.Read, Int -> Fmtp -> ShowS
[Fmtp] -> ShowS
Fmtp -> String
(Int -> Fmtp -> ShowS)
-> (Fmtp -> String) -> ([Fmtp] -> ShowS) -> Show Fmtp
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Fmtp] -> ShowS
$cshowList :: [Fmtp] -> ShowS
show :: Fmtp -> String
$cshow :: Fmtp -> String
showsPrec :: Int -> Fmtp -> ShowS
$cshowsPrec :: Int -> Fmtp -> ShowS
Prelude.Show, (forall x. Fmtp -> Rep Fmtp x)
-> (forall x. Rep Fmtp x -> Fmtp) -> Generic Fmtp
forall x. Rep Fmtp x -> Fmtp
forall x. Fmtp -> Rep Fmtp x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Fmtp x -> Fmtp
$cfrom :: forall x. Fmtp -> Rep Fmtp x
Prelude.Generic)
newFmtp ::
Fmtp
newFmtp :: Fmtp
newFmtp =
Fmtp' :: Maybe Tcs
-> Maybe Text
-> Maybe Text
-> Maybe ScanMode
-> Maybe Range
-> Maybe Text
-> Maybe Colorimetry
-> Fmtp
Fmtp'
{ $sel:tcs:Fmtp' :: Maybe Tcs
tcs = Maybe Tcs
forall a. Maybe a
Prelude.Nothing,
$sel:exactFramerate:Fmtp' :: Maybe Text
exactFramerate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:par:Fmtp' :: Maybe Text
par = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:scanMode:Fmtp' :: Maybe ScanMode
scanMode = Maybe ScanMode
forall a. Maybe a
Prelude.Nothing,
$sel:range:Fmtp' :: Maybe Range
range = Maybe Range
forall a. Maybe a
Prelude.Nothing,
$sel:channelOrder:Fmtp' :: Maybe Text
channelOrder = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:colorimetry:Fmtp' :: Maybe Colorimetry
colorimetry = Maybe Colorimetry
forall a. Maybe a
Prelude.Nothing
}
fmtp_tcs :: Lens.Lens' Fmtp (Prelude.Maybe Tcs)
fmtp_tcs :: (Maybe Tcs -> f (Maybe Tcs)) -> Fmtp -> f Fmtp
fmtp_tcs = (Fmtp -> Maybe Tcs)
-> (Fmtp -> Maybe Tcs -> Fmtp)
-> Lens Fmtp Fmtp (Maybe Tcs) (Maybe Tcs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fmtp' {Maybe Tcs
tcs :: Maybe Tcs
$sel:tcs:Fmtp' :: Fmtp -> Maybe Tcs
tcs} -> Maybe Tcs
tcs) (\s :: Fmtp
s@Fmtp' {} Maybe Tcs
a -> Fmtp
s {$sel:tcs:Fmtp' :: Maybe Tcs
tcs = Maybe Tcs
a} :: Fmtp)
fmtp_exactFramerate :: Lens.Lens' Fmtp (Prelude.Maybe Prelude.Text)
fmtp_exactFramerate :: (Maybe Text -> f (Maybe Text)) -> Fmtp -> f Fmtp
fmtp_exactFramerate = (Fmtp -> Maybe Text)
-> (Fmtp -> Maybe Text -> Fmtp)
-> Lens Fmtp Fmtp (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fmtp' {Maybe Text
exactFramerate :: Maybe Text
$sel:exactFramerate:Fmtp' :: Fmtp -> Maybe Text
exactFramerate} -> Maybe Text
exactFramerate) (\s :: Fmtp
s@Fmtp' {} Maybe Text
a -> Fmtp
s {$sel:exactFramerate:Fmtp' :: Maybe Text
exactFramerate = Maybe Text
a} :: Fmtp)
fmtp_par :: Lens.Lens' Fmtp (Prelude.Maybe Prelude.Text)
fmtp_par :: (Maybe Text -> f (Maybe Text)) -> Fmtp -> f Fmtp
fmtp_par = (Fmtp -> Maybe Text)
-> (Fmtp -> Maybe Text -> Fmtp)
-> Lens Fmtp Fmtp (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fmtp' {Maybe Text
par :: Maybe Text
$sel:par:Fmtp' :: Fmtp -> Maybe Text
par} -> Maybe Text
par) (\s :: Fmtp
s@Fmtp' {} Maybe Text
a -> Fmtp
s {$sel:par:Fmtp' :: Maybe Text
par = Maybe Text
a} :: Fmtp)
fmtp_scanMode :: Lens.Lens' Fmtp (Prelude.Maybe ScanMode)
fmtp_scanMode :: (Maybe ScanMode -> f (Maybe ScanMode)) -> Fmtp -> f Fmtp
fmtp_scanMode = (Fmtp -> Maybe ScanMode)
-> (Fmtp -> Maybe ScanMode -> Fmtp)
-> Lens Fmtp Fmtp (Maybe ScanMode) (Maybe ScanMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fmtp' {Maybe ScanMode
scanMode :: Maybe ScanMode
$sel:scanMode:Fmtp' :: Fmtp -> Maybe ScanMode
scanMode} -> Maybe ScanMode
scanMode) (\s :: Fmtp
s@Fmtp' {} Maybe ScanMode
a -> Fmtp
s {$sel:scanMode:Fmtp' :: Maybe ScanMode
scanMode = Maybe ScanMode
a} :: Fmtp)
fmtp_range :: Lens.Lens' Fmtp (Prelude.Maybe Range)
fmtp_range :: (Maybe Range -> f (Maybe Range)) -> Fmtp -> f Fmtp
fmtp_range = (Fmtp -> Maybe Range)
-> (Fmtp -> Maybe Range -> Fmtp)
-> Lens Fmtp Fmtp (Maybe Range) (Maybe Range)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fmtp' {Maybe Range
range :: Maybe Range
$sel:range:Fmtp' :: Fmtp -> Maybe Range
range} -> Maybe Range
range) (\s :: Fmtp
s@Fmtp' {} Maybe Range
a -> Fmtp
s {$sel:range:Fmtp' :: Maybe Range
range = Maybe Range
a} :: Fmtp)
fmtp_channelOrder :: Lens.Lens' Fmtp (Prelude.Maybe Prelude.Text)
fmtp_channelOrder :: (Maybe Text -> f (Maybe Text)) -> Fmtp -> f Fmtp
fmtp_channelOrder = (Fmtp -> Maybe Text)
-> (Fmtp -> Maybe Text -> Fmtp)
-> Lens Fmtp Fmtp (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fmtp' {Maybe Text
channelOrder :: Maybe Text
$sel:channelOrder:Fmtp' :: Fmtp -> Maybe Text
channelOrder} -> Maybe Text
channelOrder) (\s :: Fmtp
s@Fmtp' {} Maybe Text
a -> Fmtp
s {$sel:channelOrder:Fmtp' :: Maybe Text
channelOrder = Maybe Text
a} :: Fmtp)
fmtp_colorimetry :: Lens.Lens' Fmtp (Prelude.Maybe Colorimetry)
fmtp_colorimetry :: (Maybe Colorimetry -> f (Maybe Colorimetry)) -> Fmtp -> f Fmtp
fmtp_colorimetry = (Fmtp -> Maybe Colorimetry)
-> (Fmtp -> Maybe Colorimetry -> Fmtp)
-> Lens Fmtp Fmtp (Maybe Colorimetry) (Maybe Colorimetry)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fmtp' {Maybe Colorimetry
colorimetry :: Maybe Colorimetry
$sel:colorimetry:Fmtp' :: Fmtp -> Maybe Colorimetry
colorimetry} -> Maybe Colorimetry
colorimetry) (\s :: Fmtp
s@Fmtp' {} Maybe Colorimetry
a -> Fmtp
s {$sel:colorimetry:Fmtp' :: Maybe Colorimetry
colorimetry = Maybe Colorimetry
a} :: Fmtp)
instance Core.FromJSON Fmtp where
parseJSON :: Value -> Parser Fmtp
parseJSON =
String -> (Object -> Parser Fmtp) -> Value -> Parser Fmtp
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Fmtp"
( \Object
x ->
Maybe Tcs
-> Maybe Text
-> Maybe Text
-> Maybe ScanMode
-> Maybe Range
-> Maybe Text
-> Maybe Colorimetry
-> Fmtp
Fmtp'
(Maybe Tcs
-> Maybe Text
-> Maybe Text
-> Maybe ScanMode
-> Maybe Range
-> Maybe Text
-> Maybe Colorimetry
-> Fmtp)
-> Parser (Maybe Tcs)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe ScanMode
-> Maybe Range
-> Maybe Text
-> Maybe Colorimetry
-> Fmtp)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Tcs)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tcs")
Parser
(Maybe Text
-> Maybe Text
-> Maybe ScanMode
-> Maybe Range
-> Maybe Text
-> Maybe Colorimetry
-> Fmtp)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe ScanMode
-> Maybe Range
-> Maybe Text
-> Maybe Colorimetry
-> Fmtp)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"exactFramerate")
Parser
(Maybe Text
-> Maybe ScanMode
-> Maybe Range
-> Maybe Text
-> Maybe Colorimetry
-> Fmtp)
-> Parser (Maybe Text)
-> Parser
(Maybe ScanMode
-> Maybe Range -> Maybe Text -> Maybe Colorimetry -> Fmtp)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"par")
Parser
(Maybe ScanMode
-> Maybe Range -> Maybe Text -> Maybe Colorimetry -> Fmtp)
-> Parser (Maybe ScanMode)
-> Parser (Maybe Range -> Maybe Text -> Maybe Colorimetry -> Fmtp)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ScanMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scanMode")
Parser (Maybe Range -> Maybe Text -> Maybe Colorimetry -> Fmtp)
-> Parser (Maybe Range)
-> Parser (Maybe Text -> Maybe Colorimetry -> Fmtp)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Range)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"range")
Parser (Maybe Text -> Maybe Colorimetry -> Fmtp)
-> Parser (Maybe Text) -> Parser (Maybe Colorimetry -> Fmtp)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"channelOrder")
Parser (Maybe Colorimetry -> Fmtp)
-> Parser (Maybe Colorimetry) -> Parser Fmtp
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Colorimetry)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"colorimetry")
)
instance Prelude.Hashable Fmtp
instance Prelude.NFData Fmtp