{-# 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.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
data PackagingConfiguration = PackagingConfiguration'
{ PackagingConfiguration -> Maybe HlsPackage
hlsPackage :: Prelude.Maybe HlsPackage,
PackagingConfiguration -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
PackagingConfiguration -> Maybe Text
packagingGroupId :: Prelude.Maybe Prelude.Text,
PackagingConfiguration -> Maybe DashPackage
dashPackage :: Prelude.Maybe DashPackage,
PackagingConfiguration -> Maybe MssPackage
mssPackage :: Prelude.Maybe MssPackage,
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)
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
}
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)
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)
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)
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)
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)
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)
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)
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