{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaConvert.Types.Hdr10Metadata
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.Hdr10Metadata where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Use these settings to specify static color calibration metadata, as
-- defined by SMPTE ST 2086. These values don\'t affect the pixel values
-- that are encoded in the video stream. They are intended to help the
-- downstream video player display content in a way that reflects the
-- intentions of the the content creator.
--
-- /See:/ 'newHdr10Metadata' smart constructor.
data Hdr10Metadata = Hdr10Metadata'
  { -- | HDR Master Display Information must be provided by a color grader, using
    -- color grading tools. Range is 0 to 50,000, each increment represents
    -- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
    -- color correction.
    Hdr10Metadata -> Maybe Natural
bluePrimaryX :: Prelude.Maybe Prelude.Natural,
    -- | HDR Master Display Information must be provided by a color grader, using
    -- color grading tools. Range is 0 to 50,000, each increment represents
    -- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
    -- color correction.
    Hdr10Metadata -> Maybe Natural
bluePrimaryY :: Prelude.Maybe Prelude.Natural,
    -- | HDR Master Display Information must be provided by a color grader, using
    -- color grading tools. Range is 0 to 50,000, each increment represents
    -- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
    -- color correction.
    Hdr10Metadata -> Maybe Natural
greenPrimaryX :: Prelude.Maybe Prelude.Natural,
    -- | HDR Master Display Information must be provided by a color grader, using
    -- color grading tools. Range is 0 to 50,000, each increment represents
    -- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
    -- color correction.
    Hdr10Metadata -> Maybe Natural
greenPrimaryY :: Prelude.Maybe Prelude.Natural,
    -- | Maximum light level among all samples in the coded video sequence, in
    -- units of candelas per square meter. This setting doesn\'t have a default
    -- value; you must specify a value that is suitable for the content.
    Hdr10Metadata -> Maybe Natural
maxContentLightLevel :: Prelude.Maybe Prelude.Natural,
    -- | Maximum average light level of any frame in the coded video sequence, in
    -- units of candelas per square meter. This setting doesn\'t have a default
    -- value; you must specify a value that is suitable for the content.
    Hdr10Metadata -> Maybe Natural
maxFrameAverageLightLevel :: Prelude.Maybe Prelude.Natural,
    -- | Nominal maximum mastering display luminance in units of of 0.0001
    -- candelas per square meter.
    Hdr10Metadata -> Maybe Natural
maxLuminance :: Prelude.Maybe Prelude.Natural,
    -- | Nominal minimum mastering display luminance in units of of 0.0001
    -- candelas per square meter
    Hdr10Metadata -> Maybe Natural
minLuminance :: Prelude.Maybe Prelude.Natural,
    -- | HDR Master Display Information must be provided by a color grader, using
    -- color grading tools. Range is 0 to 50,000, each increment represents
    -- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
    -- color correction.
    Hdr10Metadata -> Maybe Natural
redPrimaryX :: Prelude.Maybe Prelude.Natural,
    -- | HDR Master Display Information must be provided by a color grader, using
    -- color grading tools. Range is 0 to 50,000, each increment represents
    -- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
    -- color correction.
    Hdr10Metadata -> Maybe Natural
redPrimaryY :: Prelude.Maybe Prelude.Natural,
    -- | HDR Master Display Information must be provided by a color grader, using
    -- color grading tools. Range is 0 to 50,000, each increment represents
    -- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
    -- color correction.
    Hdr10Metadata -> Maybe Natural
whitePointX :: Prelude.Maybe Prelude.Natural,
    -- | HDR Master Display Information must be provided by a color grader, using
    -- color grading tools. Range is 0 to 50,000, each increment represents
    -- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
    -- color correction.
    Hdr10Metadata -> Maybe Natural
whitePointY :: Prelude.Maybe Prelude.Natural
  }
  deriving (Hdr10Metadata -> Hdr10Metadata -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Hdr10Metadata -> Hdr10Metadata -> Bool
$c/= :: Hdr10Metadata -> Hdr10Metadata -> Bool
== :: Hdr10Metadata -> Hdr10Metadata -> Bool
$c== :: Hdr10Metadata -> Hdr10Metadata -> Bool
Prelude.Eq, ReadPrec [Hdr10Metadata]
ReadPrec Hdr10Metadata
Int -> ReadS Hdr10Metadata
ReadS [Hdr10Metadata]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Hdr10Metadata]
$creadListPrec :: ReadPrec [Hdr10Metadata]
readPrec :: ReadPrec Hdr10Metadata
$creadPrec :: ReadPrec Hdr10Metadata
readList :: ReadS [Hdr10Metadata]
$creadList :: ReadS [Hdr10Metadata]
readsPrec :: Int -> ReadS Hdr10Metadata
$creadsPrec :: Int -> ReadS Hdr10Metadata
Prelude.Read, Int -> Hdr10Metadata -> ShowS
[Hdr10Metadata] -> ShowS
Hdr10Metadata -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Hdr10Metadata] -> ShowS
$cshowList :: [Hdr10Metadata] -> ShowS
show :: Hdr10Metadata -> String
$cshow :: Hdr10Metadata -> String
showsPrec :: Int -> Hdr10Metadata -> ShowS
$cshowsPrec :: Int -> Hdr10Metadata -> ShowS
Prelude.Show, forall x. Rep Hdr10Metadata x -> Hdr10Metadata
forall x. Hdr10Metadata -> Rep Hdr10Metadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Hdr10Metadata x -> Hdr10Metadata
$cfrom :: forall x. Hdr10Metadata -> Rep Hdr10Metadata x
Prelude.Generic)

-- |
-- Create a value of 'Hdr10Metadata' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'bluePrimaryX', 'hdr10Metadata_bluePrimaryX' - HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
--
-- 'bluePrimaryY', 'hdr10Metadata_bluePrimaryY' - HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
--
-- 'greenPrimaryX', 'hdr10Metadata_greenPrimaryX' - HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
--
-- 'greenPrimaryY', 'hdr10Metadata_greenPrimaryY' - HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
--
-- 'maxContentLightLevel', 'hdr10Metadata_maxContentLightLevel' - Maximum light level among all samples in the coded video sequence, in
-- units of candelas per square meter. This setting doesn\'t have a default
-- value; you must specify a value that is suitable for the content.
--
-- 'maxFrameAverageLightLevel', 'hdr10Metadata_maxFrameAverageLightLevel' - Maximum average light level of any frame in the coded video sequence, in
-- units of candelas per square meter. This setting doesn\'t have a default
-- value; you must specify a value that is suitable for the content.
--
-- 'maxLuminance', 'hdr10Metadata_maxLuminance' - Nominal maximum mastering display luminance in units of of 0.0001
-- candelas per square meter.
--
-- 'minLuminance', 'hdr10Metadata_minLuminance' - Nominal minimum mastering display luminance in units of of 0.0001
-- candelas per square meter
--
-- 'redPrimaryX', 'hdr10Metadata_redPrimaryX' - HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
--
-- 'redPrimaryY', 'hdr10Metadata_redPrimaryY' - HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
--
-- 'whitePointX', 'hdr10Metadata_whitePointX' - HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
--
-- 'whitePointY', 'hdr10Metadata_whitePointY' - HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
newHdr10Metadata ::
  Hdr10Metadata
newHdr10Metadata :: Hdr10Metadata
newHdr10Metadata =
  Hdr10Metadata'
    { $sel:bluePrimaryX:Hdr10Metadata' :: Maybe Natural
bluePrimaryX = forall a. Maybe a
Prelude.Nothing,
      $sel:bluePrimaryY:Hdr10Metadata' :: Maybe Natural
bluePrimaryY = forall a. Maybe a
Prelude.Nothing,
      $sel:greenPrimaryX:Hdr10Metadata' :: Maybe Natural
greenPrimaryX = forall a. Maybe a
Prelude.Nothing,
      $sel:greenPrimaryY:Hdr10Metadata' :: Maybe Natural
greenPrimaryY = forall a. Maybe a
Prelude.Nothing,
      $sel:maxContentLightLevel:Hdr10Metadata' :: Maybe Natural
maxContentLightLevel = forall a. Maybe a
Prelude.Nothing,
      $sel:maxFrameAverageLightLevel:Hdr10Metadata' :: Maybe Natural
maxFrameAverageLightLevel = forall a. Maybe a
Prelude.Nothing,
      $sel:maxLuminance:Hdr10Metadata' :: Maybe Natural
maxLuminance = forall a. Maybe a
Prelude.Nothing,
      $sel:minLuminance:Hdr10Metadata' :: Maybe Natural
minLuminance = forall a. Maybe a
Prelude.Nothing,
      $sel:redPrimaryX:Hdr10Metadata' :: Maybe Natural
redPrimaryX = forall a. Maybe a
Prelude.Nothing,
      $sel:redPrimaryY:Hdr10Metadata' :: Maybe Natural
redPrimaryY = forall a. Maybe a
Prelude.Nothing,
      $sel:whitePointX:Hdr10Metadata' :: Maybe Natural
whitePointX = forall a. Maybe a
Prelude.Nothing,
      $sel:whitePointY:Hdr10Metadata' :: Maybe Natural
whitePointY = forall a. Maybe a
Prelude.Nothing
    }

-- | HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
hdr10Metadata_bluePrimaryX :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_bluePrimaryX :: Lens' Hdr10Metadata (Maybe Natural)
hdr10Metadata_bluePrimaryX = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Hdr10Metadata' {Maybe Natural
bluePrimaryX :: Maybe Natural
$sel:bluePrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
bluePrimaryX} -> Maybe Natural
bluePrimaryX) (\s :: Hdr10Metadata
s@Hdr10Metadata' {} Maybe Natural
a -> Hdr10Metadata
s {$sel:bluePrimaryX:Hdr10Metadata' :: Maybe Natural
bluePrimaryX = Maybe Natural
a} :: Hdr10Metadata)

-- | HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
hdr10Metadata_bluePrimaryY :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_bluePrimaryY :: Lens' Hdr10Metadata (Maybe Natural)
hdr10Metadata_bluePrimaryY = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Hdr10Metadata' {Maybe Natural
bluePrimaryY :: Maybe Natural
$sel:bluePrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
bluePrimaryY} -> Maybe Natural
bluePrimaryY) (\s :: Hdr10Metadata
s@Hdr10Metadata' {} Maybe Natural
a -> Hdr10Metadata
s {$sel:bluePrimaryY:Hdr10Metadata' :: Maybe Natural
bluePrimaryY = Maybe Natural
a} :: Hdr10Metadata)

-- | HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
hdr10Metadata_greenPrimaryX :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_greenPrimaryX :: Lens' Hdr10Metadata (Maybe Natural)
hdr10Metadata_greenPrimaryX = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Hdr10Metadata' {Maybe Natural
greenPrimaryX :: Maybe Natural
$sel:greenPrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
greenPrimaryX} -> Maybe Natural
greenPrimaryX) (\s :: Hdr10Metadata
s@Hdr10Metadata' {} Maybe Natural
a -> Hdr10Metadata
s {$sel:greenPrimaryX:Hdr10Metadata' :: Maybe Natural
greenPrimaryX = Maybe Natural
a} :: Hdr10Metadata)

-- | HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
hdr10Metadata_greenPrimaryY :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_greenPrimaryY :: Lens' Hdr10Metadata (Maybe Natural)
hdr10Metadata_greenPrimaryY = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Hdr10Metadata' {Maybe Natural
greenPrimaryY :: Maybe Natural
$sel:greenPrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
greenPrimaryY} -> Maybe Natural
greenPrimaryY) (\s :: Hdr10Metadata
s@Hdr10Metadata' {} Maybe Natural
a -> Hdr10Metadata
s {$sel:greenPrimaryY:Hdr10Metadata' :: Maybe Natural
greenPrimaryY = Maybe Natural
a} :: Hdr10Metadata)

-- | Maximum light level among all samples in the coded video sequence, in
-- units of candelas per square meter. This setting doesn\'t have a default
-- value; you must specify a value that is suitable for the content.
hdr10Metadata_maxContentLightLevel :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_maxContentLightLevel :: Lens' Hdr10Metadata (Maybe Natural)
hdr10Metadata_maxContentLightLevel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Hdr10Metadata' {Maybe Natural
maxContentLightLevel :: Maybe Natural
$sel:maxContentLightLevel:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
maxContentLightLevel} -> Maybe Natural
maxContentLightLevel) (\s :: Hdr10Metadata
s@Hdr10Metadata' {} Maybe Natural
a -> Hdr10Metadata
s {$sel:maxContentLightLevel:Hdr10Metadata' :: Maybe Natural
maxContentLightLevel = Maybe Natural
a} :: Hdr10Metadata)

-- | Maximum average light level of any frame in the coded video sequence, in
-- units of candelas per square meter. This setting doesn\'t have a default
-- value; you must specify a value that is suitable for the content.
hdr10Metadata_maxFrameAverageLightLevel :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_maxFrameAverageLightLevel :: Lens' Hdr10Metadata (Maybe Natural)
hdr10Metadata_maxFrameAverageLightLevel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Hdr10Metadata' {Maybe Natural
maxFrameAverageLightLevel :: Maybe Natural
$sel:maxFrameAverageLightLevel:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
maxFrameAverageLightLevel} -> Maybe Natural
maxFrameAverageLightLevel) (\s :: Hdr10Metadata
s@Hdr10Metadata' {} Maybe Natural
a -> Hdr10Metadata
s {$sel:maxFrameAverageLightLevel:Hdr10Metadata' :: Maybe Natural
maxFrameAverageLightLevel = Maybe Natural
a} :: Hdr10Metadata)

-- | Nominal maximum mastering display luminance in units of of 0.0001
-- candelas per square meter.
hdr10Metadata_maxLuminance :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_maxLuminance :: Lens' Hdr10Metadata (Maybe Natural)
hdr10Metadata_maxLuminance = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Hdr10Metadata' {Maybe Natural
maxLuminance :: Maybe Natural
$sel:maxLuminance:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
maxLuminance} -> Maybe Natural
maxLuminance) (\s :: Hdr10Metadata
s@Hdr10Metadata' {} Maybe Natural
a -> Hdr10Metadata
s {$sel:maxLuminance:Hdr10Metadata' :: Maybe Natural
maxLuminance = Maybe Natural
a} :: Hdr10Metadata)

-- | Nominal minimum mastering display luminance in units of of 0.0001
-- candelas per square meter
hdr10Metadata_minLuminance :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_minLuminance :: Lens' Hdr10Metadata (Maybe Natural)
hdr10Metadata_minLuminance = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Hdr10Metadata' {Maybe Natural
minLuminance :: Maybe Natural
$sel:minLuminance:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
minLuminance} -> Maybe Natural
minLuminance) (\s :: Hdr10Metadata
s@Hdr10Metadata' {} Maybe Natural
a -> Hdr10Metadata
s {$sel:minLuminance:Hdr10Metadata' :: Maybe Natural
minLuminance = Maybe Natural
a} :: Hdr10Metadata)

-- | HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
hdr10Metadata_redPrimaryX :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_redPrimaryX :: Lens' Hdr10Metadata (Maybe Natural)
hdr10Metadata_redPrimaryX = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Hdr10Metadata' {Maybe Natural
redPrimaryX :: Maybe Natural
$sel:redPrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
redPrimaryX} -> Maybe Natural
redPrimaryX) (\s :: Hdr10Metadata
s@Hdr10Metadata' {} Maybe Natural
a -> Hdr10Metadata
s {$sel:redPrimaryX:Hdr10Metadata' :: Maybe Natural
redPrimaryX = Maybe Natural
a} :: Hdr10Metadata)

-- | HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
hdr10Metadata_redPrimaryY :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_redPrimaryY :: Lens' Hdr10Metadata (Maybe Natural)
hdr10Metadata_redPrimaryY = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Hdr10Metadata' {Maybe Natural
redPrimaryY :: Maybe Natural
$sel:redPrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
redPrimaryY} -> Maybe Natural
redPrimaryY) (\s :: Hdr10Metadata
s@Hdr10Metadata' {} Maybe Natural
a -> Hdr10Metadata
s {$sel:redPrimaryY:Hdr10Metadata' :: Maybe Natural
redPrimaryY = Maybe Natural
a} :: Hdr10Metadata)

-- | HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
hdr10Metadata_whitePointX :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_whitePointX :: Lens' Hdr10Metadata (Maybe Natural)
hdr10Metadata_whitePointX = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Hdr10Metadata' {Maybe Natural
whitePointX :: Maybe Natural
$sel:whitePointX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
whitePointX} -> Maybe Natural
whitePointX) (\s :: Hdr10Metadata
s@Hdr10Metadata' {} Maybe Natural
a -> Hdr10Metadata
s {$sel:whitePointX:Hdr10Metadata' :: Maybe Natural
whitePointX = Maybe Natural
a} :: Hdr10Metadata)

-- | HDR Master Display Information must be provided by a color grader, using
-- color grading tools. Range is 0 to 50,000, each increment represents
-- 0.00002 in CIE1931 color coordinate. Note that this setting is not for
-- color correction.
hdr10Metadata_whitePointY :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_whitePointY :: Lens' Hdr10Metadata (Maybe Natural)
hdr10Metadata_whitePointY = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Hdr10Metadata' {Maybe Natural
whitePointY :: Maybe Natural
$sel:whitePointY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
whitePointY} -> Maybe Natural
whitePointY) (\s :: Hdr10Metadata
s@Hdr10Metadata' {} Maybe Natural
a -> Hdr10Metadata
s {$sel:whitePointY:Hdr10Metadata' :: Maybe Natural
whitePointY = Maybe Natural
a} :: Hdr10Metadata)

instance Data.FromJSON Hdr10Metadata where
  parseJSON :: Value -> Parser Hdr10Metadata
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Hdr10Metadata"
      ( \Object
x ->
          Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Hdr10Metadata
Hdr10Metadata'
            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
"bluePrimaryX")
            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
"bluePrimaryY")
            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
"greenPrimaryX")
            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
"greenPrimaryY")
            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
"maxContentLightLevel")
            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
"maxFrameAverageLightLevel")
            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
"maxLuminance")
            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
"minLuminance")
            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
"redPrimaryX")
            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
"redPrimaryY")
            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
"whitePointX")
            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
"whitePointY")
      )

instance Prelude.Hashable Hdr10Metadata where
  hashWithSalt :: Int -> Hdr10Metadata -> Int
hashWithSalt Int
_salt Hdr10Metadata' {Maybe Natural
whitePointY :: Maybe Natural
whitePointX :: Maybe Natural
redPrimaryY :: Maybe Natural
redPrimaryX :: Maybe Natural
minLuminance :: Maybe Natural
maxLuminance :: Maybe Natural
maxFrameAverageLightLevel :: Maybe Natural
maxContentLightLevel :: Maybe Natural
greenPrimaryY :: Maybe Natural
greenPrimaryX :: Maybe Natural
bluePrimaryY :: Maybe Natural
bluePrimaryX :: Maybe Natural
$sel:whitePointY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:whitePointX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:redPrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:redPrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:minLuminance:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:maxLuminance:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:maxFrameAverageLightLevel:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:maxContentLightLevel:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:greenPrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:greenPrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:bluePrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:bluePrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
bluePrimaryX
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
bluePrimaryY
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
greenPrimaryX
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
greenPrimaryY
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxContentLightLevel
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxFrameAverageLightLevel
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxLuminance
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
minLuminance
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
redPrimaryX
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
redPrimaryY
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
whitePointX
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
whitePointY

instance Prelude.NFData Hdr10Metadata where
  rnf :: Hdr10Metadata -> ()
rnf Hdr10Metadata' {Maybe Natural
whitePointY :: Maybe Natural
whitePointX :: Maybe Natural
redPrimaryY :: Maybe Natural
redPrimaryX :: Maybe Natural
minLuminance :: Maybe Natural
maxLuminance :: Maybe Natural
maxFrameAverageLightLevel :: Maybe Natural
maxContentLightLevel :: Maybe Natural
greenPrimaryY :: Maybe Natural
greenPrimaryX :: Maybe Natural
bluePrimaryY :: Maybe Natural
bluePrimaryX :: Maybe Natural
$sel:whitePointY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:whitePointX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:redPrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:redPrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:minLuminance:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:maxLuminance:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:maxFrameAverageLightLevel:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:maxContentLightLevel:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:greenPrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:greenPrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:bluePrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:bluePrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
bluePrimaryX
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
bluePrimaryY
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
greenPrimaryX
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
greenPrimaryY
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxContentLightLevel
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxFrameAverageLightLevel
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxLuminance
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
minLuminance
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
redPrimaryX
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
redPrimaryY
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
whitePointX
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
whitePointY

instance Data.ToJSON Hdr10Metadata where
  toJSON :: Hdr10Metadata -> Value
toJSON Hdr10Metadata' {Maybe Natural
whitePointY :: Maybe Natural
whitePointX :: Maybe Natural
redPrimaryY :: Maybe Natural
redPrimaryX :: Maybe Natural
minLuminance :: Maybe Natural
maxLuminance :: Maybe Natural
maxFrameAverageLightLevel :: Maybe Natural
maxContentLightLevel :: Maybe Natural
greenPrimaryY :: Maybe Natural
greenPrimaryX :: Maybe Natural
bluePrimaryY :: Maybe Natural
bluePrimaryX :: Maybe Natural
$sel:whitePointY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:whitePointX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:redPrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:redPrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:minLuminance:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:maxLuminance:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:maxFrameAverageLightLevel:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:maxContentLightLevel:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:greenPrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:greenPrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:bluePrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:bluePrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"bluePrimaryX" 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
bluePrimaryX,
            (Key
"bluePrimaryY" 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
bluePrimaryY,
            (Key
"greenPrimaryX" 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
greenPrimaryX,
            (Key
"greenPrimaryY" 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
greenPrimaryY,
            (Key
"maxContentLightLevel" 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
maxContentLightLevel,
            (Key
"maxFrameAverageLightLevel" 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
maxFrameAverageLightLevel,
            (Key
"maxLuminance" 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
maxLuminance,
            (Key
"minLuminance" 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
minLuminance,
            (Key
"redPrimaryX" 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
redPrimaryX,
            (Key
"redPrimaryY" 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
redPrimaryY,
            (Key
"whitePointX" 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
whitePointX,
            (Key
"whitePointY" 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
whitePointY
          ]
      )