{-# 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.VideoSelector
-- 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.VideoSelector where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.AlphaBehavior
import Amazonka.MediaConvert.Types.ColorSpace
import Amazonka.MediaConvert.Types.ColorSpaceUsage
import Amazonka.MediaConvert.Types.Hdr10Metadata
import Amazonka.MediaConvert.Types.InputRotate
import Amazonka.MediaConvert.Types.InputSampleRange
import qualified Amazonka.Prelude as Prelude

-- | Input video selectors contain the video settings for the input. Each of
-- your inputs can have up to one video selector.
--
-- /See:/ 'newVideoSelector' smart constructor.
data VideoSelector = VideoSelector'
  { -- | Selects a specific program from within a multi-program transport stream.
    -- Note that Quad 4K is not currently supported.
    VideoSelector -> Maybe Int
programNumber :: Prelude.Maybe Prelude.Int,
    -- | Ignore this setting unless this input is a QuickTime animation with an
    -- alpha channel. Use this setting to create separate Key and Fill outputs.
    -- In each output, specify which part of the input MediaConvert uses. Leave
    -- this setting at the default value DISCARD to delete the alpha channel
    -- and preserve the video. Set it to REMAP_TO_LUMA to delete the video and
    -- map the alpha channel to the luma channel of your outputs.
    VideoSelector -> Maybe AlphaBehavior
alphaBehavior :: Prelude.Maybe AlphaBehavior,
    -- | There are two sources for color metadata, the input file and the job
    -- input settings Color space (ColorSpace) and HDR master display
    -- information settings(Hdr10Metadata). The Color space usage setting
    -- determines which takes precedence. Choose Force (FORCE) to use color
    -- metadata from the input job settings. If you don\'t specify values for
    -- those settings, the service defaults to using metadata from your input.
    -- FALLBACK - Choose Fallback (FALLBACK) to use color metadata from the
    -- source when it is present. If there\'s no color metadata in your input
    -- file, the service defaults to using values you specify in the input
    -- settings.
    VideoSelector -> Maybe ColorSpaceUsage
colorSpaceUsage :: Prelude.Maybe ColorSpaceUsage,
    -- | Use these settings to provide HDR 10 metadata that is missing or
    -- inaccurate in your input video. Appropriate values vary depending on the
    -- input video and must be provided by a color grader. The color grader
    -- generates these values during the HDR 10 mastering process. The valid
    -- range for each of these settings is 0 to 50,000. Each increment
    -- represents 0.00002 in CIE1931 color coordinate. Related settings - When
    -- you specify these values, you must also set Color space (ColorSpace) to
    -- HDR 10 (HDR10). To specify whether the the values you specify here take
    -- precedence over the values in the metadata of your input file, set Color
    -- space usage (ColorSpaceUsage). To specify whether color metadata is
    -- included in an output, set Color metadata (ColorMetadata). For more
    -- information about MediaConvert HDR jobs, see
    -- https:\/\/docs.aws.amazon.com\/console\/mediaconvert\/hdr.
    VideoSelector -> Maybe Hdr10Metadata
hdr10Metadata :: Prelude.Maybe Hdr10Metadata,
    -- | Use PID (Pid) to select specific video data from an input file. Specify
    -- this value as an integer; the system automatically converts it to the
    -- hexidecimal value. For example, 257 selects PID 0x101. A PID, or packet
    -- identifier, is an identifier for a set of data in an MPEG-2 transport
    -- stream container.
    VideoSelector -> Maybe Natural
pid :: Prelude.Maybe Prelude.Natural,
    -- | Use Rotate (InputRotate) to specify how the service rotates your video.
    -- You can choose automatic rotation or specify a rotation. You can specify
    -- a clockwise rotation of 0, 90, 180, or 270 degrees. If your input video
    -- container is .mov or .mp4 and your input has rotation metadata, you can
    -- choose Automatic to have the service rotate your video according to the
    -- rotation specified in the metadata. The rotation must be within one
    -- degree of 90, 180, or 270 degrees. If the rotation metadata specifies
    -- any other rotation, the service will default to no rotation. By default,
    -- the service does no rotation, even if your input video has rotation
    -- metadata. The service doesn\'t pass through rotation metadata.
    VideoSelector -> Maybe InputRotate
rotate :: Prelude.Maybe InputRotate,
    -- | If your input video has accurate color space metadata, or if you don\'t
    -- know about color space, leave this set to the default value Follow
    -- (FOLLOW). The service will automatically detect your input color space.
    -- If your input video has metadata indicating the wrong color space,
    -- specify the accurate color space here. If your input video is HDR 10 and
    -- the SMPTE ST 2086 Mastering Display Color Volume static metadata isn\'t
    -- present in your video stream, or if that metadata is present but not
    -- accurate, choose Force HDR 10 (FORCE_HDR10) here and specify correct
    -- values in the input HDR 10 metadata (Hdr10Metadata) settings. For more
    -- information about MediaConvert HDR jobs, see
    -- https:\/\/docs.aws.amazon.com\/console\/mediaconvert\/hdr.
    VideoSelector -> Maybe ColorSpace
colorSpace :: Prelude.Maybe ColorSpace,
    -- | If the sample range metadata in your input video is accurate, or if you
    -- don\'t know about sample range, keep the default value, Follow (FOLLOW),
    -- for this setting. When you do, the service automatically detects your
    -- input sample range. If your input video has metadata indicating the
    -- wrong sample range, specify the accurate sample range here. When you do,
    -- MediaConvert ignores any sample range information in the input metadata.
    -- Regardless of whether MediaConvert uses the input sample range or the
    -- sample range that you specify, MediaConvert uses the sample range for
    -- transcoding and also writes it to the output metadata.
    VideoSelector -> Maybe InputSampleRange
sampleRange :: Prelude.Maybe InputSampleRange
  }
  deriving (VideoSelector -> VideoSelector -> Bool
(VideoSelector -> VideoSelector -> Bool)
-> (VideoSelector -> VideoSelector -> Bool) -> Eq VideoSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VideoSelector -> VideoSelector -> Bool
$c/= :: VideoSelector -> VideoSelector -> Bool
== :: VideoSelector -> VideoSelector -> Bool
$c== :: VideoSelector -> VideoSelector -> Bool
Prelude.Eq, ReadPrec [VideoSelector]
ReadPrec VideoSelector
Int -> ReadS VideoSelector
ReadS [VideoSelector]
(Int -> ReadS VideoSelector)
-> ReadS [VideoSelector]
-> ReadPrec VideoSelector
-> ReadPrec [VideoSelector]
-> Read VideoSelector
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VideoSelector]
$creadListPrec :: ReadPrec [VideoSelector]
readPrec :: ReadPrec VideoSelector
$creadPrec :: ReadPrec VideoSelector
readList :: ReadS [VideoSelector]
$creadList :: ReadS [VideoSelector]
readsPrec :: Int -> ReadS VideoSelector
$creadsPrec :: Int -> ReadS VideoSelector
Prelude.Read, Int -> VideoSelector -> ShowS
[VideoSelector] -> ShowS
VideoSelector -> String
(Int -> VideoSelector -> ShowS)
-> (VideoSelector -> String)
-> ([VideoSelector] -> ShowS)
-> Show VideoSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VideoSelector] -> ShowS
$cshowList :: [VideoSelector] -> ShowS
show :: VideoSelector -> String
$cshow :: VideoSelector -> String
showsPrec :: Int -> VideoSelector -> ShowS
$cshowsPrec :: Int -> VideoSelector -> ShowS
Prelude.Show, (forall x. VideoSelector -> Rep VideoSelector x)
-> (forall x. Rep VideoSelector x -> VideoSelector)
-> Generic VideoSelector
forall x. Rep VideoSelector x -> VideoSelector
forall x. VideoSelector -> Rep VideoSelector x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VideoSelector x -> VideoSelector
$cfrom :: forall x. VideoSelector -> Rep VideoSelector x
Prelude.Generic)

-- |
-- Create a value of 'VideoSelector' 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:
--
-- 'programNumber', 'videoSelector_programNumber' - Selects a specific program from within a multi-program transport stream.
-- Note that Quad 4K is not currently supported.
--
-- 'alphaBehavior', 'videoSelector_alphaBehavior' - Ignore this setting unless this input is a QuickTime animation with an
-- alpha channel. Use this setting to create separate Key and Fill outputs.
-- In each output, specify which part of the input MediaConvert uses. Leave
-- this setting at the default value DISCARD to delete the alpha channel
-- and preserve the video. Set it to REMAP_TO_LUMA to delete the video and
-- map the alpha channel to the luma channel of your outputs.
--
-- 'colorSpaceUsage', 'videoSelector_colorSpaceUsage' - There are two sources for color metadata, the input file and the job
-- input settings Color space (ColorSpace) and HDR master display
-- information settings(Hdr10Metadata). The Color space usage setting
-- determines which takes precedence. Choose Force (FORCE) to use color
-- metadata from the input job settings. If you don\'t specify values for
-- those settings, the service defaults to using metadata from your input.
-- FALLBACK - Choose Fallback (FALLBACK) to use color metadata from the
-- source when it is present. If there\'s no color metadata in your input
-- file, the service defaults to using values you specify in the input
-- settings.
--
-- 'hdr10Metadata', 'videoSelector_hdr10Metadata' - Use these settings to provide HDR 10 metadata that is missing or
-- inaccurate in your input video. Appropriate values vary depending on the
-- input video and must be provided by a color grader. The color grader
-- generates these values during the HDR 10 mastering process. The valid
-- range for each of these settings is 0 to 50,000. Each increment
-- represents 0.00002 in CIE1931 color coordinate. Related settings - When
-- you specify these values, you must also set Color space (ColorSpace) to
-- HDR 10 (HDR10). To specify whether the the values you specify here take
-- precedence over the values in the metadata of your input file, set Color
-- space usage (ColorSpaceUsage). To specify whether color metadata is
-- included in an output, set Color metadata (ColorMetadata). For more
-- information about MediaConvert HDR jobs, see
-- https:\/\/docs.aws.amazon.com\/console\/mediaconvert\/hdr.
--
-- 'pid', 'videoSelector_pid' - Use PID (Pid) to select specific video data from an input file. Specify
-- this value as an integer; the system automatically converts it to the
-- hexidecimal value. For example, 257 selects PID 0x101. A PID, or packet
-- identifier, is an identifier for a set of data in an MPEG-2 transport
-- stream container.
--
-- 'rotate', 'videoSelector_rotate' - Use Rotate (InputRotate) to specify how the service rotates your video.
-- You can choose automatic rotation or specify a rotation. You can specify
-- a clockwise rotation of 0, 90, 180, or 270 degrees. If your input video
-- container is .mov or .mp4 and your input has rotation metadata, you can
-- choose Automatic to have the service rotate your video according to the
-- rotation specified in the metadata. The rotation must be within one
-- degree of 90, 180, or 270 degrees. If the rotation metadata specifies
-- any other rotation, the service will default to no rotation. By default,
-- the service does no rotation, even if your input video has rotation
-- metadata. The service doesn\'t pass through rotation metadata.
--
-- 'colorSpace', 'videoSelector_colorSpace' - If your input video has accurate color space metadata, or if you don\'t
-- know about color space, leave this set to the default value Follow
-- (FOLLOW). The service will automatically detect your input color space.
-- If your input video has metadata indicating the wrong color space,
-- specify the accurate color space here. If your input video is HDR 10 and
-- the SMPTE ST 2086 Mastering Display Color Volume static metadata isn\'t
-- present in your video stream, or if that metadata is present but not
-- accurate, choose Force HDR 10 (FORCE_HDR10) here and specify correct
-- values in the input HDR 10 metadata (Hdr10Metadata) settings. For more
-- information about MediaConvert HDR jobs, see
-- https:\/\/docs.aws.amazon.com\/console\/mediaconvert\/hdr.
--
-- 'sampleRange', 'videoSelector_sampleRange' - If the sample range metadata in your input video is accurate, or if you
-- don\'t know about sample range, keep the default value, Follow (FOLLOW),
-- for this setting. When you do, the service automatically detects your
-- input sample range. If your input video has metadata indicating the
-- wrong sample range, specify the accurate sample range here. When you do,
-- MediaConvert ignores any sample range information in the input metadata.
-- Regardless of whether MediaConvert uses the input sample range or the
-- sample range that you specify, MediaConvert uses the sample range for
-- transcoding and also writes it to the output metadata.
newVideoSelector ::
  VideoSelector
newVideoSelector :: VideoSelector
newVideoSelector =
  VideoSelector' :: Maybe Int
-> Maybe AlphaBehavior
-> Maybe ColorSpaceUsage
-> Maybe Hdr10Metadata
-> Maybe Natural
-> Maybe InputRotate
-> Maybe ColorSpace
-> Maybe InputSampleRange
-> VideoSelector
VideoSelector'
    { $sel:programNumber:VideoSelector' :: Maybe Int
programNumber = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:alphaBehavior:VideoSelector' :: Maybe AlphaBehavior
alphaBehavior = Maybe AlphaBehavior
forall a. Maybe a
Prelude.Nothing,
      $sel:colorSpaceUsage:VideoSelector' :: Maybe ColorSpaceUsage
colorSpaceUsage = Maybe ColorSpaceUsage
forall a. Maybe a
Prelude.Nothing,
      $sel:hdr10Metadata:VideoSelector' :: Maybe Hdr10Metadata
hdr10Metadata = Maybe Hdr10Metadata
forall a. Maybe a
Prelude.Nothing,
      $sel:pid:VideoSelector' :: Maybe Natural
pid = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:rotate:VideoSelector' :: Maybe InputRotate
rotate = Maybe InputRotate
forall a. Maybe a
Prelude.Nothing,
      $sel:colorSpace:VideoSelector' :: Maybe ColorSpace
colorSpace = Maybe ColorSpace
forall a. Maybe a
Prelude.Nothing,
      $sel:sampleRange:VideoSelector' :: Maybe InputSampleRange
sampleRange = Maybe InputSampleRange
forall a. Maybe a
Prelude.Nothing
    }

-- | Selects a specific program from within a multi-program transport stream.
-- Note that Quad 4K is not currently supported.
videoSelector_programNumber :: Lens.Lens' VideoSelector (Prelude.Maybe Prelude.Int)
videoSelector_programNumber :: (Maybe Int -> f (Maybe Int)) -> VideoSelector -> f VideoSelector
videoSelector_programNumber = (VideoSelector -> Maybe Int)
-> (VideoSelector -> Maybe Int -> VideoSelector)
-> Lens VideoSelector VideoSelector (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe Int
programNumber :: Maybe Int
$sel:programNumber:VideoSelector' :: VideoSelector -> Maybe Int
programNumber} -> Maybe Int
programNumber) (\s :: VideoSelector
s@VideoSelector' {} Maybe Int
a -> VideoSelector
s {$sel:programNumber:VideoSelector' :: Maybe Int
programNumber = Maybe Int
a} :: VideoSelector)

-- | Ignore this setting unless this input is a QuickTime animation with an
-- alpha channel. Use this setting to create separate Key and Fill outputs.
-- In each output, specify which part of the input MediaConvert uses. Leave
-- this setting at the default value DISCARD to delete the alpha channel
-- and preserve the video. Set it to REMAP_TO_LUMA to delete the video and
-- map the alpha channel to the luma channel of your outputs.
videoSelector_alphaBehavior :: Lens.Lens' VideoSelector (Prelude.Maybe AlphaBehavior)
videoSelector_alphaBehavior :: (Maybe AlphaBehavior -> f (Maybe AlphaBehavior))
-> VideoSelector -> f VideoSelector
videoSelector_alphaBehavior = (VideoSelector -> Maybe AlphaBehavior)
-> (VideoSelector -> Maybe AlphaBehavior -> VideoSelector)
-> Lens
     VideoSelector
     VideoSelector
     (Maybe AlphaBehavior)
     (Maybe AlphaBehavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe AlphaBehavior
alphaBehavior :: Maybe AlphaBehavior
$sel:alphaBehavior:VideoSelector' :: VideoSelector -> Maybe AlphaBehavior
alphaBehavior} -> Maybe AlphaBehavior
alphaBehavior) (\s :: VideoSelector
s@VideoSelector' {} Maybe AlphaBehavior
a -> VideoSelector
s {$sel:alphaBehavior:VideoSelector' :: Maybe AlphaBehavior
alphaBehavior = Maybe AlphaBehavior
a} :: VideoSelector)

-- | There are two sources for color metadata, the input file and the job
-- input settings Color space (ColorSpace) and HDR master display
-- information settings(Hdr10Metadata). The Color space usage setting
-- determines which takes precedence. Choose Force (FORCE) to use color
-- metadata from the input job settings. If you don\'t specify values for
-- those settings, the service defaults to using metadata from your input.
-- FALLBACK - Choose Fallback (FALLBACK) to use color metadata from the
-- source when it is present. If there\'s no color metadata in your input
-- file, the service defaults to using values you specify in the input
-- settings.
videoSelector_colorSpaceUsage :: Lens.Lens' VideoSelector (Prelude.Maybe ColorSpaceUsage)
videoSelector_colorSpaceUsage :: (Maybe ColorSpaceUsage -> f (Maybe ColorSpaceUsage))
-> VideoSelector -> f VideoSelector
videoSelector_colorSpaceUsage = (VideoSelector -> Maybe ColorSpaceUsage)
-> (VideoSelector -> Maybe ColorSpaceUsage -> VideoSelector)
-> Lens
     VideoSelector
     VideoSelector
     (Maybe ColorSpaceUsage)
     (Maybe ColorSpaceUsage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe ColorSpaceUsage
colorSpaceUsage :: Maybe ColorSpaceUsage
$sel:colorSpaceUsage:VideoSelector' :: VideoSelector -> Maybe ColorSpaceUsage
colorSpaceUsage} -> Maybe ColorSpaceUsage
colorSpaceUsage) (\s :: VideoSelector
s@VideoSelector' {} Maybe ColorSpaceUsage
a -> VideoSelector
s {$sel:colorSpaceUsage:VideoSelector' :: Maybe ColorSpaceUsage
colorSpaceUsage = Maybe ColorSpaceUsage
a} :: VideoSelector)

-- | Use these settings to provide HDR 10 metadata that is missing or
-- inaccurate in your input video. Appropriate values vary depending on the
-- input video and must be provided by a color grader. The color grader
-- generates these values during the HDR 10 mastering process. The valid
-- range for each of these settings is 0 to 50,000. Each increment
-- represents 0.00002 in CIE1931 color coordinate. Related settings - When
-- you specify these values, you must also set Color space (ColorSpace) to
-- HDR 10 (HDR10). To specify whether the the values you specify here take
-- precedence over the values in the metadata of your input file, set Color
-- space usage (ColorSpaceUsage). To specify whether color metadata is
-- included in an output, set Color metadata (ColorMetadata). For more
-- information about MediaConvert HDR jobs, see
-- https:\/\/docs.aws.amazon.com\/console\/mediaconvert\/hdr.
videoSelector_hdr10Metadata :: Lens.Lens' VideoSelector (Prelude.Maybe Hdr10Metadata)
videoSelector_hdr10Metadata :: (Maybe Hdr10Metadata -> f (Maybe Hdr10Metadata))
-> VideoSelector -> f VideoSelector
videoSelector_hdr10Metadata = (VideoSelector -> Maybe Hdr10Metadata)
-> (VideoSelector -> Maybe Hdr10Metadata -> VideoSelector)
-> Lens
     VideoSelector
     VideoSelector
     (Maybe Hdr10Metadata)
     (Maybe Hdr10Metadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe Hdr10Metadata
hdr10Metadata :: Maybe Hdr10Metadata
$sel:hdr10Metadata:VideoSelector' :: VideoSelector -> Maybe Hdr10Metadata
hdr10Metadata} -> Maybe Hdr10Metadata
hdr10Metadata) (\s :: VideoSelector
s@VideoSelector' {} Maybe Hdr10Metadata
a -> VideoSelector
s {$sel:hdr10Metadata:VideoSelector' :: Maybe Hdr10Metadata
hdr10Metadata = Maybe Hdr10Metadata
a} :: VideoSelector)

-- | Use PID (Pid) to select specific video data from an input file. Specify
-- this value as an integer; the system automatically converts it to the
-- hexidecimal value. For example, 257 selects PID 0x101. A PID, or packet
-- identifier, is an identifier for a set of data in an MPEG-2 transport
-- stream container.
videoSelector_pid :: Lens.Lens' VideoSelector (Prelude.Maybe Prelude.Natural)
videoSelector_pid :: (Maybe Natural -> f (Maybe Natural))
-> VideoSelector -> f VideoSelector
videoSelector_pid = (VideoSelector -> Maybe Natural)
-> (VideoSelector -> Maybe Natural -> VideoSelector)
-> Lens VideoSelector VideoSelector (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe Natural
pid :: Maybe Natural
$sel:pid:VideoSelector' :: VideoSelector -> Maybe Natural
pid} -> Maybe Natural
pid) (\s :: VideoSelector
s@VideoSelector' {} Maybe Natural
a -> VideoSelector
s {$sel:pid:VideoSelector' :: Maybe Natural
pid = Maybe Natural
a} :: VideoSelector)

-- | Use Rotate (InputRotate) to specify how the service rotates your video.
-- You can choose automatic rotation or specify a rotation. You can specify
-- a clockwise rotation of 0, 90, 180, or 270 degrees. If your input video
-- container is .mov or .mp4 and your input has rotation metadata, you can
-- choose Automatic to have the service rotate your video according to the
-- rotation specified in the metadata. The rotation must be within one
-- degree of 90, 180, or 270 degrees. If the rotation metadata specifies
-- any other rotation, the service will default to no rotation. By default,
-- the service does no rotation, even if your input video has rotation
-- metadata. The service doesn\'t pass through rotation metadata.
videoSelector_rotate :: Lens.Lens' VideoSelector (Prelude.Maybe InputRotate)
videoSelector_rotate :: (Maybe InputRotate -> f (Maybe InputRotate))
-> VideoSelector -> f VideoSelector
videoSelector_rotate = (VideoSelector -> Maybe InputRotate)
-> (VideoSelector -> Maybe InputRotate -> VideoSelector)
-> Lens
     VideoSelector VideoSelector (Maybe InputRotate) (Maybe InputRotate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe InputRotate
rotate :: Maybe InputRotate
$sel:rotate:VideoSelector' :: VideoSelector -> Maybe InputRotate
rotate} -> Maybe InputRotate
rotate) (\s :: VideoSelector
s@VideoSelector' {} Maybe InputRotate
a -> VideoSelector
s {$sel:rotate:VideoSelector' :: Maybe InputRotate
rotate = Maybe InputRotate
a} :: VideoSelector)

-- | If your input video has accurate color space metadata, or if you don\'t
-- know about color space, leave this set to the default value Follow
-- (FOLLOW). The service will automatically detect your input color space.
-- If your input video has metadata indicating the wrong color space,
-- specify the accurate color space here. If your input video is HDR 10 and
-- the SMPTE ST 2086 Mastering Display Color Volume static metadata isn\'t
-- present in your video stream, or if that metadata is present but not
-- accurate, choose Force HDR 10 (FORCE_HDR10) here and specify correct
-- values in the input HDR 10 metadata (Hdr10Metadata) settings. For more
-- information about MediaConvert HDR jobs, see
-- https:\/\/docs.aws.amazon.com\/console\/mediaconvert\/hdr.
videoSelector_colorSpace :: Lens.Lens' VideoSelector (Prelude.Maybe ColorSpace)
videoSelector_colorSpace :: (Maybe ColorSpace -> f (Maybe ColorSpace))
-> VideoSelector -> f VideoSelector
videoSelector_colorSpace = (VideoSelector -> Maybe ColorSpace)
-> (VideoSelector -> Maybe ColorSpace -> VideoSelector)
-> Lens
     VideoSelector VideoSelector (Maybe ColorSpace) (Maybe ColorSpace)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe ColorSpace
colorSpace :: Maybe ColorSpace
$sel:colorSpace:VideoSelector' :: VideoSelector -> Maybe ColorSpace
colorSpace} -> Maybe ColorSpace
colorSpace) (\s :: VideoSelector
s@VideoSelector' {} Maybe ColorSpace
a -> VideoSelector
s {$sel:colorSpace:VideoSelector' :: Maybe ColorSpace
colorSpace = Maybe ColorSpace
a} :: VideoSelector)

-- | If the sample range metadata in your input video is accurate, or if you
-- don\'t know about sample range, keep the default value, Follow (FOLLOW),
-- for this setting. When you do, the service automatically detects your
-- input sample range. If your input video has metadata indicating the
-- wrong sample range, specify the accurate sample range here. When you do,
-- MediaConvert ignores any sample range information in the input metadata.
-- Regardless of whether MediaConvert uses the input sample range or the
-- sample range that you specify, MediaConvert uses the sample range for
-- transcoding and also writes it to the output metadata.
videoSelector_sampleRange :: Lens.Lens' VideoSelector (Prelude.Maybe InputSampleRange)
videoSelector_sampleRange :: (Maybe InputSampleRange -> f (Maybe InputSampleRange))
-> VideoSelector -> f VideoSelector
videoSelector_sampleRange = (VideoSelector -> Maybe InputSampleRange)
-> (VideoSelector -> Maybe InputSampleRange -> VideoSelector)
-> Lens
     VideoSelector
     VideoSelector
     (Maybe InputSampleRange)
     (Maybe InputSampleRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe InputSampleRange
sampleRange :: Maybe InputSampleRange
$sel:sampleRange:VideoSelector' :: VideoSelector -> Maybe InputSampleRange
sampleRange} -> Maybe InputSampleRange
sampleRange) (\s :: VideoSelector
s@VideoSelector' {} Maybe InputSampleRange
a -> VideoSelector
s {$sel:sampleRange:VideoSelector' :: Maybe InputSampleRange
sampleRange = Maybe InputSampleRange
a} :: VideoSelector)

instance Core.FromJSON VideoSelector where
  parseJSON :: Value -> Parser VideoSelector
parseJSON =
    String
-> (Object -> Parser VideoSelector)
-> Value
-> Parser VideoSelector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"VideoSelector"
      ( \Object
x ->
          Maybe Int
-> Maybe AlphaBehavior
-> Maybe ColorSpaceUsage
-> Maybe Hdr10Metadata
-> Maybe Natural
-> Maybe InputRotate
-> Maybe ColorSpace
-> Maybe InputSampleRange
-> VideoSelector
VideoSelector'
            (Maybe Int
 -> Maybe AlphaBehavior
 -> Maybe ColorSpaceUsage
 -> Maybe Hdr10Metadata
 -> Maybe Natural
 -> Maybe InputRotate
 -> Maybe ColorSpace
 -> Maybe InputSampleRange
 -> VideoSelector)
-> Parser (Maybe Int)
-> Parser
     (Maybe AlphaBehavior
      -> Maybe ColorSpaceUsage
      -> Maybe Hdr10Metadata
      -> Maybe Natural
      -> Maybe InputRotate
      -> Maybe ColorSpace
      -> Maybe InputSampleRange
      -> VideoSelector)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"programNumber")
            Parser
  (Maybe AlphaBehavior
   -> Maybe ColorSpaceUsage
   -> Maybe Hdr10Metadata
   -> Maybe Natural
   -> Maybe InputRotate
   -> Maybe ColorSpace
   -> Maybe InputSampleRange
   -> VideoSelector)
-> Parser (Maybe AlphaBehavior)
-> Parser
     (Maybe ColorSpaceUsage
      -> Maybe Hdr10Metadata
      -> Maybe Natural
      -> Maybe InputRotate
      -> Maybe ColorSpace
      -> Maybe InputSampleRange
      -> VideoSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AlphaBehavior)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"alphaBehavior")
            Parser
  (Maybe ColorSpaceUsage
   -> Maybe Hdr10Metadata
   -> Maybe Natural
   -> Maybe InputRotate
   -> Maybe ColorSpace
   -> Maybe InputSampleRange
   -> VideoSelector)
-> Parser (Maybe ColorSpaceUsage)
-> Parser
     (Maybe Hdr10Metadata
      -> Maybe Natural
      -> Maybe InputRotate
      -> Maybe ColorSpace
      -> Maybe InputSampleRange
      -> VideoSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ColorSpaceUsage)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"colorSpaceUsage")
            Parser
  (Maybe Hdr10Metadata
   -> Maybe Natural
   -> Maybe InputRotate
   -> Maybe ColorSpace
   -> Maybe InputSampleRange
   -> VideoSelector)
-> Parser (Maybe Hdr10Metadata)
-> Parser
     (Maybe Natural
      -> Maybe InputRotate
      -> Maybe ColorSpace
      -> Maybe InputSampleRange
      -> VideoSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Hdr10Metadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hdr10Metadata")
            Parser
  (Maybe Natural
   -> Maybe InputRotate
   -> Maybe ColorSpace
   -> Maybe InputSampleRange
   -> VideoSelector)
-> Parser (Maybe Natural)
-> Parser
     (Maybe InputRotate
      -> Maybe ColorSpace -> Maybe InputSampleRange -> VideoSelector)
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
"pid")
            Parser
  (Maybe InputRotate
   -> Maybe ColorSpace -> Maybe InputSampleRange -> VideoSelector)
-> Parser (Maybe InputRotate)
-> Parser
     (Maybe ColorSpace -> Maybe InputSampleRange -> VideoSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputRotate)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"rotate")
            Parser
  (Maybe ColorSpace -> Maybe InputSampleRange -> VideoSelector)
-> Parser (Maybe ColorSpace)
-> Parser (Maybe InputSampleRange -> VideoSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ColorSpace)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"colorSpace")
            Parser (Maybe InputSampleRange -> VideoSelector)
-> Parser (Maybe InputSampleRange) -> Parser VideoSelector
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputSampleRange)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sampleRange")
      )

instance Prelude.Hashable VideoSelector

instance Prelude.NFData VideoSelector

instance Core.ToJSON VideoSelector where
  toJSON :: VideoSelector -> Value
toJSON VideoSelector' {Maybe Int
Maybe Natural
Maybe AlphaBehavior
Maybe ColorSpace
Maybe ColorSpaceUsage
Maybe Hdr10Metadata
Maybe InputRotate
Maybe InputSampleRange
sampleRange :: Maybe InputSampleRange
colorSpace :: Maybe ColorSpace
rotate :: Maybe InputRotate
pid :: Maybe Natural
hdr10Metadata :: Maybe Hdr10Metadata
colorSpaceUsage :: Maybe ColorSpaceUsage
alphaBehavior :: Maybe AlphaBehavior
programNumber :: Maybe Int
$sel:sampleRange:VideoSelector' :: VideoSelector -> Maybe InputSampleRange
$sel:colorSpace:VideoSelector' :: VideoSelector -> Maybe ColorSpace
$sel:rotate:VideoSelector' :: VideoSelector -> Maybe InputRotate
$sel:pid:VideoSelector' :: VideoSelector -> Maybe Natural
$sel:hdr10Metadata:VideoSelector' :: VideoSelector -> Maybe Hdr10Metadata
$sel:colorSpaceUsage:VideoSelector' :: VideoSelector -> Maybe ColorSpaceUsage
$sel:alphaBehavior:VideoSelector' :: VideoSelector -> Maybe AlphaBehavior
$sel:programNumber:VideoSelector' :: VideoSelector -> Maybe Int
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"programNumber" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
programNumber,
            (Text
"alphaBehavior" Text -> AlphaBehavior -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AlphaBehavior -> Pair) -> Maybe AlphaBehavior -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AlphaBehavior
alphaBehavior,
            (Text
"colorSpaceUsage" Text -> ColorSpaceUsage -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ColorSpaceUsage -> Pair) -> Maybe ColorSpaceUsage -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ColorSpaceUsage
colorSpaceUsage,
            (Text
"hdr10Metadata" Text -> Hdr10Metadata -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Hdr10Metadata -> Pair) -> Maybe Hdr10Metadata -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Hdr10Metadata
hdr10Metadata,
            (Text
"pid" 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
pid,
            (Text
"rotate" Text -> InputRotate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (InputRotate -> Pair) -> Maybe InputRotate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputRotate
rotate,
            (Text
"colorSpace" Text -> ColorSpace -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ColorSpace -> Pair) -> Maybe ColorSpace -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ColorSpace
colorSpace,
            (Text
"sampleRange" Text -> InputSampleRange -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (InputSampleRange -> Pair) -> Maybe InputSampleRange -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputSampleRange
sampleRange
          ]
      )