{-# 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.SpekeKeyProviderCmaf
-- 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.SpekeKeyProviderCmaf where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | If your output group type is CMAF, use these settings when doing DRM
-- encryption with a SPEKE-compliant key provider. If your output group
-- type is HLS, DASH, or Microsoft Smooth, use the SpekeKeyProvider
-- settings instead.
--
-- /See:/ 'newSpekeKeyProviderCmaf' smart constructor.
data SpekeKeyProviderCmaf = SpekeKeyProviderCmaf'
  { -- | Specify the resource ID that your SPEKE-compliant key provider uses to
    -- identify this content.
    SpekeKeyProviderCmaf -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
    -- | Specify the DRM system IDs that you want signaled in the DASH manifest
    -- that MediaConvert creates as part of this CMAF package. The DASH
    -- manifest can currently signal up to three system IDs. For more
    -- information, see
    -- https:\/\/dashif.org\/identifiers\/content_protection\/.
    SpekeKeyProviderCmaf -> Maybe [Text]
dashSignaledSystemIds :: Prelude.Maybe [Prelude.Text],
    -- | If you want your key provider to encrypt the content keys that it
    -- provides to MediaConvert, set up a certificate with a master key using
    -- AWS Certificate Manager. Specify the certificate\'s Amazon Resource Name
    -- (ARN) here.
    SpekeKeyProviderCmaf -> Maybe Text
certificateArn :: Prelude.Maybe Prelude.Text,
    -- | Specify the URL to the key server that your SPEKE-compliant DRM key
    -- provider uses to provide keys for encrypting your content.
    SpekeKeyProviderCmaf -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
    -- | Specify the DRM system ID that you want signaled in the HLS manifest
    -- that MediaConvert creates as part of this CMAF package. The HLS manifest
    -- can currently signal only one system ID. For more information, see
    -- https:\/\/dashif.org\/identifiers\/content_protection\/.
    SpekeKeyProviderCmaf -> Maybe [Text]
hlsSignaledSystemIds :: Prelude.Maybe [Prelude.Text]
  }
  deriving (SpekeKeyProviderCmaf -> SpekeKeyProviderCmaf -> Bool
(SpekeKeyProviderCmaf -> SpekeKeyProviderCmaf -> Bool)
-> (SpekeKeyProviderCmaf -> SpekeKeyProviderCmaf -> Bool)
-> Eq SpekeKeyProviderCmaf
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SpekeKeyProviderCmaf -> SpekeKeyProviderCmaf -> Bool
$c/= :: SpekeKeyProviderCmaf -> SpekeKeyProviderCmaf -> Bool
== :: SpekeKeyProviderCmaf -> SpekeKeyProviderCmaf -> Bool
$c== :: SpekeKeyProviderCmaf -> SpekeKeyProviderCmaf -> Bool
Prelude.Eq, ReadPrec [SpekeKeyProviderCmaf]
ReadPrec SpekeKeyProviderCmaf
Int -> ReadS SpekeKeyProviderCmaf
ReadS [SpekeKeyProviderCmaf]
(Int -> ReadS SpekeKeyProviderCmaf)
-> ReadS [SpekeKeyProviderCmaf]
-> ReadPrec SpekeKeyProviderCmaf
-> ReadPrec [SpekeKeyProviderCmaf]
-> Read SpekeKeyProviderCmaf
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SpekeKeyProviderCmaf]
$creadListPrec :: ReadPrec [SpekeKeyProviderCmaf]
readPrec :: ReadPrec SpekeKeyProviderCmaf
$creadPrec :: ReadPrec SpekeKeyProviderCmaf
readList :: ReadS [SpekeKeyProviderCmaf]
$creadList :: ReadS [SpekeKeyProviderCmaf]
readsPrec :: Int -> ReadS SpekeKeyProviderCmaf
$creadsPrec :: Int -> ReadS SpekeKeyProviderCmaf
Prelude.Read, Int -> SpekeKeyProviderCmaf -> ShowS
[SpekeKeyProviderCmaf] -> ShowS
SpekeKeyProviderCmaf -> String
(Int -> SpekeKeyProviderCmaf -> ShowS)
-> (SpekeKeyProviderCmaf -> String)
-> ([SpekeKeyProviderCmaf] -> ShowS)
-> Show SpekeKeyProviderCmaf
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SpekeKeyProviderCmaf] -> ShowS
$cshowList :: [SpekeKeyProviderCmaf] -> ShowS
show :: SpekeKeyProviderCmaf -> String
$cshow :: SpekeKeyProviderCmaf -> String
showsPrec :: Int -> SpekeKeyProviderCmaf -> ShowS
$cshowsPrec :: Int -> SpekeKeyProviderCmaf -> ShowS
Prelude.Show, (forall x. SpekeKeyProviderCmaf -> Rep SpekeKeyProviderCmaf x)
-> (forall x. Rep SpekeKeyProviderCmaf x -> SpekeKeyProviderCmaf)
-> Generic SpekeKeyProviderCmaf
forall x. Rep SpekeKeyProviderCmaf x -> SpekeKeyProviderCmaf
forall x. SpekeKeyProviderCmaf -> Rep SpekeKeyProviderCmaf x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SpekeKeyProviderCmaf x -> SpekeKeyProviderCmaf
$cfrom :: forall x. SpekeKeyProviderCmaf -> Rep SpekeKeyProviderCmaf x
Prelude.Generic)

-- |
-- Create a value of 'SpekeKeyProviderCmaf' 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:
--
-- 'resourceId', 'spekeKeyProviderCmaf_resourceId' - Specify the resource ID that your SPEKE-compliant key provider uses to
-- identify this content.
--
-- 'dashSignaledSystemIds', 'spekeKeyProviderCmaf_dashSignaledSystemIds' - Specify the DRM system IDs that you want signaled in the DASH manifest
-- that MediaConvert creates as part of this CMAF package. The DASH
-- manifest can currently signal up to three system IDs. For more
-- information, see
-- https:\/\/dashif.org\/identifiers\/content_protection\/.
--
-- 'certificateArn', 'spekeKeyProviderCmaf_certificateArn' - If you want your key provider to encrypt the content keys that it
-- provides to MediaConvert, set up a certificate with a master key using
-- AWS Certificate Manager. Specify the certificate\'s Amazon Resource Name
-- (ARN) here.
--
-- 'url', 'spekeKeyProviderCmaf_url' - Specify the URL to the key server that your SPEKE-compliant DRM key
-- provider uses to provide keys for encrypting your content.
--
-- 'hlsSignaledSystemIds', 'spekeKeyProviderCmaf_hlsSignaledSystemIds' - Specify the DRM system ID that you want signaled in the HLS manifest
-- that MediaConvert creates as part of this CMAF package. The HLS manifest
-- can currently signal only one system ID. For more information, see
-- https:\/\/dashif.org\/identifiers\/content_protection\/.
newSpekeKeyProviderCmaf ::
  SpekeKeyProviderCmaf
newSpekeKeyProviderCmaf :: SpekeKeyProviderCmaf
newSpekeKeyProviderCmaf =
  SpekeKeyProviderCmaf' :: Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> SpekeKeyProviderCmaf
SpekeKeyProviderCmaf'
    { $sel:resourceId:SpekeKeyProviderCmaf' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dashSignaledSystemIds:SpekeKeyProviderCmaf' :: Maybe [Text]
dashSignaledSystemIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:certificateArn:SpekeKeyProviderCmaf' :: Maybe Text
certificateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:url:SpekeKeyProviderCmaf' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hlsSignaledSystemIds:SpekeKeyProviderCmaf' :: Maybe [Text]
hlsSignaledSystemIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
    }

-- | Specify the resource ID that your SPEKE-compliant key provider uses to
-- identify this content.
spekeKeyProviderCmaf_resourceId :: Lens.Lens' SpekeKeyProviderCmaf (Prelude.Maybe Prelude.Text)
spekeKeyProviderCmaf_resourceId :: (Maybe Text -> f (Maybe Text))
-> SpekeKeyProviderCmaf -> f SpekeKeyProviderCmaf
spekeKeyProviderCmaf_resourceId = (SpekeKeyProviderCmaf -> Maybe Text)
-> (SpekeKeyProviderCmaf -> Maybe Text -> SpekeKeyProviderCmaf)
-> Lens
     SpekeKeyProviderCmaf SpekeKeyProviderCmaf (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpekeKeyProviderCmaf' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: SpekeKeyProviderCmaf
s@SpekeKeyProviderCmaf' {} Maybe Text
a -> SpekeKeyProviderCmaf
s {$sel:resourceId:SpekeKeyProviderCmaf' :: Maybe Text
resourceId = Maybe Text
a} :: SpekeKeyProviderCmaf)

-- | Specify the DRM system IDs that you want signaled in the DASH manifest
-- that MediaConvert creates as part of this CMAF package. The DASH
-- manifest can currently signal up to three system IDs. For more
-- information, see
-- https:\/\/dashif.org\/identifiers\/content_protection\/.
spekeKeyProviderCmaf_dashSignaledSystemIds :: Lens.Lens' SpekeKeyProviderCmaf (Prelude.Maybe [Prelude.Text])
spekeKeyProviderCmaf_dashSignaledSystemIds :: (Maybe [Text] -> f (Maybe [Text]))
-> SpekeKeyProviderCmaf -> f SpekeKeyProviderCmaf
spekeKeyProviderCmaf_dashSignaledSystemIds = (SpekeKeyProviderCmaf -> Maybe [Text])
-> (SpekeKeyProviderCmaf -> Maybe [Text] -> SpekeKeyProviderCmaf)
-> Lens
     SpekeKeyProviderCmaf
     SpekeKeyProviderCmaf
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpekeKeyProviderCmaf' {Maybe [Text]
dashSignaledSystemIds :: Maybe [Text]
$sel:dashSignaledSystemIds:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe [Text]
dashSignaledSystemIds} -> Maybe [Text]
dashSignaledSystemIds) (\s :: SpekeKeyProviderCmaf
s@SpekeKeyProviderCmaf' {} Maybe [Text]
a -> SpekeKeyProviderCmaf
s {$sel:dashSignaledSystemIds:SpekeKeyProviderCmaf' :: Maybe [Text]
dashSignaledSystemIds = Maybe [Text]
a} :: SpekeKeyProviderCmaf) ((Maybe [Text] -> f (Maybe [Text]))
 -> SpekeKeyProviderCmaf -> f SpekeKeyProviderCmaf)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SpekeKeyProviderCmaf
-> f SpekeKeyProviderCmaf
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If you want your key provider to encrypt the content keys that it
-- provides to MediaConvert, set up a certificate with a master key using
-- AWS Certificate Manager. Specify the certificate\'s Amazon Resource Name
-- (ARN) here.
spekeKeyProviderCmaf_certificateArn :: Lens.Lens' SpekeKeyProviderCmaf (Prelude.Maybe Prelude.Text)
spekeKeyProviderCmaf_certificateArn :: (Maybe Text -> f (Maybe Text))
-> SpekeKeyProviderCmaf -> f SpekeKeyProviderCmaf
spekeKeyProviderCmaf_certificateArn = (SpekeKeyProviderCmaf -> Maybe Text)
-> (SpekeKeyProviderCmaf -> Maybe Text -> SpekeKeyProviderCmaf)
-> Lens
     SpekeKeyProviderCmaf SpekeKeyProviderCmaf (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpekeKeyProviderCmaf' {Maybe Text
certificateArn :: Maybe Text
$sel:certificateArn:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe Text
certificateArn} -> Maybe Text
certificateArn) (\s :: SpekeKeyProviderCmaf
s@SpekeKeyProviderCmaf' {} Maybe Text
a -> SpekeKeyProviderCmaf
s {$sel:certificateArn:SpekeKeyProviderCmaf' :: Maybe Text
certificateArn = Maybe Text
a} :: SpekeKeyProviderCmaf)

-- | Specify the URL to the key server that your SPEKE-compliant DRM key
-- provider uses to provide keys for encrypting your content.
spekeKeyProviderCmaf_url :: Lens.Lens' SpekeKeyProviderCmaf (Prelude.Maybe Prelude.Text)
spekeKeyProviderCmaf_url :: (Maybe Text -> f (Maybe Text))
-> SpekeKeyProviderCmaf -> f SpekeKeyProviderCmaf
spekeKeyProviderCmaf_url = (SpekeKeyProviderCmaf -> Maybe Text)
-> (SpekeKeyProviderCmaf -> Maybe Text -> SpekeKeyProviderCmaf)
-> Lens
     SpekeKeyProviderCmaf SpekeKeyProviderCmaf (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpekeKeyProviderCmaf' {Maybe Text
url :: Maybe Text
$sel:url:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe Text
url} -> Maybe Text
url) (\s :: SpekeKeyProviderCmaf
s@SpekeKeyProviderCmaf' {} Maybe Text
a -> SpekeKeyProviderCmaf
s {$sel:url:SpekeKeyProviderCmaf' :: Maybe Text
url = Maybe Text
a} :: SpekeKeyProviderCmaf)

-- | Specify the DRM system ID that you want signaled in the HLS manifest
-- that MediaConvert creates as part of this CMAF package. The HLS manifest
-- can currently signal only one system ID. For more information, see
-- https:\/\/dashif.org\/identifiers\/content_protection\/.
spekeKeyProviderCmaf_hlsSignaledSystemIds :: Lens.Lens' SpekeKeyProviderCmaf (Prelude.Maybe [Prelude.Text])
spekeKeyProviderCmaf_hlsSignaledSystemIds :: (Maybe [Text] -> f (Maybe [Text]))
-> SpekeKeyProviderCmaf -> f SpekeKeyProviderCmaf
spekeKeyProviderCmaf_hlsSignaledSystemIds = (SpekeKeyProviderCmaf -> Maybe [Text])
-> (SpekeKeyProviderCmaf -> Maybe [Text] -> SpekeKeyProviderCmaf)
-> Lens
     SpekeKeyProviderCmaf
     SpekeKeyProviderCmaf
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpekeKeyProviderCmaf' {Maybe [Text]
hlsSignaledSystemIds :: Maybe [Text]
$sel:hlsSignaledSystemIds:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe [Text]
hlsSignaledSystemIds} -> Maybe [Text]
hlsSignaledSystemIds) (\s :: SpekeKeyProviderCmaf
s@SpekeKeyProviderCmaf' {} Maybe [Text]
a -> SpekeKeyProviderCmaf
s {$sel:hlsSignaledSystemIds:SpekeKeyProviderCmaf' :: Maybe [Text]
hlsSignaledSystemIds = Maybe [Text]
a} :: SpekeKeyProviderCmaf) ((Maybe [Text] -> f (Maybe [Text]))
 -> SpekeKeyProviderCmaf -> f SpekeKeyProviderCmaf)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SpekeKeyProviderCmaf
-> f SpekeKeyProviderCmaf
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON SpekeKeyProviderCmaf where
  parseJSON :: Value -> Parser SpekeKeyProviderCmaf
parseJSON =
    String
-> (Object -> Parser SpekeKeyProviderCmaf)
-> Value
-> Parser SpekeKeyProviderCmaf
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SpekeKeyProviderCmaf"
      ( \Object
x ->
          Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> SpekeKeyProviderCmaf
SpekeKeyProviderCmaf'
            (Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> SpekeKeyProviderCmaf)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> SpekeKeyProviderCmaf)
forall (f :: * -> *) a b. Functor 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
"resourceId")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> SpekeKeyProviderCmaf)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text -> Maybe Text -> Maybe [Text] -> SpekeKeyProviderCmaf)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dashSignaledSystemIds"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text -> Maybe Text -> Maybe [Text] -> SpekeKeyProviderCmaf)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [Text] -> SpekeKeyProviderCmaf)
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
"certificateArn")
            Parser (Maybe Text -> Maybe [Text] -> SpekeKeyProviderCmaf)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> SpekeKeyProviderCmaf)
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
"url")
            Parser (Maybe [Text] -> SpekeKeyProviderCmaf)
-> Parser (Maybe [Text]) -> Parser SpekeKeyProviderCmaf
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hlsSignaledSystemIds"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable SpekeKeyProviderCmaf

instance Prelude.NFData SpekeKeyProviderCmaf

instance Core.ToJSON SpekeKeyProviderCmaf where
  toJSON :: SpekeKeyProviderCmaf -> Value
toJSON SpekeKeyProviderCmaf' {Maybe [Text]
Maybe Text
hlsSignaledSystemIds :: Maybe [Text]
url :: Maybe Text
certificateArn :: Maybe Text
dashSignaledSystemIds :: Maybe [Text]
resourceId :: Maybe Text
$sel:hlsSignaledSystemIds:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe [Text]
$sel:url:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe Text
$sel:certificateArn:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe Text
$sel:dashSignaledSystemIds:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe [Text]
$sel:resourceId:SpekeKeyProviderCmaf' :: SpekeKeyProviderCmaf -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"resourceId" 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
resourceId,
            (Text
"dashSignaledSystemIds" 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]
dashSignaledSystemIds,
            (Text
"certificateArn" 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
certificateArn,
            (Text
"url" 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
url,
            (Text
"hlsSignaledSystemIds" 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]
hlsSignaledSystemIds
          ]
      )