{-# 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.H265ColorSpaceSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.ColorSpacePassthroughSettings
import Amazonka.MediaLive.Types.Hdr10Settings
import Amazonka.MediaLive.Types.Rec601Settings
import Amazonka.MediaLive.Types.Rec709Settings
import qualified Amazonka.Prelude as Prelude
data H265ColorSpaceSettings = H265ColorSpaceSettings'
{ H265ColorSpaceSettings -> Maybe Hdr10Settings
hdr10Settings :: Prelude.Maybe Hdr10Settings,
H265ColorSpaceSettings -> Maybe Rec709Settings
rec709Settings :: Prelude.Maybe Rec709Settings,
H265ColorSpaceSettings -> Maybe Rec601Settings
rec601Settings :: Prelude.Maybe Rec601Settings,
H265ColorSpaceSettings -> Maybe ColorSpacePassthroughSettings
colorSpacePassthroughSettings :: Prelude.Maybe ColorSpacePassthroughSettings
}
deriving (H265ColorSpaceSettings -> H265ColorSpaceSettings -> Bool
(H265ColorSpaceSettings -> H265ColorSpaceSettings -> Bool)
-> (H265ColorSpaceSettings -> H265ColorSpaceSettings -> Bool)
-> Eq H265ColorSpaceSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: H265ColorSpaceSettings -> H265ColorSpaceSettings -> Bool
$c/= :: H265ColorSpaceSettings -> H265ColorSpaceSettings -> Bool
== :: H265ColorSpaceSettings -> H265ColorSpaceSettings -> Bool
$c== :: H265ColorSpaceSettings -> H265ColorSpaceSettings -> Bool
Prelude.Eq, ReadPrec [H265ColorSpaceSettings]
ReadPrec H265ColorSpaceSettings
Int -> ReadS H265ColorSpaceSettings
ReadS [H265ColorSpaceSettings]
(Int -> ReadS H265ColorSpaceSettings)
-> ReadS [H265ColorSpaceSettings]
-> ReadPrec H265ColorSpaceSettings
-> ReadPrec [H265ColorSpaceSettings]
-> Read H265ColorSpaceSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [H265ColorSpaceSettings]
$creadListPrec :: ReadPrec [H265ColorSpaceSettings]
readPrec :: ReadPrec H265ColorSpaceSettings
$creadPrec :: ReadPrec H265ColorSpaceSettings
readList :: ReadS [H265ColorSpaceSettings]
$creadList :: ReadS [H265ColorSpaceSettings]
readsPrec :: Int -> ReadS H265ColorSpaceSettings
$creadsPrec :: Int -> ReadS H265ColorSpaceSettings
Prelude.Read, Int -> H265ColorSpaceSettings -> ShowS
[H265ColorSpaceSettings] -> ShowS
H265ColorSpaceSettings -> String
(Int -> H265ColorSpaceSettings -> ShowS)
-> (H265ColorSpaceSettings -> String)
-> ([H265ColorSpaceSettings] -> ShowS)
-> Show H265ColorSpaceSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [H265ColorSpaceSettings] -> ShowS
$cshowList :: [H265ColorSpaceSettings] -> ShowS
show :: H265ColorSpaceSettings -> String
$cshow :: H265ColorSpaceSettings -> String
showsPrec :: Int -> H265ColorSpaceSettings -> ShowS
$cshowsPrec :: Int -> H265ColorSpaceSettings -> ShowS
Prelude.Show, (forall x. H265ColorSpaceSettings -> Rep H265ColorSpaceSettings x)
-> (forall x.
Rep H265ColorSpaceSettings x -> H265ColorSpaceSettings)
-> Generic H265ColorSpaceSettings
forall x. Rep H265ColorSpaceSettings x -> H265ColorSpaceSettings
forall x. H265ColorSpaceSettings -> Rep H265ColorSpaceSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep H265ColorSpaceSettings x -> H265ColorSpaceSettings
$cfrom :: forall x. H265ColorSpaceSettings -> Rep H265ColorSpaceSettings x
Prelude.Generic)
newH265ColorSpaceSettings ::
H265ColorSpaceSettings
newH265ColorSpaceSettings :: H265ColorSpaceSettings
newH265ColorSpaceSettings =
H265ColorSpaceSettings' :: Maybe Hdr10Settings
-> Maybe Rec709Settings
-> Maybe Rec601Settings
-> Maybe ColorSpacePassthroughSettings
-> H265ColorSpaceSettings
H265ColorSpaceSettings'
{ $sel:hdr10Settings:H265ColorSpaceSettings' :: Maybe Hdr10Settings
hdr10Settings =
Maybe Hdr10Settings
forall a. Maybe a
Prelude.Nothing,
$sel:rec709Settings:H265ColorSpaceSettings' :: Maybe Rec709Settings
rec709Settings = Maybe Rec709Settings
forall a. Maybe a
Prelude.Nothing,
$sel:rec601Settings:H265ColorSpaceSettings' :: Maybe Rec601Settings
rec601Settings = Maybe Rec601Settings
forall a. Maybe a
Prelude.Nothing,
$sel:colorSpacePassthroughSettings:H265ColorSpaceSettings' :: Maybe ColorSpacePassthroughSettings
colorSpacePassthroughSettings = Maybe ColorSpacePassthroughSettings
forall a. Maybe a
Prelude.Nothing
}
h265ColorSpaceSettings_hdr10Settings :: Lens.Lens' H265ColorSpaceSettings (Prelude.Maybe Hdr10Settings)
h265ColorSpaceSettings_hdr10Settings :: (Maybe Hdr10Settings -> f (Maybe Hdr10Settings))
-> H265ColorSpaceSettings -> f H265ColorSpaceSettings
h265ColorSpaceSettings_hdr10Settings = (H265ColorSpaceSettings -> Maybe Hdr10Settings)
-> (H265ColorSpaceSettings
-> Maybe Hdr10Settings -> H265ColorSpaceSettings)
-> Lens
H265ColorSpaceSettings
H265ColorSpaceSettings
(Maybe Hdr10Settings)
(Maybe Hdr10Settings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\H265ColorSpaceSettings' {Maybe Hdr10Settings
hdr10Settings :: Maybe Hdr10Settings
$sel:hdr10Settings:H265ColorSpaceSettings' :: H265ColorSpaceSettings -> Maybe Hdr10Settings
hdr10Settings} -> Maybe Hdr10Settings
hdr10Settings) (\s :: H265ColorSpaceSettings
s@H265ColorSpaceSettings' {} Maybe Hdr10Settings
a -> H265ColorSpaceSettings
s {$sel:hdr10Settings:H265ColorSpaceSettings' :: Maybe Hdr10Settings
hdr10Settings = Maybe Hdr10Settings
a} :: H265ColorSpaceSettings)
h265ColorSpaceSettings_rec709Settings :: Lens.Lens' H265ColorSpaceSettings (Prelude.Maybe Rec709Settings)
h265ColorSpaceSettings_rec709Settings :: (Maybe Rec709Settings -> f (Maybe Rec709Settings))
-> H265ColorSpaceSettings -> f H265ColorSpaceSettings
h265ColorSpaceSettings_rec709Settings = (H265ColorSpaceSettings -> Maybe Rec709Settings)
-> (H265ColorSpaceSettings
-> Maybe Rec709Settings -> H265ColorSpaceSettings)
-> Lens
H265ColorSpaceSettings
H265ColorSpaceSettings
(Maybe Rec709Settings)
(Maybe Rec709Settings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\H265ColorSpaceSettings' {Maybe Rec709Settings
rec709Settings :: Maybe Rec709Settings
$sel:rec709Settings:H265ColorSpaceSettings' :: H265ColorSpaceSettings -> Maybe Rec709Settings
rec709Settings} -> Maybe Rec709Settings
rec709Settings) (\s :: H265ColorSpaceSettings
s@H265ColorSpaceSettings' {} Maybe Rec709Settings
a -> H265ColorSpaceSettings
s {$sel:rec709Settings:H265ColorSpaceSettings' :: Maybe Rec709Settings
rec709Settings = Maybe Rec709Settings
a} :: H265ColorSpaceSettings)
h265ColorSpaceSettings_rec601Settings :: Lens.Lens' H265ColorSpaceSettings (Prelude.Maybe Rec601Settings)
h265ColorSpaceSettings_rec601Settings :: (Maybe Rec601Settings -> f (Maybe Rec601Settings))
-> H265ColorSpaceSettings -> f H265ColorSpaceSettings
h265ColorSpaceSettings_rec601Settings = (H265ColorSpaceSettings -> Maybe Rec601Settings)
-> (H265ColorSpaceSettings
-> Maybe Rec601Settings -> H265ColorSpaceSettings)
-> Lens
H265ColorSpaceSettings
H265ColorSpaceSettings
(Maybe Rec601Settings)
(Maybe Rec601Settings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\H265ColorSpaceSettings' {Maybe Rec601Settings
rec601Settings :: Maybe Rec601Settings
$sel:rec601Settings:H265ColorSpaceSettings' :: H265ColorSpaceSettings -> Maybe Rec601Settings
rec601Settings} -> Maybe Rec601Settings
rec601Settings) (\s :: H265ColorSpaceSettings
s@H265ColorSpaceSettings' {} Maybe Rec601Settings
a -> H265ColorSpaceSettings
s {$sel:rec601Settings:H265ColorSpaceSettings' :: Maybe Rec601Settings
rec601Settings = Maybe Rec601Settings
a} :: H265ColorSpaceSettings)
h265ColorSpaceSettings_colorSpacePassthroughSettings :: Lens.Lens' H265ColorSpaceSettings (Prelude.Maybe ColorSpacePassthroughSettings)
h265ColorSpaceSettings_colorSpacePassthroughSettings :: (Maybe ColorSpacePassthroughSettings
-> f (Maybe ColorSpacePassthroughSettings))
-> H265ColorSpaceSettings -> f H265ColorSpaceSettings
h265ColorSpaceSettings_colorSpacePassthroughSettings = (H265ColorSpaceSettings -> Maybe ColorSpacePassthroughSettings)
-> (H265ColorSpaceSettings
-> Maybe ColorSpacePassthroughSettings -> H265ColorSpaceSettings)
-> Lens
H265ColorSpaceSettings
H265ColorSpaceSettings
(Maybe ColorSpacePassthroughSettings)
(Maybe ColorSpacePassthroughSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\H265ColorSpaceSettings' {Maybe ColorSpacePassthroughSettings
colorSpacePassthroughSettings :: Maybe ColorSpacePassthroughSettings
$sel:colorSpacePassthroughSettings:H265ColorSpaceSettings' :: H265ColorSpaceSettings -> Maybe ColorSpacePassthroughSettings
colorSpacePassthroughSettings} -> Maybe ColorSpacePassthroughSettings
colorSpacePassthroughSettings) (\s :: H265ColorSpaceSettings
s@H265ColorSpaceSettings' {} Maybe ColorSpacePassthroughSettings
a -> H265ColorSpaceSettings
s {$sel:colorSpacePassthroughSettings:H265ColorSpaceSettings' :: Maybe ColorSpacePassthroughSettings
colorSpacePassthroughSettings = Maybe ColorSpacePassthroughSettings
a} :: H265ColorSpaceSettings)
instance Core.FromJSON H265ColorSpaceSettings where
parseJSON :: Value -> Parser H265ColorSpaceSettings
parseJSON =
String
-> (Object -> Parser H265ColorSpaceSettings)
-> Value
-> Parser H265ColorSpaceSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"H265ColorSpaceSettings"
( \Object
x ->
Maybe Hdr10Settings
-> Maybe Rec709Settings
-> Maybe Rec601Settings
-> Maybe ColorSpacePassthroughSettings
-> H265ColorSpaceSettings
H265ColorSpaceSettings'
(Maybe Hdr10Settings
-> Maybe Rec709Settings
-> Maybe Rec601Settings
-> Maybe ColorSpacePassthroughSettings
-> H265ColorSpaceSettings)
-> Parser (Maybe Hdr10Settings)
-> Parser
(Maybe Rec709Settings
-> Maybe Rec601Settings
-> Maybe ColorSpacePassthroughSettings
-> H265ColorSpaceSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Hdr10Settings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hdr10Settings")
Parser
(Maybe Rec709Settings
-> Maybe Rec601Settings
-> Maybe ColorSpacePassthroughSettings
-> H265ColorSpaceSettings)
-> Parser (Maybe Rec709Settings)
-> Parser
(Maybe Rec601Settings
-> Maybe ColorSpacePassthroughSettings -> H265ColorSpaceSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Rec709Settings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"rec709Settings")
Parser
(Maybe Rec601Settings
-> Maybe ColorSpacePassthroughSettings -> H265ColorSpaceSettings)
-> Parser (Maybe Rec601Settings)
-> Parser
(Maybe ColorSpacePassthroughSettings -> H265ColorSpaceSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Rec601Settings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"rec601Settings")
Parser
(Maybe ColorSpacePassthroughSettings -> H265ColorSpaceSettings)
-> Parser (Maybe ColorSpacePassthroughSettings)
-> Parser H265ColorSpaceSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ColorSpacePassthroughSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"colorSpacePassthroughSettings")
)
instance Prelude.Hashable H265ColorSpaceSettings
instance Prelude.NFData H265ColorSpaceSettings
instance Core.ToJSON H265ColorSpaceSettings where
toJSON :: H265ColorSpaceSettings -> Value
toJSON H265ColorSpaceSettings' {Maybe ColorSpacePassthroughSettings
Maybe Hdr10Settings
Maybe Rec601Settings
Maybe Rec709Settings
colorSpacePassthroughSettings :: Maybe ColorSpacePassthroughSettings
rec601Settings :: Maybe Rec601Settings
rec709Settings :: Maybe Rec709Settings
hdr10Settings :: Maybe Hdr10Settings
$sel:colorSpacePassthroughSettings:H265ColorSpaceSettings' :: H265ColorSpaceSettings -> Maybe ColorSpacePassthroughSettings
$sel:rec601Settings:H265ColorSpaceSettings' :: H265ColorSpaceSettings -> Maybe Rec601Settings
$sel:rec709Settings:H265ColorSpaceSettings' :: H265ColorSpaceSettings -> Maybe Rec709Settings
$sel:hdr10Settings:H265ColorSpaceSettings' :: H265ColorSpaceSettings -> Maybe Hdr10Settings
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"hdr10Settings" Text -> Hdr10Settings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Hdr10Settings -> Pair) -> Maybe Hdr10Settings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Hdr10Settings
hdr10Settings,
(Text
"rec709Settings" Text -> Rec709Settings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Rec709Settings -> Pair) -> Maybe Rec709Settings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Rec709Settings
rec709Settings,
(Text
"rec601Settings" Text -> Rec601Settings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Rec601Settings -> Pair) -> Maybe Rec601Settings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Rec601Settings
rec601Settings,
(Text
"colorSpacePassthroughSettings" Text -> ColorSpacePassthroughSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ColorSpacePassthroughSettings -> Pair)
-> Maybe ColorSpacePassthroughSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ColorSpacePassthroughSettings
colorSpacePassthroughSettings
]
)