{-# 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.MediaLive.Types.VideoSelectorColorSpaceSettings
-- 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.MediaLive.Types.VideoSelectorColorSpaceSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.Hdr10Settings
import qualified Amazonka.Prelude as Prelude

-- | Video Selector Color Space Settings
--
-- /See:/ 'newVideoSelectorColorSpaceSettings' smart constructor.
data VideoSelectorColorSpaceSettings = VideoSelectorColorSpaceSettings'
  { VideoSelectorColorSpaceSettings -> Maybe Hdr10Settings
hdr10Settings :: Prelude.Maybe Hdr10Settings
  }
  deriving (VideoSelectorColorSpaceSettings
-> VideoSelectorColorSpaceSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VideoSelectorColorSpaceSettings
-> VideoSelectorColorSpaceSettings -> Bool
$c/= :: VideoSelectorColorSpaceSettings
-> VideoSelectorColorSpaceSettings -> Bool
== :: VideoSelectorColorSpaceSettings
-> VideoSelectorColorSpaceSettings -> Bool
$c== :: VideoSelectorColorSpaceSettings
-> VideoSelectorColorSpaceSettings -> Bool
Prelude.Eq, ReadPrec [VideoSelectorColorSpaceSettings]
ReadPrec VideoSelectorColorSpaceSettings
Int -> ReadS VideoSelectorColorSpaceSettings
ReadS [VideoSelectorColorSpaceSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VideoSelectorColorSpaceSettings]
$creadListPrec :: ReadPrec [VideoSelectorColorSpaceSettings]
readPrec :: ReadPrec VideoSelectorColorSpaceSettings
$creadPrec :: ReadPrec VideoSelectorColorSpaceSettings
readList :: ReadS [VideoSelectorColorSpaceSettings]
$creadList :: ReadS [VideoSelectorColorSpaceSettings]
readsPrec :: Int -> ReadS VideoSelectorColorSpaceSettings
$creadsPrec :: Int -> ReadS VideoSelectorColorSpaceSettings
Prelude.Read, Int -> VideoSelectorColorSpaceSettings -> ShowS
[VideoSelectorColorSpaceSettings] -> ShowS
VideoSelectorColorSpaceSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VideoSelectorColorSpaceSettings] -> ShowS
$cshowList :: [VideoSelectorColorSpaceSettings] -> ShowS
show :: VideoSelectorColorSpaceSettings -> String
$cshow :: VideoSelectorColorSpaceSettings -> String
showsPrec :: Int -> VideoSelectorColorSpaceSettings -> ShowS
$cshowsPrec :: Int -> VideoSelectorColorSpaceSettings -> ShowS
Prelude.Show, forall x.
Rep VideoSelectorColorSpaceSettings x
-> VideoSelectorColorSpaceSettings
forall x.
VideoSelectorColorSpaceSettings
-> Rep VideoSelectorColorSpaceSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VideoSelectorColorSpaceSettings x
-> VideoSelectorColorSpaceSettings
$cfrom :: forall x.
VideoSelectorColorSpaceSettings
-> Rep VideoSelectorColorSpaceSettings x
Prelude.Generic)

-- |
-- Create a value of 'VideoSelectorColorSpaceSettings' 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:
--
-- 'hdr10Settings', 'videoSelectorColorSpaceSettings_hdr10Settings' - Undocumented member.
newVideoSelectorColorSpaceSettings ::
  VideoSelectorColorSpaceSettings
newVideoSelectorColorSpaceSettings :: VideoSelectorColorSpaceSettings
newVideoSelectorColorSpaceSettings =
  VideoSelectorColorSpaceSettings'
    { $sel:hdr10Settings:VideoSelectorColorSpaceSettings' :: Maybe Hdr10Settings
hdr10Settings =
        forall a. Maybe a
Prelude.Nothing
    }

-- | Undocumented member.
videoSelectorColorSpaceSettings_hdr10Settings :: Lens.Lens' VideoSelectorColorSpaceSettings (Prelude.Maybe Hdr10Settings)
videoSelectorColorSpaceSettings_hdr10Settings :: Lens' VideoSelectorColorSpaceSettings (Maybe Hdr10Settings)
videoSelectorColorSpaceSettings_hdr10Settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelectorColorSpaceSettings' {Maybe Hdr10Settings
hdr10Settings :: Maybe Hdr10Settings
$sel:hdr10Settings:VideoSelectorColorSpaceSettings' :: VideoSelectorColorSpaceSettings -> Maybe Hdr10Settings
hdr10Settings} -> Maybe Hdr10Settings
hdr10Settings) (\s :: VideoSelectorColorSpaceSettings
s@VideoSelectorColorSpaceSettings' {} Maybe Hdr10Settings
a -> VideoSelectorColorSpaceSettings
s {$sel:hdr10Settings:VideoSelectorColorSpaceSettings' :: Maybe Hdr10Settings
hdr10Settings = Maybe Hdr10Settings
a} :: VideoSelectorColorSpaceSettings)

instance
  Data.FromJSON
    VideoSelectorColorSpaceSettings
  where
  parseJSON :: Value -> Parser VideoSelectorColorSpaceSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"VideoSelectorColorSpaceSettings"
      ( \Object
x ->
          Maybe Hdr10Settings -> VideoSelectorColorSpaceSettings
VideoSelectorColorSpaceSettings'
            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
"hdr10Settings")
      )

instance
  Prelude.Hashable
    VideoSelectorColorSpaceSettings
  where
  hashWithSalt :: Int -> VideoSelectorColorSpaceSettings -> Int
hashWithSalt
    Int
_salt
    VideoSelectorColorSpaceSettings' {Maybe Hdr10Settings
hdr10Settings :: Maybe Hdr10Settings
$sel:hdr10Settings:VideoSelectorColorSpaceSettings' :: VideoSelectorColorSpaceSettings -> Maybe Hdr10Settings
..} =
      Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Hdr10Settings
hdr10Settings

instance
  Prelude.NFData
    VideoSelectorColorSpaceSettings
  where
  rnf :: VideoSelectorColorSpaceSettings -> ()
rnf VideoSelectorColorSpaceSettings' {Maybe Hdr10Settings
hdr10Settings :: Maybe Hdr10Settings
$sel:hdr10Settings:VideoSelectorColorSpaceSettings' :: VideoSelectorColorSpaceSettings -> Maybe Hdr10Settings
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Hdr10Settings
hdr10Settings

instance Data.ToJSON VideoSelectorColorSpaceSettings where
  toJSON :: VideoSelectorColorSpaceSettings -> Value
toJSON VideoSelectorColorSpaceSettings' {Maybe Hdr10Settings
hdr10Settings :: Maybe Hdr10Settings
$sel:hdr10Settings:VideoSelectorColorSpaceSettings' :: VideoSelectorColorSpaceSettings -> Maybe Hdr10Settings
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"hdr10Settings" 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 Hdr10Settings
hdr10Settings
          ]
      )