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