{-# 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.MediaConvert.Types.NexGuardFileMarkerSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.WatermarkingStrength
import qualified Amazonka.Prelude as Prelude
data NexGuardFileMarkerSettings = NexGuardFileMarkerSettings'
{
NexGuardFileMarkerSettings -> Maybe WatermarkingStrength
strength :: Prelude.Maybe WatermarkingStrength,
NexGuardFileMarkerSettings -> Maybe Natural
payload :: Prelude.Maybe Prelude.Natural,
NexGuardFileMarkerSettings -> Maybe Text
preset :: Prelude.Maybe Prelude.Text,
NexGuardFileMarkerSettings -> Maybe Text
license :: Prelude.Maybe Prelude.Text
}
deriving (NexGuardFileMarkerSettings -> NexGuardFileMarkerSettings -> Bool
(NexGuardFileMarkerSettings -> NexGuardFileMarkerSettings -> Bool)
-> (NexGuardFileMarkerSettings
-> NexGuardFileMarkerSettings -> Bool)
-> Eq NexGuardFileMarkerSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NexGuardFileMarkerSettings -> NexGuardFileMarkerSettings -> Bool
$c/= :: NexGuardFileMarkerSettings -> NexGuardFileMarkerSettings -> Bool
== :: NexGuardFileMarkerSettings -> NexGuardFileMarkerSettings -> Bool
$c== :: NexGuardFileMarkerSettings -> NexGuardFileMarkerSettings -> Bool
Prelude.Eq, ReadPrec [NexGuardFileMarkerSettings]
ReadPrec NexGuardFileMarkerSettings
Int -> ReadS NexGuardFileMarkerSettings
ReadS [NexGuardFileMarkerSettings]
(Int -> ReadS NexGuardFileMarkerSettings)
-> ReadS [NexGuardFileMarkerSettings]
-> ReadPrec NexGuardFileMarkerSettings
-> ReadPrec [NexGuardFileMarkerSettings]
-> Read NexGuardFileMarkerSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NexGuardFileMarkerSettings]
$creadListPrec :: ReadPrec [NexGuardFileMarkerSettings]
readPrec :: ReadPrec NexGuardFileMarkerSettings
$creadPrec :: ReadPrec NexGuardFileMarkerSettings
readList :: ReadS [NexGuardFileMarkerSettings]
$creadList :: ReadS [NexGuardFileMarkerSettings]
readsPrec :: Int -> ReadS NexGuardFileMarkerSettings
$creadsPrec :: Int -> ReadS NexGuardFileMarkerSettings
Prelude.Read, Int -> NexGuardFileMarkerSettings -> ShowS
[NexGuardFileMarkerSettings] -> ShowS
NexGuardFileMarkerSettings -> String
(Int -> NexGuardFileMarkerSettings -> ShowS)
-> (NexGuardFileMarkerSettings -> String)
-> ([NexGuardFileMarkerSettings] -> ShowS)
-> Show NexGuardFileMarkerSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NexGuardFileMarkerSettings] -> ShowS
$cshowList :: [NexGuardFileMarkerSettings] -> ShowS
show :: NexGuardFileMarkerSettings -> String
$cshow :: NexGuardFileMarkerSettings -> String
showsPrec :: Int -> NexGuardFileMarkerSettings -> ShowS
$cshowsPrec :: Int -> NexGuardFileMarkerSettings -> ShowS
Prelude.Show, (forall x.
NexGuardFileMarkerSettings -> Rep NexGuardFileMarkerSettings x)
-> (forall x.
Rep NexGuardFileMarkerSettings x -> NexGuardFileMarkerSettings)
-> Generic NexGuardFileMarkerSettings
forall x.
Rep NexGuardFileMarkerSettings x -> NexGuardFileMarkerSettings
forall x.
NexGuardFileMarkerSettings -> Rep NexGuardFileMarkerSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NexGuardFileMarkerSettings x -> NexGuardFileMarkerSettings
$cfrom :: forall x.
NexGuardFileMarkerSettings -> Rep NexGuardFileMarkerSettings x
Prelude.Generic)
newNexGuardFileMarkerSettings ::
NexGuardFileMarkerSettings
newNexGuardFileMarkerSettings :: NexGuardFileMarkerSettings
newNexGuardFileMarkerSettings =
NexGuardFileMarkerSettings' :: Maybe WatermarkingStrength
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> NexGuardFileMarkerSettings
NexGuardFileMarkerSettings'
{ $sel:strength:NexGuardFileMarkerSettings' :: Maybe WatermarkingStrength
strength =
Maybe WatermarkingStrength
forall a. Maybe a
Prelude.Nothing,
$sel:payload:NexGuardFileMarkerSettings' :: Maybe Natural
payload = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:preset:NexGuardFileMarkerSettings' :: Maybe Text
preset = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:license:NexGuardFileMarkerSettings' :: Maybe Text
license = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
nexGuardFileMarkerSettings_strength :: Lens.Lens' NexGuardFileMarkerSettings (Prelude.Maybe WatermarkingStrength)
nexGuardFileMarkerSettings_strength :: (Maybe WatermarkingStrength -> f (Maybe WatermarkingStrength))
-> NexGuardFileMarkerSettings -> f NexGuardFileMarkerSettings
nexGuardFileMarkerSettings_strength = (NexGuardFileMarkerSettings -> Maybe WatermarkingStrength)
-> (NexGuardFileMarkerSettings
-> Maybe WatermarkingStrength -> NexGuardFileMarkerSettings)
-> Lens
NexGuardFileMarkerSettings
NexGuardFileMarkerSettings
(Maybe WatermarkingStrength)
(Maybe WatermarkingStrength)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NexGuardFileMarkerSettings' {Maybe WatermarkingStrength
strength :: Maybe WatermarkingStrength
$sel:strength:NexGuardFileMarkerSettings' :: NexGuardFileMarkerSettings -> Maybe WatermarkingStrength
strength} -> Maybe WatermarkingStrength
strength) (\s :: NexGuardFileMarkerSettings
s@NexGuardFileMarkerSettings' {} Maybe WatermarkingStrength
a -> NexGuardFileMarkerSettings
s {$sel:strength:NexGuardFileMarkerSettings' :: Maybe WatermarkingStrength
strength = Maybe WatermarkingStrength
a} :: NexGuardFileMarkerSettings)
nexGuardFileMarkerSettings_payload :: Lens.Lens' NexGuardFileMarkerSettings (Prelude.Maybe Prelude.Natural)
nexGuardFileMarkerSettings_payload :: (Maybe Natural -> f (Maybe Natural))
-> NexGuardFileMarkerSettings -> f NexGuardFileMarkerSettings
nexGuardFileMarkerSettings_payload = (NexGuardFileMarkerSettings -> Maybe Natural)
-> (NexGuardFileMarkerSettings
-> Maybe Natural -> NexGuardFileMarkerSettings)
-> Lens
NexGuardFileMarkerSettings
NexGuardFileMarkerSettings
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NexGuardFileMarkerSettings' {Maybe Natural
payload :: Maybe Natural
$sel:payload:NexGuardFileMarkerSettings' :: NexGuardFileMarkerSettings -> Maybe Natural
payload} -> Maybe Natural
payload) (\s :: NexGuardFileMarkerSettings
s@NexGuardFileMarkerSettings' {} Maybe Natural
a -> NexGuardFileMarkerSettings
s {$sel:payload:NexGuardFileMarkerSettings' :: Maybe Natural
payload = Maybe Natural
a} :: NexGuardFileMarkerSettings)
nexGuardFileMarkerSettings_preset :: Lens.Lens' NexGuardFileMarkerSettings (Prelude.Maybe Prelude.Text)
nexGuardFileMarkerSettings_preset :: (Maybe Text -> f (Maybe Text))
-> NexGuardFileMarkerSettings -> f NexGuardFileMarkerSettings
nexGuardFileMarkerSettings_preset = (NexGuardFileMarkerSettings -> Maybe Text)
-> (NexGuardFileMarkerSettings
-> Maybe Text -> NexGuardFileMarkerSettings)
-> Lens
NexGuardFileMarkerSettings
NexGuardFileMarkerSettings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NexGuardFileMarkerSettings' {Maybe Text
preset :: Maybe Text
$sel:preset:NexGuardFileMarkerSettings' :: NexGuardFileMarkerSettings -> Maybe Text
preset} -> Maybe Text
preset) (\s :: NexGuardFileMarkerSettings
s@NexGuardFileMarkerSettings' {} Maybe Text
a -> NexGuardFileMarkerSettings
s {$sel:preset:NexGuardFileMarkerSettings' :: Maybe Text
preset = Maybe Text
a} :: NexGuardFileMarkerSettings)
nexGuardFileMarkerSettings_license :: Lens.Lens' NexGuardFileMarkerSettings (Prelude.Maybe Prelude.Text)
nexGuardFileMarkerSettings_license :: (Maybe Text -> f (Maybe Text))
-> NexGuardFileMarkerSettings -> f NexGuardFileMarkerSettings
nexGuardFileMarkerSettings_license = (NexGuardFileMarkerSettings -> Maybe Text)
-> (NexGuardFileMarkerSettings
-> Maybe Text -> NexGuardFileMarkerSettings)
-> Lens
NexGuardFileMarkerSettings
NexGuardFileMarkerSettings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NexGuardFileMarkerSettings' {Maybe Text
license :: Maybe Text
$sel:license:NexGuardFileMarkerSettings' :: NexGuardFileMarkerSettings -> Maybe Text
license} -> Maybe Text
license) (\s :: NexGuardFileMarkerSettings
s@NexGuardFileMarkerSettings' {} Maybe Text
a -> NexGuardFileMarkerSettings
s {$sel:license:NexGuardFileMarkerSettings' :: Maybe Text
license = Maybe Text
a} :: NexGuardFileMarkerSettings)
instance Core.FromJSON NexGuardFileMarkerSettings where
parseJSON :: Value -> Parser NexGuardFileMarkerSettings
parseJSON =
String
-> (Object -> Parser NexGuardFileMarkerSettings)
-> Value
-> Parser NexGuardFileMarkerSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NexGuardFileMarkerSettings"
( \Object
x ->
Maybe WatermarkingStrength
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> NexGuardFileMarkerSettings
NexGuardFileMarkerSettings'
(Maybe WatermarkingStrength
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> NexGuardFileMarkerSettings)
-> Parser (Maybe WatermarkingStrength)
-> Parser
(Maybe Natural
-> Maybe Text -> Maybe Text -> NexGuardFileMarkerSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe WatermarkingStrength)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"strength")
Parser
(Maybe Natural
-> Maybe Text -> Maybe Text -> NexGuardFileMarkerSettings)
-> Parser (Maybe Natural)
-> Parser (Maybe Text -> Maybe Text -> NexGuardFileMarkerSettings)
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
"payload")
Parser (Maybe Text -> Maybe Text -> NexGuardFileMarkerSettings)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> NexGuardFileMarkerSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"preset")
Parser (Maybe Text -> NexGuardFileMarkerSettings)
-> Parser (Maybe Text) -> Parser NexGuardFileMarkerSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"license")
)
instance Prelude.Hashable NexGuardFileMarkerSettings
instance Prelude.NFData NexGuardFileMarkerSettings
instance Core.ToJSON NexGuardFileMarkerSettings where
toJSON :: NexGuardFileMarkerSettings -> Value
toJSON NexGuardFileMarkerSettings' {Maybe Natural
Maybe Text
Maybe WatermarkingStrength
license :: Maybe Text
preset :: Maybe Text
payload :: Maybe Natural
strength :: Maybe WatermarkingStrength
$sel:license:NexGuardFileMarkerSettings' :: NexGuardFileMarkerSettings -> Maybe Text
$sel:preset:NexGuardFileMarkerSettings' :: NexGuardFileMarkerSettings -> Maybe Text
$sel:payload:NexGuardFileMarkerSettings' :: NexGuardFileMarkerSettings -> Maybe Natural
$sel:strength:NexGuardFileMarkerSettings' :: NexGuardFileMarkerSettings -> Maybe WatermarkingStrength
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"strength" Text -> WatermarkingStrength -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (WatermarkingStrength -> Pair)
-> Maybe WatermarkingStrength -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WatermarkingStrength
strength,
(Text
"payload" 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
payload,
(Text
"preset" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
preset,
(Text
"license" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
license
]
)