{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.MediaLive.Types.VideoSelector where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.VideoSelectorColorSpace
import Amazonka.MediaLive.Types.VideoSelectorColorSpaceSettings
import Amazonka.MediaLive.Types.VideoSelectorColorSpaceUsage
import Amazonka.MediaLive.Types.VideoSelectorSettings
import qualified Amazonka.Prelude as Prelude
data VideoSelector = VideoSelector'
{
VideoSelector -> Maybe VideoSelectorSettings
selectorSettings :: Prelude.Maybe VideoSelectorSettings,
VideoSelector -> Maybe VideoSelectorColorSpaceUsage
colorSpaceUsage :: Prelude.Maybe VideoSelectorColorSpaceUsage,
VideoSelector -> Maybe VideoSelectorColorSpaceSettings
colorSpaceSettings :: Prelude.Maybe VideoSelectorColorSpaceSettings,
VideoSelector -> Maybe VideoSelectorColorSpace
colorSpace :: Prelude.Maybe VideoSelectorColorSpace
}
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)
newVideoSelector ::
VideoSelector
newVideoSelector :: VideoSelector
newVideoSelector =
VideoSelector' :: Maybe VideoSelectorSettings
-> Maybe VideoSelectorColorSpaceUsage
-> Maybe VideoSelectorColorSpaceSettings
-> Maybe VideoSelectorColorSpace
-> VideoSelector
VideoSelector'
{ $sel:selectorSettings:VideoSelector' :: Maybe VideoSelectorSettings
selectorSettings = Maybe VideoSelectorSettings
forall a. Maybe a
Prelude.Nothing,
$sel:colorSpaceUsage:VideoSelector' :: Maybe VideoSelectorColorSpaceUsage
colorSpaceUsage = Maybe VideoSelectorColorSpaceUsage
forall a. Maybe a
Prelude.Nothing,
$sel:colorSpaceSettings:VideoSelector' :: Maybe VideoSelectorColorSpaceSettings
colorSpaceSettings = Maybe VideoSelectorColorSpaceSettings
forall a. Maybe a
Prelude.Nothing,
$sel:colorSpace:VideoSelector' :: Maybe VideoSelectorColorSpace
colorSpace = Maybe VideoSelectorColorSpace
forall a. Maybe a
Prelude.Nothing
}
videoSelector_selectorSettings :: Lens.Lens' VideoSelector (Prelude.Maybe VideoSelectorSettings)
videoSelector_selectorSettings :: (Maybe VideoSelectorSettings -> f (Maybe VideoSelectorSettings))
-> VideoSelector -> f VideoSelector
videoSelector_selectorSettings = (VideoSelector -> Maybe VideoSelectorSettings)
-> (VideoSelector -> Maybe VideoSelectorSettings -> VideoSelector)
-> Lens
VideoSelector
VideoSelector
(Maybe VideoSelectorSettings)
(Maybe VideoSelectorSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe VideoSelectorSettings
selectorSettings :: Maybe VideoSelectorSettings
$sel:selectorSettings:VideoSelector' :: VideoSelector -> Maybe VideoSelectorSettings
selectorSettings} -> Maybe VideoSelectorSettings
selectorSettings) (\s :: VideoSelector
s@VideoSelector' {} Maybe VideoSelectorSettings
a -> VideoSelector
s {$sel:selectorSettings:VideoSelector' :: Maybe VideoSelectorSettings
selectorSettings = Maybe VideoSelectorSettings
a} :: VideoSelector)
videoSelector_colorSpaceUsage :: Lens.Lens' VideoSelector (Prelude.Maybe VideoSelectorColorSpaceUsage)
videoSelector_colorSpaceUsage :: (Maybe VideoSelectorColorSpaceUsage
-> f (Maybe VideoSelectorColorSpaceUsage))
-> VideoSelector -> f VideoSelector
videoSelector_colorSpaceUsage = (VideoSelector -> Maybe VideoSelectorColorSpaceUsage)
-> (VideoSelector
-> Maybe VideoSelectorColorSpaceUsage -> VideoSelector)
-> Lens
VideoSelector
VideoSelector
(Maybe VideoSelectorColorSpaceUsage)
(Maybe VideoSelectorColorSpaceUsage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe VideoSelectorColorSpaceUsage
colorSpaceUsage :: Maybe VideoSelectorColorSpaceUsage
$sel:colorSpaceUsage:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpaceUsage
colorSpaceUsage} -> Maybe VideoSelectorColorSpaceUsage
colorSpaceUsage) (\s :: VideoSelector
s@VideoSelector' {} Maybe VideoSelectorColorSpaceUsage
a -> VideoSelector
s {$sel:colorSpaceUsage:VideoSelector' :: Maybe VideoSelectorColorSpaceUsage
colorSpaceUsage = Maybe VideoSelectorColorSpaceUsage
a} :: VideoSelector)
videoSelector_colorSpaceSettings :: Lens.Lens' VideoSelector (Prelude.Maybe VideoSelectorColorSpaceSettings)
videoSelector_colorSpaceSettings :: (Maybe VideoSelectorColorSpaceSettings
-> f (Maybe VideoSelectorColorSpaceSettings))
-> VideoSelector -> f VideoSelector
videoSelector_colorSpaceSettings = (VideoSelector -> Maybe VideoSelectorColorSpaceSettings)
-> (VideoSelector
-> Maybe VideoSelectorColorSpaceSettings -> VideoSelector)
-> Lens
VideoSelector
VideoSelector
(Maybe VideoSelectorColorSpaceSettings)
(Maybe VideoSelectorColorSpaceSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe VideoSelectorColorSpaceSettings
colorSpaceSettings :: Maybe VideoSelectorColorSpaceSettings
$sel:colorSpaceSettings:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpaceSettings
colorSpaceSettings} -> Maybe VideoSelectorColorSpaceSettings
colorSpaceSettings) (\s :: VideoSelector
s@VideoSelector' {} Maybe VideoSelectorColorSpaceSettings
a -> VideoSelector
s {$sel:colorSpaceSettings:VideoSelector' :: Maybe VideoSelectorColorSpaceSettings
colorSpaceSettings = Maybe VideoSelectorColorSpaceSettings
a} :: VideoSelector)
videoSelector_colorSpace :: Lens.Lens' VideoSelector (Prelude.Maybe VideoSelectorColorSpace)
videoSelector_colorSpace :: (Maybe VideoSelectorColorSpace
-> f (Maybe VideoSelectorColorSpace))
-> VideoSelector -> f VideoSelector
videoSelector_colorSpace = (VideoSelector -> Maybe VideoSelectorColorSpace)
-> (VideoSelector
-> Maybe VideoSelectorColorSpace -> VideoSelector)
-> Lens
VideoSelector
VideoSelector
(Maybe VideoSelectorColorSpace)
(Maybe VideoSelectorColorSpace)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe VideoSelectorColorSpace
colorSpace :: Maybe VideoSelectorColorSpace
$sel:colorSpace:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpace
colorSpace} -> Maybe VideoSelectorColorSpace
colorSpace) (\s :: VideoSelector
s@VideoSelector' {} Maybe VideoSelectorColorSpace
a -> VideoSelector
s {$sel:colorSpace:VideoSelector' :: Maybe VideoSelectorColorSpace
colorSpace = Maybe VideoSelectorColorSpace
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 VideoSelectorSettings
-> Maybe VideoSelectorColorSpaceUsage
-> Maybe VideoSelectorColorSpaceSettings
-> Maybe VideoSelectorColorSpace
-> VideoSelector
VideoSelector'
(Maybe VideoSelectorSettings
-> Maybe VideoSelectorColorSpaceUsage
-> Maybe VideoSelectorColorSpaceSettings
-> Maybe VideoSelectorColorSpace
-> VideoSelector)
-> Parser (Maybe VideoSelectorSettings)
-> Parser
(Maybe VideoSelectorColorSpaceUsage
-> Maybe VideoSelectorColorSpaceSettings
-> Maybe VideoSelectorColorSpace
-> VideoSelector)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe VideoSelectorSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"selectorSettings")
Parser
(Maybe VideoSelectorColorSpaceUsage
-> Maybe VideoSelectorColorSpaceSettings
-> Maybe VideoSelectorColorSpace
-> VideoSelector)
-> Parser (Maybe VideoSelectorColorSpaceUsage)
-> Parser
(Maybe VideoSelectorColorSpaceSettings
-> Maybe VideoSelectorColorSpace -> VideoSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VideoSelectorColorSpaceUsage)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"colorSpaceUsage")
Parser
(Maybe VideoSelectorColorSpaceSettings
-> Maybe VideoSelectorColorSpace -> VideoSelector)
-> Parser (Maybe VideoSelectorColorSpaceSettings)
-> Parser (Maybe VideoSelectorColorSpace -> VideoSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VideoSelectorColorSpaceSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"colorSpaceSettings")
Parser (Maybe VideoSelectorColorSpace -> VideoSelector)
-> Parser (Maybe VideoSelectorColorSpace) -> Parser VideoSelector
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VideoSelectorColorSpace)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"colorSpace")
)
instance Prelude.Hashable VideoSelector
instance Prelude.NFData VideoSelector
instance Core.ToJSON VideoSelector where
toJSON :: VideoSelector -> Value
toJSON VideoSelector' {Maybe VideoSelectorColorSpace
Maybe VideoSelectorColorSpaceSettings
Maybe VideoSelectorColorSpaceUsage
Maybe VideoSelectorSettings
colorSpace :: Maybe VideoSelectorColorSpace
colorSpaceSettings :: Maybe VideoSelectorColorSpaceSettings
colorSpaceUsage :: Maybe VideoSelectorColorSpaceUsage
selectorSettings :: Maybe VideoSelectorSettings
$sel:colorSpace:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpace
$sel:colorSpaceSettings:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpaceSettings
$sel:colorSpaceUsage:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpaceUsage
$sel:selectorSettings:VideoSelector' :: VideoSelector -> Maybe VideoSelectorSettings
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"selectorSettings" Text -> VideoSelectorSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(VideoSelectorSettings -> Pair)
-> Maybe VideoSelectorSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VideoSelectorSettings
selectorSettings,
(Text
"colorSpaceUsage" Text -> VideoSelectorColorSpaceUsage -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(VideoSelectorColorSpaceUsage -> Pair)
-> Maybe VideoSelectorColorSpaceUsage -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VideoSelectorColorSpaceUsage
colorSpaceUsage,
(Text
"colorSpaceSettings" Text -> VideoSelectorColorSpaceSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(VideoSelectorColorSpaceSettings -> Pair)
-> Maybe VideoSelectorColorSpaceSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VideoSelectorColorSpaceSettings
colorSpaceSettings,
(Text
"colorSpace" Text -> VideoSelectorColorSpace -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (VideoSelectorColorSpace -> Pair)
-> Maybe VideoSelectorColorSpace -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VideoSelectorColorSpace
colorSpace
]
)