{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 VideoSelectorColorSpace
colorSpace :: Prelude.Maybe VideoSelectorColorSpace,
VideoSelector -> Maybe VideoSelectorColorSpaceSettings
colorSpaceSettings :: Prelude.Maybe VideoSelectorColorSpaceSettings,
VideoSelector -> Maybe VideoSelectorColorSpaceUsage
colorSpaceUsage :: Prelude.Maybe VideoSelectorColorSpaceUsage,
VideoSelector -> Maybe VideoSelectorSettings
selectorSettings :: Prelude.Maybe VideoSelectorSettings
}
deriving (VideoSelector -> VideoSelector -> Bool
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]
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
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. 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'
{ $sel:colorSpace:VideoSelector' :: Maybe VideoSelectorColorSpace
colorSpace = forall a. Maybe a
Prelude.Nothing,
$sel:colorSpaceSettings:VideoSelector' :: Maybe VideoSelectorColorSpaceSettings
colorSpaceSettings = forall a. Maybe a
Prelude.Nothing,
$sel:colorSpaceUsage:VideoSelector' :: Maybe VideoSelectorColorSpaceUsage
colorSpaceUsage = forall a. Maybe a
Prelude.Nothing,
$sel:selectorSettings:VideoSelector' :: Maybe VideoSelectorSettings
selectorSettings = forall a. Maybe a
Prelude.Nothing
}
videoSelector_colorSpace :: Lens.Lens' VideoSelector (Prelude.Maybe VideoSelectorColorSpace)
videoSelector_colorSpace :: Lens' VideoSelector (Maybe VideoSelectorColorSpace)
videoSelector_colorSpace = 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)
videoSelector_colorSpaceSettings :: Lens.Lens' VideoSelector (Prelude.Maybe VideoSelectorColorSpaceSettings)
videoSelector_colorSpaceSettings :: Lens' VideoSelector (Maybe VideoSelectorColorSpaceSettings)
videoSelector_colorSpaceSettings = 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_colorSpaceUsage :: Lens.Lens' VideoSelector (Prelude.Maybe VideoSelectorColorSpaceUsage)
videoSelector_colorSpaceUsage :: Lens' VideoSelector (Maybe VideoSelectorColorSpaceUsage)
videoSelector_colorSpaceUsage = 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_selectorSettings :: Lens.Lens' VideoSelector (Prelude.Maybe VideoSelectorSettings)
videoSelector_selectorSettings :: Lens' VideoSelector (Maybe VideoSelectorSettings)
videoSelector_selectorSettings = 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)
instance Data.FromJSON VideoSelector where
parseJSON :: Value -> Parser VideoSelector
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VideoSelector"
( \Object
x ->
Maybe VideoSelectorColorSpace
-> Maybe VideoSelectorColorSpaceSettings
-> Maybe VideoSelectorColorSpaceUsage
-> Maybe VideoSelectorSettings
-> VideoSelector
VideoSelector'
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
"colorSpace")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"colorSpaceSettings")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"colorSpaceUsage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"selectorSettings")
)
instance Prelude.Hashable VideoSelector where
hashWithSalt :: Int -> VideoSelector -> Int
hashWithSalt Int
_salt VideoSelector' {Maybe VideoSelectorColorSpace
Maybe VideoSelectorColorSpaceSettings
Maybe VideoSelectorColorSpaceUsage
Maybe VideoSelectorSettings
selectorSettings :: Maybe VideoSelectorSettings
colorSpaceUsage :: Maybe VideoSelectorColorSpaceUsage
colorSpaceSettings :: Maybe VideoSelectorColorSpaceSettings
colorSpace :: Maybe VideoSelectorColorSpace
$sel:selectorSettings:VideoSelector' :: VideoSelector -> Maybe VideoSelectorSettings
$sel:colorSpaceUsage:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpaceUsage
$sel:colorSpaceSettings:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpaceSettings
$sel:colorSpace:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpace
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VideoSelectorColorSpace
colorSpace
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VideoSelectorColorSpaceSettings
colorSpaceSettings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VideoSelectorColorSpaceUsage
colorSpaceUsage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VideoSelectorSettings
selectorSettings
instance Prelude.NFData VideoSelector where
rnf :: VideoSelector -> ()
rnf VideoSelector' {Maybe VideoSelectorColorSpace
Maybe VideoSelectorColorSpaceSettings
Maybe VideoSelectorColorSpaceUsage
Maybe VideoSelectorSettings
selectorSettings :: Maybe VideoSelectorSettings
colorSpaceUsage :: Maybe VideoSelectorColorSpaceUsage
colorSpaceSettings :: Maybe VideoSelectorColorSpaceSettings
colorSpace :: Maybe VideoSelectorColorSpace
$sel:selectorSettings:VideoSelector' :: VideoSelector -> Maybe VideoSelectorSettings
$sel:colorSpaceUsage:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpaceUsage
$sel:colorSpaceSettings:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpaceSettings
$sel:colorSpace:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpace
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe VideoSelectorColorSpace
colorSpace
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VideoSelectorColorSpaceSettings
colorSpaceSettings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VideoSelectorColorSpaceUsage
colorSpaceUsage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VideoSelectorSettings
selectorSettings
instance Data.ToJSON VideoSelector where
toJSON :: VideoSelector -> Value
toJSON VideoSelector' {Maybe VideoSelectorColorSpace
Maybe VideoSelectorColorSpaceSettings
Maybe VideoSelectorColorSpaceUsage
Maybe VideoSelectorSettings
selectorSettings :: Maybe VideoSelectorSettings
colorSpaceUsage :: Maybe VideoSelectorColorSpaceUsage
colorSpaceSettings :: Maybe VideoSelectorColorSpaceSettings
colorSpace :: Maybe VideoSelectorColorSpace
$sel:selectorSettings:VideoSelector' :: VideoSelector -> Maybe VideoSelectorSettings
$sel:colorSpaceUsage:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpaceUsage
$sel:colorSpaceSettings:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpaceSettings
$sel:colorSpace:VideoSelector' :: VideoSelector -> Maybe VideoSelectorColorSpace
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"colorSpace" 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 VideoSelectorColorSpace
colorSpace,
(Key
"colorSpaceSettings" 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 VideoSelectorColorSpaceSettings
colorSpaceSettings,
(Key
"colorSpaceUsage" 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 VideoSelectorColorSpaceUsage
colorSpaceUsage,
(Key
"selectorSettings" 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 VideoSelectorSettings
selectorSettings
]
)