{-# 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.MediaConvert.Types.PartnerWatermarking
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.PartnerWatermarking where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.NexGuardFileMarkerSettings
import qualified Amazonka.Prelude as Prelude

-- | If you work with a third party video watermarking partner, use the group
-- of settings that correspond with your watermarking partner to include
-- watermarks in your output.
--
-- /See:/ 'newPartnerWatermarking' smart constructor.
data PartnerWatermarking = PartnerWatermarking'
  { -- | For forensic video watermarking, MediaConvert supports Nagra NexGuard
    -- File Marker watermarking. MediaConvert supports both PreRelease Content
    -- (NGPR\/G2) and OTT Streaming workflows.
    PartnerWatermarking -> Maybe NexGuardFileMarkerSettings
nexguardFileMarkerSettings :: Prelude.Maybe NexGuardFileMarkerSettings
  }
  deriving (PartnerWatermarking -> PartnerWatermarking -> Bool
(PartnerWatermarking -> PartnerWatermarking -> Bool)
-> (PartnerWatermarking -> PartnerWatermarking -> Bool)
-> Eq PartnerWatermarking
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PartnerWatermarking -> PartnerWatermarking -> Bool
$c/= :: PartnerWatermarking -> PartnerWatermarking -> Bool
== :: PartnerWatermarking -> PartnerWatermarking -> Bool
$c== :: PartnerWatermarking -> PartnerWatermarking -> Bool
Prelude.Eq, ReadPrec [PartnerWatermarking]
ReadPrec PartnerWatermarking
Int -> ReadS PartnerWatermarking
ReadS [PartnerWatermarking]
(Int -> ReadS PartnerWatermarking)
-> ReadS [PartnerWatermarking]
-> ReadPrec PartnerWatermarking
-> ReadPrec [PartnerWatermarking]
-> Read PartnerWatermarking
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PartnerWatermarking]
$creadListPrec :: ReadPrec [PartnerWatermarking]
readPrec :: ReadPrec PartnerWatermarking
$creadPrec :: ReadPrec PartnerWatermarking
readList :: ReadS [PartnerWatermarking]
$creadList :: ReadS [PartnerWatermarking]
readsPrec :: Int -> ReadS PartnerWatermarking
$creadsPrec :: Int -> ReadS PartnerWatermarking
Prelude.Read, Int -> PartnerWatermarking -> ShowS
[PartnerWatermarking] -> ShowS
PartnerWatermarking -> String
(Int -> PartnerWatermarking -> ShowS)
-> (PartnerWatermarking -> String)
-> ([PartnerWatermarking] -> ShowS)
-> Show PartnerWatermarking
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PartnerWatermarking] -> ShowS
$cshowList :: [PartnerWatermarking] -> ShowS
show :: PartnerWatermarking -> String
$cshow :: PartnerWatermarking -> String
showsPrec :: Int -> PartnerWatermarking -> ShowS
$cshowsPrec :: Int -> PartnerWatermarking -> ShowS
Prelude.Show, (forall x. PartnerWatermarking -> Rep PartnerWatermarking x)
-> (forall x. Rep PartnerWatermarking x -> PartnerWatermarking)
-> Generic PartnerWatermarking
forall x. Rep PartnerWatermarking x -> PartnerWatermarking
forall x. PartnerWatermarking -> Rep PartnerWatermarking x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PartnerWatermarking x -> PartnerWatermarking
$cfrom :: forall x. PartnerWatermarking -> Rep PartnerWatermarking x
Prelude.Generic)

-- |
-- Create a value of 'PartnerWatermarking' 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:
--
-- 'nexguardFileMarkerSettings', 'partnerWatermarking_nexguardFileMarkerSettings' - For forensic video watermarking, MediaConvert supports Nagra NexGuard
-- File Marker watermarking. MediaConvert supports both PreRelease Content
-- (NGPR\/G2) and OTT Streaming workflows.
newPartnerWatermarking ::
  PartnerWatermarking
newPartnerWatermarking :: PartnerWatermarking
newPartnerWatermarking =
  PartnerWatermarking' :: Maybe NexGuardFileMarkerSettings -> PartnerWatermarking
PartnerWatermarking'
    { $sel:nexguardFileMarkerSettings:PartnerWatermarking' :: Maybe NexGuardFileMarkerSettings
nexguardFileMarkerSettings =
        Maybe NexGuardFileMarkerSettings
forall a. Maybe a
Prelude.Nothing
    }

-- | For forensic video watermarking, MediaConvert supports Nagra NexGuard
-- File Marker watermarking. MediaConvert supports both PreRelease Content
-- (NGPR\/G2) and OTT Streaming workflows.
partnerWatermarking_nexguardFileMarkerSettings :: Lens.Lens' PartnerWatermarking (Prelude.Maybe NexGuardFileMarkerSettings)
partnerWatermarking_nexguardFileMarkerSettings :: (Maybe NexGuardFileMarkerSettings
 -> f (Maybe NexGuardFileMarkerSettings))
-> PartnerWatermarking -> f PartnerWatermarking
partnerWatermarking_nexguardFileMarkerSettings = (PartnerWatermarking -> Maybe NexGuardFileMarkerSettings)
-> (PartnerWatermarking
    -> Maybe NexGuardFileMarkerSettings -> PartnerWatermarking)
-> Lens
     PartnerWatermarking
     PartnerWatermarking
     (Maybe NexGuardFileMarkerSettings)
     (Maybe NexGuardFileMarkerSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PartnerWatermarking' {Maybe NexGuardFileMarkerSettings
nexguardFileMarkerSettings :: Maybe NexGuardFileMarkerSettings
$sel:nexguardFileMarkerSettings:PartnerWatermarking' :: PartnerWatermarking -> Maybe NexGuardFileMarkerSettings
nexguardFileMarkerSettings} -> Maybe NexGuardFileMarkerSettings
nexguardFileMarkerSettings) (\s :: PartnerWatermarking
s@PartnerWatermarking' {} Maybe NexGuardFileMarkerSettings
a -> PartnerWatermarking
s {$sel:nexguardFileMarkerSettings:PartnerWatermarking' :: Maybe NexGuardFileMarkerSettings
nexguardFileMarkerSettings = Maybe NexGuardFileMarkerSettings
a} :: PartnerWatermarking)

instance Core.FromJSON PartnerWatermarking where
  parseJSON :: Value -> Parser PartnerWatermarking
parseJSON =
    String
-> (Object -> Parser PartnerWatermarking)
-> Value
-> Parser PartnerWatermarking
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"PartnerWatermarking"
      ( \Object
x ->
          Maybe NexGuardFileMarkerSettings -> PartnerWatermarking
PartnerWatermarking'
            (Maybe NexGuardFileMarkerSettings -> PartnerWatermarking)
-> Parser (Maybe NexGuardFileMarkerSettings)
-> Parser PartnerWatermarking
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe NexGuardFileMarkerSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"nexguardFileMarkerSettings")
      )

instance Prelude.Hashable PartnerWatermarking

instance Prelude.NFData PartnerWatermarking

instance Core.ToJSON PartnerWatermarking where
  toJSON :: PartnerWatermarking -> Value
toJSON PartnerWatermarking' {Maybe NexGuardFileMarkerSettings
nexguardFileMarkerSettings :: Maybe NexGuardFileMarkerSettings
$sel:nexguardFileMarkerSettings:PartnerWatermarking' :: PartnerWatermarking -> Maybe NexGuardFileMarkerSettings
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"nexguardFileMarkerSettings" Text -> NexGuardFileMarkerSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NexGuardFileMarkerSettings -> Pair)
-> Maybe NexGuardFileMarkerSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NexGuardFileMarkerSettings
nexguardFileMarkerSettings
          ]
      )