{-# 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.CmafAdditionalManifest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CmafAdditionalManifest = CmafAdditionalManifest'
{
CmafAdditionalManifest -> Maybe Text
manifestNameModifier :: Prelude.Maybe Prelude.Text,
CmafAdditionalManifest -> Maybe [Text]
selectedOutputs :: Prelude.Maybe [Prelude.Text]
}
deriving (CmafAdditionalManifest -> CmafAdditionalManifest -> Bool
(CmafAdditionalManifest -> CmafAdditionalManifest -> Bool)
-> (CmafAdditionalManifest -> CmafAdditionalManifest -> Bool)
-> Eq CmafAdditionalManifest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CmafAdditionalManifest -> CmafAdditionalManifest -> Bool
$c/= :: CmafAdditionalManifest -> CmafAdditionalManifest -> Bool
== :: CmafAdditionalManifest -> CmafAdditionalManifest -> Bool
$c== :: CmafAdditionalManifest -> CmafAdditionalManifest -> Bool
Prelude.Eq, ReadPrec [CmafAdditionalManifest]
ReadPrec CmafAdditionalManifest
Int -> ReadS CmafAdditionalManifest
ReadS [CmafAdditionalManifest]
(Int -> ReadS CmafAdditionalManifest)
-> ReadS [CmafAdditionalManifest]
-> ReadPrec CmafAdditionalManifest
-> ReadPrec [CmafAdditionalManifest]
-> Read CmafAdditionalManifest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CmafAdditionalManifest]
$creadListPrec :: ReadPrec [CmafAdditionalManifest]
readPrec :: ReadPrec CmafAdditionalManifest
$creadPrec :: ReadPrec CmafAdditionalManifest
readList :: ReadS [CmafAdditionalManifest]
$creadList :: ReadS [CmafAdditionalManifest]
readsPrec :: Int -> ReadS CmafAdditionalManifest
$creadsPrec :: Int -> ReadS CmafAdditionalManifest
Prelude.Read, Int -> CmafAdditionalManifest -> ShowS
[CmafAdditionalManifest] -> ShowS
CmafAdditionalManifest -> String
(Int -> CmafAdditionalManifest -> ShowS)
-> (CmafAdditionalManifest -> String)
-> ([CmafAdditionalManifest] -> ShowS)
-> Show CmafAdditionalManifest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CmafAdditionalManifest] -> ShowS
$cshowList :: [CmafAdditionalManifest] -> ShowS
show :: CmafAdditionalManifest -> String
$cshow :: CmafAdditionalManifest -> String
showsPrec :: Int -> CmafAdditionalManifest -> ShowS
$cshowsPrec :: Int -> CmafAdditionalManifest -> ShowS
Prelude.Show, (forall x. CmafAdditionalManifest -> Rep CmafAdditionalManifest x)
-> (forall x.
Rep CmafAdditionalManifest x -> CmafAdditionalManifest)
-> Generic CmafAdditionalManifest
forall x. Rep CmafAdditionalManifest x -> CmafAdditionalManifest
forall x. CmafAdditionalManifest -> Rep CmafAdditionalManifest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CmafAdditionalManifest x -> CmafAdditionalManifest
$cfrom :: forall x. CmafAdditionalManifest -> Rep CmafAdditionalManifest x
Prelude.Generic)
newCmafAdditionalManifest ::
CmafAdditionalManifest
newCmafAdditionalManifest :: CmafAdditionalManifest
newCmafAdditionalManifest =
CmafAdditionalManifest' :: Maybe Text -> Maybe [Text] -> CmafAdditionalManifest
CmafAdditionalManifest'
{ $sel:manifestNameModifier:CmafAdditionalManifest' :: Maybe Text
manifestNameModifier =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:selectedOutputs:CmafAdditionalManifest' :: Maybe [Text]
selectedOutputs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
cmafAdditionalManifest_manifestNameModifier :: Lens.Lens' CmafAdditionalManifest (Prelude.Maybe Prelude.Text)
cmafAdditionalManifest_manifestNameModifier :: (Maybe Text -> f (Maybe Text))
-> CmafAdditionalManifest -> f CmafAdditionalManifest
cmafAdditionalManifest_manifestNameModifier = (CmafAdditionalManifest -> Maybe Text)
-> (CmafAdditionalManifest -> Maybe Text -> CmafAdditionalManifest)
-> Lens
CmafAdditionalManifest
CmafAdditionalManifest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CmafAdditionalManifest' {Maybe Text
manifestNameModifier :: Maybe Text
$sel:manifestNameModifier:CmafAdditionalManifest' :: CmafAdditionalManifest -> Maybe Text
manifestNameModifier} -> Maybe Text
manifestNameModifier) (\s :: CmafAdditionalManifest
s@CmafAdditionalManifest' {} Maybe Text
a -> CmafAdditionalManifest
s {$sel:manifestNameModifier:CmafAdditionalManifest' :: Maybe Text
manifestNameModifier = Maybe Text
a} :: CmafAdditionalManifest)
cmafAdditionalManifest_selectedOutputs :: Lens.Lens' CmafAdditionalManifest (Prelude.Maybe [Prelude.Text])
cmafAdditionalManifest_selectedOutputs :: (Maybe [Text] -> f (Maybe [Text]))
-> CmafAdditionalManifest -> f CmafAdditionalManifest
cmafAdditionalManifest_selectedOutputs = (CmafAdditionalManifest -> Maybe [Text])
-> (CmafAdditionalManifest
-> Maybe [Text] -> CmafAdditionalManifest)
-> Lens
CmafAdditionalManifest
CmafAdditionalManifest
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CmafAdditionalManifest' {Maybe [Text]
selectedOutputs :: Maybe [Text]
$sel:selectedOutputs:CmafAdditionalManifest' :: CmafAdditionalManifest -> Maybe [Text]
selectedOutputs} -> Maybe [Text]
selectedOutputs) (\s :: CmafAdditionalManifest
s@CmafAdditionalManifest' {} Maybe [Text]
a -> CmafAdditionalManifest
s {$sel:selectedOutputs:CmafAdditionalManifest' :: Maybe [Text]
selectedOutputs = Maybe [Text]
a} :: CmafAdditionalManifest) ((Maybe [Text] -> f (Maybe [Text]))
-> CmafAdditionalManifest -> f CmafAdditionalManifest)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CmafAdditionalManifest
-> f CmafAdditionalManifest
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 CmafAdditionalManifest where
parseJSON :: Value -> Parser CmafAdditionalManifest
parseJSON =
String
-> (Object -> Parser CmafAdditionalManifest)
-> Value
-> Parser CmafAdditionalManifest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CmafAdditionalManifest"
( \Object
x ->
Maybe Text -> Maybe [Text] -> CmafAdditionalManifest
CmafAdditionalManifest'
(Maybe Text -> Maybe [Text] -> CmafAdditionalManifest)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> CmafAdditionalManifest)
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
"manifestNameModifier")
Parser (Maybe [Text] -> CmafAdditionalManifest)
-> Parser (Maybe [Text]) -> Parser CmafAdditionalManifest
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
"selectedOutputs"
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 CmafAdditionalManifest
instance Prelude.NFData CmafAdditionalManifest
instance Core.ToJSON CmafAdditionalManifest where
toJSON :: CmafAdditionalManifest -> Value
toJSON CmafAdditionalManifest' {Maybe [Text]
Maybe Text
selectedOutputs :: Maybe [Text]
manifestNameModifier :: Maybe Text
$sel:selectedOutputs:CmafAdditionalManifest' :: CmafAdditionalManifest -> Maybe [Text]
$sel:manifestNameModifier:CmafAdditionalManifest' :: CmafAdditionalManifest -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"manifestNameModifier" 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
manifestNameModifier,
(Text
"selectedOutputs" 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]
selectedOutputs
]
)