{-# 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.NielsenWatermarksSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.NielsenCBET
import Amazonka.MediaLive.Types.NielsenNaesIiNw
import Amazonka.MediaLive.Types.NielsenWatermarksDistributionTypes
import qualified Amazonka.Prelude as Prelude
data NielsenWatermarksSettings = NielsenWatermarksSettings'
{
NielsenWatermarksSettings -> Maybe NielsenCBET
nielsenCbetSettings :: Prelude.Maybe NielsenCBET,
NielsenWatermarksSettings -> Maybe NielsenNaesIiNw
nielsenNaesIiNwSettings :: Prelude.Maybe NielsenNaesIiNw,
NielsenWatermarksSettings
-> Maybe NielsenWatermarksDistributionTypes
nielsenDistributionType :: Prelude.Maybe NielsenWatermarksDistributionTypes
}
deriving (NielsenWatermarksSettings -> NielsenWatermarksSettings -> Bool
(NielsenWatermarksSettings -> NielsenWatermarksSettings -> Bool)
-> (NielsenWatermarksSettings -> NielsenWatermarksSettings -> Bool)
-> Eq NielsenWatermarksSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NielsenWatermarksSettings -> NielsenWatermarksSettings -> Bool
$c/= :: NielsenWatermarksSettings -> NielsenWatermarksSettings -> Bool
== :: NielsenWatermarksSettings -> NielsenWatermarksSettings -> Bool
$c== :: NielsenWatermarksSettings -> NielsenWatermarksSettings -> Bool
Prelude.Eq, ReadPrec [NielsenWatermarksSettings]
ReadPrec NielsenWatermarksSettings
Int -> ReadS NielsenWatermarksSettings
ReadS [NielsenWatermarksSettings]
(Int -> ReadS NielsenWatermarksSettings)
-> ReadS [NielsenWatermarksSettings]
-> ReadPrec NielsenWatermarksSettings
-> ReadPrec [NielsenWatermarksSettings]
-> Read NielsenWatermarksSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NielsenWatermarksSettings]
$creadListPrec :: ReadPrec [NielsenWatermarksSettings]
readPrec :: ReadPrec NielsenWatermarksSettings
$creadPrec :: ReadPrec NielsenWatermarksSettings
readList :: ReadS [NielsenWatermarksSettings]
$creadList :: ReadS [NielsenWatermarksSettings]
readsPrec :: Int -> ReadS NielsenWatermarksSettings
$creadsPrec :: Int -> ReadS NielsenWatermarksSettings
Prelude.Read, Int -> NielsenWatermarksSettings -> ShowS
[NielsenWatermarksSettings] -> ShowS
NielsenWatermarksSettings -> String
(Int -> NielsenWatermarksSettings -> ShowS)
-> (NielsenWatermarksSettings -> String)
-> ([NielsenWatermarksSettings] -> ShowS)
-> Show NielsenWatermarksSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NielsenWatermarksSettings] -> ShowS
$cshowList :: [NielsenWatermarksSettings] -> ShowS
show :: NielsenWatermarksSettings -> String
$cshow :: NielsenWatermarksSettings -> String
showsPrec :: Int -> NielsenWatermarksSettings -> ShowS
$cshowsPrec :: Int -> NielsenWatermarksSettings -> ShowS
Prelude.Show, (forall x.
NielsenWatermarksSettings -> Rep NielsenWatermarksSettings x)
-> (forall x.
Rep NielsenWatermarksSettings x -> NielsenWatermarksSettings)
-> Generic NielsenWatermarksSettings
forall x.
Rep NielsenWatermarksSettings x -> NielsenWatermarksSettings
forall x.
NielsenWatermarksSettings -> Rep NielsenWatermarksSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NielsenWatermarksSettings x -> NielsenWatermarksSettings
$cfrom :: forall x.
NielsenWatermarksSettings -> Rep NielsenWatermarksSettings x
Prelude.Generic)
newNielsenWatermarksSettings ::
NielsenWatermarksSettings
newNielsenWatermarksSettings :: NielsenWatermarksSettings
newNielsenWatermarksSettings =
NielsenWatermarksSettings' :: Maybe NielsenCBET
-> Maybe NielsenNaesIiNw
-> Maybe NielsenWatermarksDistributionTypes
-> NielsenWatermarksSettings
NielsenWatermarksSettings'
{ $sel:nielsenCbetSettings:NielsenWatermarksSettings' :: Maybe NielsenCBET
nielsenCbetSettings =
Maybe NielsenCBET
forall a. Maybe a
Prelude.Nothing,
$sel:nielsenNaesIiNwSettings:NielsenWatermarksSettings' :: Maybe NielsenNaesIiNw
nielsenNaesIiNwSettings = Maybe NielsenNaesIiNw
forall a. Maybe a
Prelude.Nothing,
$sel:nielsenDistributionType:NielsenWatermarksSettings' :: Maybe NielsenWatermarksDistributionTypes
nielsenDistributionType = Maybe NielsenWatermarksDistributionTypes
forall a. Maybe a
Prelude.Nothing
}
nielsenWatermarksSettings_nielsenCbetSettings :: Lens.Lens' NielsenWatermarksSettings (Prelude.Maybe NielsenCBET)
nielsenWatermarksSettings_nielsenCbetSettings :: (Maybe NielsenCBET -> f (Maybe NielsenCBET))
-> NielsenWatermarksSettings -> f NielsenWatermarksSettings
nielsenWatermarksSettings_nielsenCbetSettings = (NielsenWatermarksSettings -> Maybe NielsenCBET)
-> (NielsenWatermarksSettings
-> Maybe NielsenCBET -> NielsenWatermarksSettings)
-> Lens
NielsenWatermarksSettings
NielsenWatermarksSettings
(Maybe NielsenCBET)
(Maybe NielsenCBET)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NielsenWatermarksSettings' {Maybe NielsenCBET
nielsenCbetSettings :: Maybe NielsenCBET
$sel:nielsenCbetSettings:NielsenWatermarksSettings' :: NielsenWatermarksSettings -> Maybe NielsenCBET
nielsenCbetSettings} -> Maybe NielsenCBET
nielsenCbetSettings) (\s :: NielsenWatermarksSettings
s@NielsenWatermarksSettings' {} Maybe NielsenCBET
a -> NielsenWatermarksSettings
s {$sel:nielsenCbetSettings:NielsenWatermarksSettings' :: Maybe NielsenCBET
nielsenCbetSettings = Maybe NielsenCBET
a} :: NielsenWatermarksSettings)
nielsenWatermarksSettings_nielsenNaesIiNwSettings :: Lens.Lens' NielsenWatermarksSettings (Prelude.Maybe NielsenNaesIiNw)
nielsenWatermarksSettings_nielsenNaesIiNwSettings :: (Maybe NielsenNaesIiNw -> f (Maybe NielsenNaesIiNw))
-> NielsenWatermarksSettings -> f NielsenWatermarksSettings
nielsenWatermarksSettings_nielsenNaesIiNwSettings = (NielsenWatermarksSettings -> Maybe NielsenNaesIiNw)
-> (NielsenWatermarksSettings
-> Maybe NielsenNaesIiNw -> NielsenWatermarksSettings)
-> Lens
NielsenWatermarksSettings
NielsenWatermarksSettings
(Maybe NielsenNaesIiNw)
(Maybe NielsenNaesIiNw)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NielsenWatermarksSettings' {Maybe NielsenNaesIiNw
nielsenNaesIiNwSettings :: Maybe NielsenNaesIiNw
$sel:nielsenNaesIiNwSettings:NielsenWatermarksSettings' :: NielsenWatermarksSettings -> Maybe NielsenNaesIiNw
nielsenNaesIiNwSettings} -> Maybe NielsenNaesIiNw
nielsenNaesIiNwSettings) (\s :: NielsenWatermarksSettings
s@NielsenWatermarksSettings' {} Maybe NielsenNaesIiNw
a -> NielsenWatermarksSettings
s {$sel:nielsenNaesIiNwSettings:NielsenWatermarksSettings' :: Maybe NielsenNaesIiNw
nielsenNaesIiNwSettings = Maybe NielsenNaesIiNw
a} :: NielsenWatermarksSettings)
nielsenWatermarksSettings_nielsenDistributionType :: Lens.Lens' NielsenWatermarksSettings (Prelude.Maybe NielsenWatermarksDistributionTypes)
nielsenWatermarksSettings_nielsenDistributionType :: (Maybe NielsenWatermarksDistributionTypes
-> f (Maybe NielsenWatermarksDistributionTypes))
-> NielsenWatermarksSettings -> f NielsenWatermarksSettings
nielsenWatermarksSettings_nielsenDistributionType = (NielsenWatermarksSettings
-> Maybe NielsenWatermarksDistributionTypes)
-> (NielsenWatermarksSettings
-> Maybe NielsenWatermarksDistributionTypes
-> NielsenWatermarksSettings)
-> Lens
NielsenWatermarksSettings
NielsenWatermarksSettings
(Maybe NielsenWatermarksDistributionTypes)
(Maybe NielsenWatermarksDistributionTypes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NielsenWatermarksSettings' {Maybe NielsenWatermarksDistributionTypes
nielsenDistributionType :: Maybe NielsenWatermarksDistributionTypes
$sel:nielsenDistributionType:NielsenWatermarksSettings' :: NielsenWatermarksSettings
-> Maybe NielsenWatermarksDistributionTypes
nielsenDistributionType} -> Maybe NielsenWatermarksDistributionTypes
nielsenDistributionType) (\s :: NielsenWatermarksSettings
s@NielsenWatermarksSettings' {} Maybe NielsenWatermarksDistributionTypes
a -> NielsenWatermarksSettings
s {$sel:nielsenDistributionType:NielsenWatermarksSettings' :: Maybe NielsenWatermarksDistributionTypes
nielsenDistributionType = Maybe NielsenWatermarksDistributionTypes
a} :: NielsenWatermarksSettings)
instance Core.FromJSON NielsenWatermarksSettings where
parseJSON :: Value -> Parser NielsenWatermarksSettings
parseJSON =
String
-> (Object -> Parser NielsenWatermarksSettings)
-> Value
-> Parser NielsenWatermarksSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NielsenWatermarksSettings"
( \Object
x ->
Maybe NielsenCBET
-> Maybe NielsenNaesIiNw
-> Maybe NielsenWatermarksDistributionTypes
-> NielsenWatermarksSettings
NielsenWatermarksSettings'
(Maybe NielsenCBET
-> Maybe NielsenNaesIiNw
-> Maybe NielsenWatermarksDistributionTypes
-> NielsenWatermarksSettings)
-> Parser (Maybe NielsenCBET)
-> Parser
(Maybe NielsenNaesIiNw
-> Maybe NielsenWatermarksDistributionTypes
-> NielsenWatermarksSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe NielsenCBET)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"nielsenCbetSettings")
Parser
(Maybe NielsenNaesIiNw
-> Maybe NielsenWatermarksDistributionTypes
-> NielsenWatermarksSettings)
-> Parser (Maybe NielsenNaesIiNw)
-> Parser
(Maybe NielsenWatermarksDistributionTypes
-> NielsenWatermarksSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NielsenNaesIiNw)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"nielsenNaesIiNwSettings")
Parser
(Maybe NielsenWatermarksDistributionTypes
-> NielsenWatermarksSettings)
-> Parser (Maybe NielsenWatermarksDistributionTypes)
-> Parser NielsenWatermarksSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NielsenWatermarksDistributionTypes)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"nielsenDistributionType")
)
instance Prelude.Hashable NielsenWatermarksSettings
instance Prelude.NFData NielsenWatermarksSettings
instance Core.ToJSON NielsenWatermarksSettings where
toJSON :: NielsenWatermarksSettings -> Value
toJSON NielsenWatermarksSettings' {Maybe NielsenNaesIiNw
Maybe NielsenCBET
Maybe NielsenWatermarksDistributionTypes
nielsenDistributionType :: Maybe NielsenWatermarksDistributionTypes
nielsenNaesIiNwSettings :: Maybe NielsenNaesIiNw
nielsenCbetSettings :: Maybe NielsenCBET
$sel:nielsenDistributionType:NielsenWatermarksSettings' :: NielsenWatermarksSettings
-> Maybe NielsenWatermarksDistributionTypes
$sel:nielsenNaesIiNwSettings:NielsenWatermarksSettings' :: NielsenWatermarksSettings -> Maybe NielsenNaesIiNw
$sel:nielsenCbetSettings:NielsenWatermarksSettings' :: NielsenWatermarksSettings -> Maybe NielsenCBET
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"nielsenCbetSettings" Text -> NielsenCBET -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NielsenCBET -> Pair) -> Maybe NielsenCBET -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NielsenCBET
nielsenCbetSettings,
(Text
"nielsenNaesIiNwSettings" Text -> NielsenNaesIiNw -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NielsenNaesIiNw -> Pair) -> Maybe NielsenNaesIiNw -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NielsenNaesIiNw
nielsenNaesIiNwSettings,
(Text
"nielsenDistributionType" Text -> NielsenWatermarksDistributionTypes -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NielsenWatermarksDistributionTypes -> Pair)
-> Maybe NielsenWatermarksDistributionTypes -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NielsenWatermarksDistributionTypes
nielsenDistributionType
]
)