{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.Hdr10Metadata where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
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
bluePrimaryX :: 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,
    -- | 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,
    -- | 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,
    -- | 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
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
greenPrimaryY :: 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,
    -- | 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
redPrimaryY :: 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
  }
  deriving (Hdr10Metadata -> Hdr10Metadata -> Bool
(Hdr10Metadata -> Hdr10Metadata -> Bool)
-> (Hdr10Metadata -> Hdr10Metadata -> Bool) -> Eq Hdr10Metadata
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]
(Int -> ReadS Hdr10Metadata)
-> ReadS [Hdr10Metadata]
-> ReadPrec Hdr10Metadata
-> ReadPrec [Hdr10Metadata]
-> Read 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
(Int -> Hdr10Metadata -> ShowS)
-> (Hdr10Metadata -> String)
-> ([Hdr10Metadata] -> ShowS)
-> Show Hdr10Metadata
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. Hdr10Metadata -> Rep Hdr10Metadata x)
-> (forall x. Rep Hdr10Metadata x -> Hdr10Metadata)
-> Generic Hdr10Metadata
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:
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- 'minLuminance', 'hdr10Metadata_minLuminance' - Nominal minimum mastering display luminance in units of of 0.0001
-- candelas per square meter
--
-- '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.
--
-- 'maxLuminance', 'hdr10Metadata_maxLuminance' - Nominal maximum mastering display luminance in units of of 0.0001
-- candelas per square meter.
newHdr10Metadata ::
  Hdr10Metadata
newHdr10Metadata :: Hdr10Metadata
newHdr10Metadata =
  Hdr10Metadata' :: 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'
    { $sel:redPrimaryX:Hdr10Metadata' :: Maybe Natural
redPrimaryX = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:bluePrimaryX:Hdr10Metadata' :: Maybe Natural
bluePrimaryX = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:maxFrameAverageLightLevel:Hdr10Metadata' :: Maybe Natural
maxFrameAverageLightLevel = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:whitePointY:Hdr10Metadata' :: Maybe Natural
whitePointY = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:maxContentLightLevel:Hdr10Metadata' :: Maybe Natural
maxContentLightLevel = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:whitePointX:Hdr10Metadata' :: Maybe Natural
whitePointX = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:bluePrimaryY:Hdr10Metadata' :: Maybe Natural
bluePrimaryY = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:greenPrimaryY:Hdr10Metadata' :: Maybe Natural
greenPrimaryY = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:greenPrimaryX:Hdr10Metadata' :: Maybe Natural
greenPrimaryX = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:minLuminance:Hdr10Metadata' :: Maybe Natural
minLuminance = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:redPrimaryY:Hdr10Metadata' :: Maybe Natural
redPrimaryY = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:maxLuminance:Hdr10Metadata' :: Maybe Natural
maxLuminance = Maybe Natural
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_redPrimaryX :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_redPrimaryX :: (Maybe Natural -> f (Maybe Natural))
-> Hdr10Metadata -> f Hdr10Metadata
hdr10Metadata_redPrimaryX = (Hdr10Metadata -> Maybe Natural)
-> (Hdr10Metadata -> Maybe Natural -> Hdr10Metadata)
-> Lens Hdr10Metadata Hdr10Metadata (Maybe Natural) (Maybe Natural)
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_bluePrimaryX :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_bluePrimaryX :: (Maybe Natural -> f (Maybe Natural))
-> Hdr10Metadata -> f Hdr10Metadata
hdr10Metadata_bluePrimaryX = (Hdr10Metadata -> Maybe Natural)
-> (Hdr10Metadata -> Maybe Natural -> Hdr10Metadata)
-> Lens Hdr10Metadata Hdr10Metadata (Maybe Natural) (Maybe Natural)
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)

-- | 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 :: (Maybe Natural -> f (Maybe Natural))
-> Hdr10Metadata -> f Hdr10Metadata
hdr10Metadata_maxFrameAverageLightLevel = (Hdr10Metadata -> Maybe Natural)
-> (Hdr10Metadata -> Maybe Natural -> Hdr10Metadata)
-> Lens Hdr10Metadata Hdr10Metadata (Maybe Natural) (Maybe Natural)
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)

-- | 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 :: (Maybe Natural -> f (Maybe Natural))
-> Hdr10Metadata -> f Hdr10Metadata
hdr10Metadata_whitePointY = (Hdr10Metadata -> Maybe Natural)
-> (Hdr10Metadata -> Maybe Natural -> Hdr10Metadata)
-> Lens Hdr10Metadata Hdr10Metadata (Maybe Natural) (Maybe Natural)
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)

-- | 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 :: (Maybe Natural -> f (Maybe Natural))
-> Hdr10Metadata -> f Hdr10Metadata
hdr10Metadata_maxContentLightLevel = (Hdr10Metadata -> Maybe Natural)
-> (Hdr10Metadata -> Maybe Natural -> Hdr10Metadata)
-> Lens Hdr10Metadata Hdr10Metadata (Maybe Natural) (Maybe Natural)
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)

-- | 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 :: (Maybe Natural -> f (Maybe Natural))
-> Hdr10Metadata -> f Hdr10Metadata
hdr10Metadata_whitePointX = (Hdr10Metadata -> Maybe Natural)
-> (Hdr10Metadata -> Maybe Natural -> Hdr10Metadata)
-> Lens Hdr10Metadata Hdr10Metadata (Maybe Natural) (Maybe Natural)
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_bluePrimaryY :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_bluePrimaryY :: (Maybe Natural -> f (Maybe Natural))
-> Hdr10Metadata -> f Hdr10Metadata
hdr10Metadata_bluePrimaryY = (Hdr10Metadata -> Maybe Natural)
-> (Hdr10Metadata -> Maybe Natural -> Hdr10Metadata)
-> Lens Hdr10Metadata Hdr10Metadata (Maybe Natural) (Maybe Natural)
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_greenPrimaryY :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_greenPrimaryY :: (Maybe Natural -> f (Maybe Natural))
-> Hdr10Metadata -> f Hdr10Metadata
hdr10Metadata_greenPrimaryY = (Hdr10Metadata -> Maybe Natural)
-> (Hdr10Metadata -> Maybe Natural -> Hdr10Metadata)
-> Lens Hdr10Metadata Hdr10Metadata (Maybe Natural) (Maybe Natural)
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)

-- | 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 :: (Maybe Natural -> f (Maybe Natural))
-> Hdr10Metadata -> f Hdr10Metadata
hdr10Metadata_greenPrimaryX = (Hdr10Metadata -> Maybe Natural)
-> (Hdr10Metadata -> Maybe Natural -> Hdr10Metadata)
-> Lens Hdr10Metadata Hdr10Metadata (Maybe Natural) (Maybe Natural)
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)

-- | 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 :: (Maybe Natural -> f (Maybe Natural))
-> Hdr10Metadata -> f Hdr10Metadata
hdr10Metadata_minLuminance = (Hdr10Metadata -> Maybe Natural)
-> (Hdr10Metadata -> Maybe Natural -> Hdr10Metadata)
-> Lens Hdr10Metadata Hdr10Metadata (Maybe Natural) (Maybe Natural)
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_redPrimaryY :: Lens.Lens' Hdr10Metadata (Prelude.Maybe Prelude.Natural)
hdr10Metadata_redPrimaryY :: (Maybe Natural -> f (Maybe Natural))
-> Hdr10Metadata -> f Hdr10Metadata
hdr10Metadata_redPrimaryY = (Hdr10Metadata -> Maybe Natural)
-> (Hdr10Metadata -> Maybe Natural -> Hdr10Metadata)
-> Lens Hdr10Metadata Hdr10Metadata (Maybe Natural) (Maybe Natural)
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)

-- | 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 :: (Maybe Natural -> f (Maybe Natural))
-> Hdr10Metadata -> f Hdr10Metadata
hdr10Metadata_maxLuminance = (Hdr10Metadata -> Maybe Natural)
-> (Hdr10Metadata -> Maybe Natural -> Hdr10Metadata)
-> Lens Hdr10Metadata Hdr10Metadata (Maybe Natural) (Maybe Natural)
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)

instance Core.FromJSON Hdr10Metadata where
  parseJSON :: Value -> Parser Hdr10Metadata
parseJSON =
    String
-> (Object -> Parser Hdr10Metadata)
-> Value
-> Parser Hdr10Metadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.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'
            (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)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Hdr10Metadata)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"redPrimaryX")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Hdr10Metadata)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Hdr10Metadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"bluePrimaryX")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Hdr10Metadata)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Hdr10Metadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"maxFrameAverageLightLevel")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Hdr10Metadata)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Hdr10Metadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"whitePointY")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Hdr10Metadata)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Hdr10Metadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"maxContentLightLevel")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Hdr10Metadata)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Hdr10Metadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"whitePointX")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Hdr10Metadata)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Hdr10Metadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"bluePrimaryY")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Hdr10Metadata)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Hdr10Metadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"greenPrimaryY")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Hdr10Metadata)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural -> Maybe Natural -> Maybe Natural -> Hdr10Metadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"greenPrimaryX")
            Parser
  (Maybe Natural -> Maybe Natural -> Maybe Natural -> Hdr10Metadata)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> Maybe Natural -> Hdr10Metadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"minLuminance")
            Parser (Maybe Natural -> Maybe Natural -> Hdr10Metadata)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> Hdr10Metadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"redPrimaryY")
            Parser (Maybe Natural -> Hdr10Metadata)
-> Parser (Maybe Natural) -> Parser Hdr10Metadata
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"maxLuminance")
      )

instance Prelude.Hashable Hdr10Metadata

instance Prelude.NFData Hdr10Metadata

instance Core.ToJSON Hdr10Metadata where
  toJSON :: Hdr10Metadata -> Value
toJSON Hdr10Metadata' {Maybe Natural
maxLuminance :: Maybe Natural
redPrimaryY :: Maybe Natural
minLuminance :: Maybe Natural
greenPrimaryX :: Maybe Natural
greenPrimaryY :: Maybe Natural
bluePrimaryY :: Maybe Natural
whitePointX :: Maybe Natural
maxContentLightLevel :: Maybe Natural
whitePointY :: Maybe Natural
maxFrameAverageLightLevel :: Maybe Natural
bluePrimaryX :: Maybe Natural
redPrimaryX :: Maybe Natural
$sel:maxLuminance:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:redPrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:minLuminance:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:greenPrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:greenPrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:bluePrimaryY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:whitePointX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:maxContentLightLevel:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:whitePointY:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:maxFrameAverageLightLevel:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:bluePrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
$sel:redPrimaryX:Hdr10Metadata' :: Hdr10Metadata -> Maybe Natural
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"redPrimaryX" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
redPrimaryX,
            (Text
"bluePrimaryX" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
bluePrimaryX,
            (Text
"maxFrameAverageLightLevel" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxFrameAverageLightLevel,
            (Text
"whitePointY" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
whitePointY,
            (Text
"maxContentLightLevel" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxContentLightLevel,
            (Text
"whitePointX" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
whitePointX,
            (Text
"bluePrimaryY" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
bluePrimaryY,
            (Text
"greenPrimaryY" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
greenPrimaryY,
            (Text
"greenPrimaryX" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
greenPrimaryX,
            (Text
"minLuminance" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
minLuminance,
            (Text
"redPrimaryY" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
redPrimaryY,
            (Text
"maxLuminance" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxLuminance
          ]
      )