{-# 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.MediaPackageVOD.Types.PackagingConfiguration
-- 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.MediaPackageVOD.Types.PackagingConfiguration where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaPackageVOD.Types.CmafPackage
import Amazonka.MediaPackageVOD.Types.DashPackage
import Amazonka.MediaPackageVOD.Types.HlsPackage
import Amazonka.MediaPackageVOD.Types.MssPackage
import qualified Amazonka.Prelude as Prelude

-- | A MediaPackage VOD PackagingConfiguration resource.
--
-- /See:/ 'newPackagingConfiguration' smart constructor.
data PackagingConfiguration = PackagingConfiguration'
  { PackagingConfiguration -> Maybe HlsPackage
hlsPackage :: Prelude.Maybe HlsPackage,
    -- | The ARN of the PackagingConfiguration.
    PackagingConfiguration -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The ID of a PackagingGroup.
    PackagingConfiguration -> Maybe Text
packagingGroupId :: Prelude.Maybe Prelude.Text,
    PackagingConfiguration -> Maybe DashPackage
dashPackage :: Prelude.Maybe DashPackage,
    PackagingConfiguration -> Maybe MssPackage
mssPackage :: Prelude.Maybe MssPackage,
    -- | The ID of the PackagingConfiguration.
    PackagingConfiguration -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    PackagingConfiguration -> Maybe CmafPackage
cmafPackage :: Prelude.Maybe CmafPackage,
    PackagingConfiguration -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (PackagingConfiguration -> PackagingConfiguration -> Bool
(PackagingConfiguration -> PackagingConfiguration -> Bool)
-> (PackagingConfiguration -> PackagingConfiguration -> Bool)
-> Eq PackagingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PackagingConfiguration -> PackagingConfiguration -> Bool
$c/= :: PackagingConfiguration -> PackagingConfiguration -> Bool
== :: PackagingConfiguration -> PackagingConfiguration -> Bool
$c== :: PackagingConfiguration -> PackagingConfiguration -> Bool
Prelude.Eq, ReadPrec [PackagingConfiguration]
ReadPrec PackagingConfiguration
Int -> ReadS PackagingConfiguration
ReadS [PackagingConfiguration]
(Int -> ReadS PackagingConfiguration)
-> ReadS [PackagingConfiguration]
-> ReadPrec PackagingConfiguration
-> ReadPrec [PackagingConfiguration]
-> Read PackagingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PackagingConfiguration]
$creadListPrec :: ReadPrec [PackagingConfiguration]
readPrec :: ReadPrec PackagingConfiguration
$creadPrec :: ReadPrec PackagingConfiguration
readList :: ReadS [PackagingConfiguration]
$creadList :: ReadS [PackagingConfiguration]
readsPrec :: Int -> ReadS PackagingConfiguration
$creadsPrec :: Int -> ReadS PackagingConfiguration
Prelude.Read, Int -> PackagingConfiguration -> ShowS
[PackagingConfiguration] -> ShowS
PackagingConfiguration -> String
(Int -> PackagingConfiguration -> ShowS)
-> (PackagingConfiguration -> String)
-> ([PackagingConfiguration] -> ShowS)
-> Show PackagingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PackagingConfiguration] -> ShowS
$cshowList :: [PackagingConfiguration] -> ShowS
show :: PackagingConfiguration -> String
$cshow :: PackagingConfiguration -> String
showsPrec :: Int -> PackagingConfiguration -> ShowS
$cshowsPrec :: Int -> PackagingConfiguration -> ShowS
Prelude.Show, (forall x. PackagingConfiguration -> Rep PackagingConfiguration x)
-> (forall x.
    Rep PackagingConfiguration x -> PackagingConfiguration)
-> Generic PackagingConfiguration
forall x. Rep PackagingConfiguration x -> PackagingConfiguration
forall x. PackagingConfiguration -> Rep PackagingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PackagingConfiguration x -> PackagingConfiguration
$cfrom :: forall x. PackagingConfiguration -> Rep PackagingConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'PackagingConfiguration' 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:
--
-- 'hlsPackage', 'packagingConfiguration_hlsPackage' - Undocumented member.
--
-- 'arn', 'packagingConfiguration_arn' - The ARN of the PackagingConfiguration.
--
-- 'packagingGroupId', 'packagingConfiguration_packagingGroupId' - The ID of a PackagingGroup.
--
-- 'dashPackage', 'packagingConfiguration_dashPackage' - Undocumented member.
--
-- 'mssPackage', 'packagingConfiguration_mssPackage' - Undocumented member.
--
-- 'id', 'packagingConfiguration_id' - The ID of the PackagingConfiguration.
--
-- 'cmafPackage', 'packagingConfiguration_cmafPackage' - Undocumented member.
--
-- 'tags', 'packagingConfiguration_tags' - Undocumented member.
newPackagingConfiguration ::
  PackagingConfiguration
newPackagingConfiguration :: PackagingConfiguration
newPackagingConfiguration =
  PackagingConfiguration' :: Maybe HlsPackage
-> Maybe Text
-> Maybe Text
-> Maybe DashPackage
-> Maybe MssPackage
-> Maybe Text
-> Maybe CmafPackage
-> Maybe (HashMap Text Text)
-> PackagingConfiguration
PackagingConfiguration'
    { $sel:hlsPackage:PackagingConfiguration' :: Maybe HlsPackage
hlsPackage =
        Maybe HlsPackage
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:PackagingConfiguration' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:packagingGroupId:PackagingConfiguration' :: Maybe Text
packagingGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dashPackage:PackagingConfiguration' :: Maybe DashPackage
dashPackage = Maybe DashPackage
forall a. Maybe a
Prelude.Nothing,
      $sel:mssPackage:PackagingConfiguration' :: Maybe MssPackage
mssPackage = Maybe MssPackage
forall a. Maybe a
Prelude.Nothing,
      $sel:id:PackagingConfiguration' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cmafPackage:PackagingConfiguration' :: Maybe CmafPackage
cmafPackage = Maybe CmafPackage
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:PackagingConfiguration' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | Undocumented member.
packagingConfiguration_hlsPackage :: Lens.Lens' PackagingConfiguration (Prelude.Maybe HlsPackage)
packagingConfiguration_hlsPackage :: (Maybe HlsPackage -> f (Maybe HlsPackage))
-> PackagingConfiguration -> f PackagingConfiguration
packagingConfiguration_hlsPackage = (PackagingConfiguration -> Maybe HlsPackage)
-> (PackagingConfiguration
    -> Maybe HlsPackage -> PackagingConfiguration)
-> Lens
     PackagingConfiguration
     PackagingConfiguration
     (Maybe HlsPackage)
     (Maybe HlsPackage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackagingConfiguration' {Maybe HlsPackage
hlsPackage :: Maybe HlsPackage
$sel:hlsPackage:PackagingConfiguration' :: PackagingConfiguration -> Maybe HlsPackage
hlsPackage} -> Maybe HlsPackage
hlsPackage) (\s :: PackagingConfiguration
s@PackagingConfiguration' {} Maybe HlsPackage
a -> PackagingConfiguration
s {$sel:hlsPackage:PackagingConfiguration' :: Maybe HlsPackage
hlsPackage = Maybe HlsPackage
a} :: PackagingConfiguration)

-- | The ARN of the PackagingConfiguration.
packagingConfiguration_arn :: Lens.Lens' PackagingConfiguration (Prelude.Maybe Prelude.Text)
packagingConfiguration_arn :: (Maybe Text -> f (Maybe Text))
-> PackagingConfiguration -> f PackagingConfiguration
packagingConfiguration_arn = (PackagingConfiguration -> Maybe Text)
-> (PackagingConfiguration -> Maybe Text -> PackagingConfiguration)
-> Lens
     PackagingConfiguration
     PackagingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackagingConfiguration' {Maybe Text
arn :: Maybe Text
$sel:arn:PackagingConfiguration' :: PackagingConfiguration -> Maybe Text
arn} -> Maybe Text
arn) (\s :: PackagingConfiguration
s@PackagingConfiguration' {} Maybe Text
a -> PackagingConfiguration
s {$sel:arn:PackagingConfiguration' :: Maybe Text
arn = Maybe Text
a} :: PackagingConfiguration)

-- | The ID of a PackagingGroup.
packagingConfiguration_packagingGroupId :: Lens.Lens' PackagingConfiguration (Prelude.Maybe Prelude.Text)
packagingConfiguration_packagingGroupId :: (Maybe Text -> f (Maybe Text))
-> PackagingConfiguration -> f PackagingConfiguration
packagingConfiguration_packagingGroupId = (PackagingConfiguration -> Maybe Text)
-> (PackagingConfiguration -> Maybe Text -> PackagingConfiguration)
-> Lens
     PackagingConfiguration
     PackagingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackagingConfiguration' {Maybe Text
packagingGroupId :: Maybe Text
$sel:packagingGroupId:PackagingConfiguration' :: PackagingConfiguration -> Maybe Text
packagingGroupId} -> Maybe Text
packagingGroupId) (\s :: PackagingConfiguration
s@PackagingConfiguration' {} Maybe Text
a -> PackagingConfiguration
s {$sel:packagingGroupId:PackagingConfiguration' :: Maybe Text
packagingGroupId = Maybe Text
a} :: PackagingConfiguration)

-- | Undocumented member.
packagingConfiguration_dashPackage :: Lens.Lens' PackagingConfiguration (Prelude.Maybe DashPackage)
packagingConfiguration_dashPackage :: (Maybe DashPackage -> f (Maybe DashPackage))
-> PackagingConfiguration -> f PackagingConfiguration
packagingConfiguration_dashPackage = (PackagingConfiguration -> Maybe DashPackage)
-> (PackagingConfiguration
    -> Maybe DashPackage -> PackagingConfiguration)
-> Lens
     PackagingConfiguration
     PackagingConfiguration
     (Maybe DashPackage)
     (Maybe DashPackage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackagingConfiguration' {Maybe DashPackage
dashPackage :: Maybe DashPackage
$sel:dashPackage:PackagingConfiguration' :: PackagingConfiguration -> Maybe DashPackage
dashPackage} -> Maybe DashPackage
dashPackage) (\s :: PackagingConfiguration
s@PackagingConfiguration' {} Maybe DashPackage
a -> PackagingConfiguration
s {$sel:dashPackage:PackagingConfiguration' :: Maybe DashPackage
dashPackage = Maybe DashPackage
a} :: PackagingConfiguration)

-- | Undocumented member.
packagingConfiguration_mssPackage :: Lens.Lens' PackagingConfiguration (Prelude.Maybe MssPackage)
packagingConfiguration_mssPackage :: (Maybe MssPackage -> f (Maybe MssPackage))
-> PackagingConfiguration -> f PackagingConfiguration
packagingConfiguration_mssPackage = (PackagingConfiguration -> Maybe MssPackage)
-> (PackagingConfiguration
    -> Maybe MssPackage -> PackagingConfiguration)
-> Lens
     PackagingConfiguration
     PackagingConfiguration
     (Maybe MssPackage)
     (Maybe MssPackage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackagingConfiguration' {Maybe MssPackage
mssPackage :: Maybe MssPackage
$sel:mssPackage:PackagingConfiguration' :: PackagingConfiguration -> Maybe MssPackage
mssPackage} -> Maybe MssPackage
mssPackage) (\s :: PackagingConfiguration
s@PackagingConfiguration' {} Maybe MssPackage
a -> PackagingConfiguration
s {$sel:mssPackage:PackagingConfiguration' :: Maybe MssPackage
mssPackage = Maybe MssPackage
a} :: PackagingConfiguration)

-- | The ID of the PackagingConfiguration.
packagingConfiguration_id :: Lens.Lens' PackagingConfiguration (Prelude.Maybe Prelude.Text)
packagingConfiguration_id :: (Maybe Text -> f (Maybe Text))
-> PackagingConfiguration -> f PackagingConfiguration
packagingConfiguration_id = (PackagingConfiguration -> Maybe Text)
-> (PackagingConfiguration -> Maybe Text -> PackagingConfiguration)
-> Lens
     PackagingConfiguration
     PackagingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackagingConfiguration' {Maybe Text
id :: Maybe Text
$sel:id:PackagingConfiguration' :: PackagingConfiguration -> Maybe Text
id} -> Maybe Text
id) (\s :: PackagingConfiguration
s@PackagingConfiguration' {} Maybe Text
a -> PackagingConfiguration
s {$sel:id:PackagingConfiguration' :: Maybe Text
id = Maybe Text
a} :: PackagingConfiguration)

-- | Undocumented member.
packagingConfiguration_cmafPackage :: Lens.Lens' PackagingConfiguration (Prelude.Maybe CmafPackage)
packagingConfiguration_cmafPackage :: (Maybe CmafPackage -> f (Maybe CmafPackage))
-> PackagingConfiguration -> f PackagingConfiguration
packagingConfiguration_cmafPackage = (PackagingConfiguration -> Maybe CmafPackage)
-> (PackagingConfiguration
    -> Maybe CmafPackage -> PackagingConfiguration)
-> Lens
     PackagingConfiguration
     PackagingConfiguration
     (Maybe CmafPackage)
     (Maybe CmafPackage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackagingConfiguration' {Maybe CmafPackage
cmafPackage :: Maybe CmafPackage
$sel:cmafPackage:PackagingConfiguration' :: PackagingConfiguration -> Maybe CmafPackage
cmafPackage} -> Maybe CmafPackage
cmafPackage) (\s :: PackagingConfiguration
s@PackagingConfiguration' {} Maybe CmafPackage
a -> PackagingConfiguration
s {$sel:cmafPackage:PackagingConfiguration' :: Maybe CmafPackage
cmafPackage = Maybe CmafPackage
a} :: PackagingConfiguration)

-- | Undocumented member.
packagingConfiguration_tags :: Lens.Lens' PackagingConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
packagingConfiguration_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PackagingConfiguration -> f PackagingConfiguration
packagingConfiguration_tags = (PackagingConfiguration -> Maybe (HashMap Text Text))
-> (PackagingConfiguration
    -> Maybe (HashMap Text Text) -> PackagingConfiguration)
-> Lens
     PackagingConfiguration
     PackagingConfiguration
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PackagingConfiguration' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:PackagingConfiguration' :: PackagingConfiguration -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: PackagingConfiguration
s@PackagingConfiguration' {} Maybe (HashMap Text Text)
a -> PackagingConfiguration
s {$sel:tags:PackagingConfiguration' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: PackagingConfiguration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> PackagingConfiguration -> f PackagingConfiguration)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PackagingConfiguration
-> f PackagingConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text 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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON PackagingConfiguration where
  parseJSON :: Value -> Parser PackagingConfiguration
parseJSON =
    String
-> (Object -> Parser PackagingConfiguration)
-> Value
-> Parser PackagingConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"PackagingConfiguration"
      ( \Object
x ->
          Maybe HlsPackage
-> Maybe Text
-> Maybe Text
-> Maybe DashPackage
-> Maybe MssPackage
-> Maybe Text
-> Maybe CmafPackage
-> Maybe (HashMap Text Text)
-> PackagingConfiguration
PackagingConfiguration'
            (Maybe HlsPackage
 -> Maybe Text
 -> Maybe Text
 -> Maybe DashPackage
 -> Maybe MssPackage
 -> Maybe Text
 -> Maybe CmafPackage
 -> Maybe (HashMap Text Text)
 -> PackagingConfiguration)
-> Parser (Maybe HlsPackage)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe DashPackage
      -> Maybe MssPackage
      -> Maybe Text
      -> Maybe CmafPackage
      -> Maybe (HashMap Text Text)
      -> PackagingConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe HlsPackage)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hlsPackage")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe DashPackage
   -> Maybe MssPackage
   -> Maybe Text
   -> Maybe CmafPackage
   -> Maybe (HashMap Text Text)
   -> PackagingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe DashPackage
      -> Maybe MssPackage
      -> Maybe Text
      -> Maybe CmafPackage
      -> Maybe (HashMap Text Text)
      -> PackagingConfiguration)
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
"arn")
            Parser
  (Maybe Text
   -> Maybe DashPackage
   -> Maybe MssPackage
   -> Maybe Text
   -> Maybe CmafPackage
   -> Maybe (HashMap Text Text)
   -> PackagingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe DashPackage
      -> Maybe MssPackage
      -> Maybe Text
      -> Maybe CmafPackage
      -> Maybe (HashMap Text Text)
      -> PackagingConfiguration)
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
"packagingGroupId")
            Parser
  (Maybe DashPackage
   -> Maybe MssPackage
   -> Maybe Text
   -> Maybe CmafPackage
   -> Maybe (HashMap Text Text)
   -> PackagingConfiguration)
-> Parser (Maybe DashPackage)
-> Parser
     (Maybe MssPackage
      -> Maybe Text
      -> Maybe CmafPackage
      -> Maybe (HashMap Text Text)
      -> PackagingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DashPackage)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dashPackage")
            Parser
  (Maybe MssPackage
   -> Maybe Text
   -> Maybe CmafPackage
   -> Maybe (HashMap Text Text)
   -> PackagingConfiguration)
-> Parser (Maybe MssPackage)
-> Parser
     (Maybe Text
      -> Maybe CmafPackage
      -> Maybe (HashMap Text Text)
      -> PackagingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MssPackage)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mssPackage")
            Parser
  (Maybe Text
   -> Maybe CmafPackage
   -> Maybe (HashMap Text Text)
   -> PackagingConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe CmafPackage
      -> Maybe (HashMap Text Text) -> PackagingConfiguration)
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
"id")
            Parser
  (Maybe CmafPackage
   -> Maybe (HashMap Text Text) -> PackagingConfiguration)
-> Parser (Maybe CmafPackage)
-> Parser (Maybe (HashMap Text Text) -> PackagingConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CmafPackage)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cmafPackage")
            Parser (Maybe (HashMap Text Text) -> PackagingConfiguration)
-> Parser (Maybe (HashMap Text Text))
-> Parser PackagingConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable PackagingConfiguration

instance Prelude.NFData PackagingConfiguration