{-# 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.ExtendedDataServices where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.CopyProtectionAction
import Amazonka.MediaConvert.Types.VchipAction
import qualified Amazonka.Prelude as Prelude
data ExtendedDataServices = ExtendedDataServices'
{
ExtendedDataServices -> Maybe VchipAction
vchipAction :: Prelude.Maybe VchipAction,
ExtendedDataServices -> Maybe CopyProtectionAction
copyProtectionAction :: Prelude.Maybe CopyProtectionAction
}
deriving (ExtendedDataServices -> ExtendedDataServices -> Bool
(ExtendedDataServices -> ExtendedDataServices -> Bool)
-> (ExtendedDataServices -> ExtendedDataServices -> Bool)
-> Eq ExtendedDataServices
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExtendedDataServices -> ExtendedDataServices -> Bool
$c/= :: ExtendedDataServices -> ExtendedDataServices -> Bool
== :: ExtendedDataServices -> ExtendedDataServices -> Bool
$c== :: ExtendedDataServices -> ExtendedDataServices -> Bool
Prelude.Eq, ReadPrec [ExtendedDataServices]
ReadPrec ExtendedDataServices
Int -> ReadS ExtendedDataServices
ReadS [ExtendedDataServices]
(Int -> ReadS ExtendedDataServices)
-> ReadS [ExtendedDataServices]
-> ReadPrec ExtendedDataServices
-> ReadPrec [ExtendedDataServices]
-> Read ExtendedDataServices
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExtendedDataServices]
$creadListPrec :: ReadPrec [ExtendedDataServices]
readPrec :: ReadPrec ExtendedDataServices
$creadPrec :: ReadPrec ExtendedDataServices
readList :: ReadS [ExtendedDataServices]
$creadList :: ReadS [ExtendedDataServices]
readsPrec :: Int -> ReadS ExtendedDataServices
$creadsPrec :: Int -> ReadS ExtendedDataServices
Prelude.Read, Int -> ExtendedDataServices -> ShowS
[ExtendedDataServices] -> ShowS
ExtendedDataServices -> String
(Int -> ExtendedDataServices -> ShowS)
-> (ExtendedDataServices -> String)
-> ([ExtendedDataServices] -> ShowS)
-> Show ExtendedDataServices
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExtendedDataServices] -> ShowS
$cshowList :: [ExtendedDataServices] -> ShowS
show :: ExtendedDataServices -> String
$cshow :: ExtendedDataServices -> String
showsPrec :: Int -> ExtendedDataServices -> ShowS
$cshowsPrec :: Int -> ExtendedDataServices -> ShowS
Prelude.Show, (forall x. ExtendedDataServices -> Rep ExtendedDataServices x)
-> (forall x. Rep ExtendedDataServices x -> ExtendedDataServices)
-> Generic ExtendedDataServices
forall x. Rep ExtendedDataServices x -> ExtendedDataServices
forall x. ExtendedDataServices -> Rep ExtendedDataServices x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExtendedDataServices x -> ExtendedDataServices
$cfrom :: forall x. ExtendedDataServices -> Rep ExtendedDataServices x
Prelude.Generic)
newExtendedDataServices ::
ExtendedDataServices
newExtendedDataServices :: ExtendedDataServices
newExtendedDataServices =
ExtendedDataServices' :: Maybe VchipAction
-> Maybe CopyProtectionAction -> ExtendedDataServices
ExtendedDataServices'
{ $sel:vchipAction:ExtendedDataServices' :: Maybe VchipAction
vchipAction =
Maybe VchipAction
forall a. Maybe a
Prelude.Nothing,
$sel:copyProtectionAction:ExtendedDataServices' :: Maybe CopyProtectionAction
copyProtectionAction = Maybe CopyProtectionAction
forall a. Maybe a
Prelude.Nothing
}
extendedDataServices_vchipAction :: Lens.Lens' ExtendedDataServices (Prelude.Maybe VchipAction)
extendedDataServices_vchipAction :: (Maybe VchipAction -> f (Maybe VchipAction))
-> ExtendedDataServices -> f ExtendedDataServices
extendedDataServices_vchipAction = (ExtendedDataServices -> Maybe VchipAction)
-> (ExtendedDataServices
-> Maybe VchipAction -> ExtendedDataServices)
-> Lens
ExtendedDataServices
ExtendedDataServices
(Maybe VchipAction)
(Maybe VchipAction)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExtendedDataServices' {Maybe VchipAction
vchipAction :: Maybe VchipAction
$sel:vchipAction:ExtendedDataServices' :: ExtendedDataServices -> Maybe VchipAction
vchipAction} -> Maybe VchipAction
vchipAction) (\s :: ExtendedDataServices
s@ExtendedDataServices' {} Maybe VchipAction
a -> ExtendedDataServices
s {$sel:vchipAction:ExtendedDataServices' :: Maybe VchipAction
vchipAction = Maybe VchipAction
a} :: ExtendedDataServices)
extendedDataServices_copyProtectionAction :: Lens.Lens' ExtendedDataServices (Prelude.Maybe CopyProtectionAction)
extendedDataServices_copyProtectionAction :: (Maybe CopyProtectionAction -> f (Maybe CopyProtectionAction))
-> ExtendedDataServices -> f ExtendedDataServices
extendedDataServices_copyProtectionAction = (ExtendedDataServices -> Maybe CopyProtectionAction)
-> (ExtendedDataServices
-> Maybe CopyProtectionAction -> ExtendedDataServices)
-> Lens
ExtendedDataServices
ExtendedDataServices
(Maybe CopyProtectionAction)
(Maybe CopyProtectionAction)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExtendedDataServices' {Maybe CopyProtectionAction
copyProtectionAction :: Maybe CopyProtectionAction
$sel:copyProtectionAction:ExtendedDataServices' :: ExtendedDataServices -> Maybe CopyProtectionAction
copyProtectionAction} -> Maybe CopyProtectionAction
copyProtectionAction) (\s :: ExtendedDataServices
s@ExtendedDataServices' {} Maybe CopyProtectionAction
a -> ExtendedDataServices
s {$sel:copyProtectionAction:ExtendedDataServices' :: Maybe CopyProtectionAction
copyProtectionAction = Maybe CopyProtectionAction
a} :: ExtendedDataServices)
instance Core.FromJSON ExtendedDataServices where
parseJSON :: Value -> Parser ExtendedDataServices
parseJSON =
String
-> (Object -> Parser ExtendedDataServices)
-> Value
-> Parser ExtendedDataServices
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ExtendedDataServices"
( \Object
x ->
Maybe VchipAction
-> Maybe CopyProtectionAction -> ExtendedDataServices
ExtendedDataServices'
(Maybe VchipAction
-> Maybe CopyProtectionAction -> ExtendedDataServices)
-> Parser (Maybe VchipAction)
-> Parser (Maybe CopyProtectionAction -> ExtendedDataServices)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe VchipAction)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"vchipAction")
Parser (Maybe CopyProtectionAction -> ExtendedDataServices)
-> Parser (Maybe CopyProtectionAction)
-> Parser ExtendedDataServices
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CopyProtectionAction)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"copyProtectionAction")
)
instance Prelude.Hashable ExtendedDataServices
instance Prelude.NFData ExtendedDataServices
instance Core.ToJSON ExtendedDataServices where
toJSON :: ExtendedDataServices -> Value
toJSON ExtendedDataServices' {Maybe CopyProtectionAction
Maybe VchipAction
copyProtectionAction :: Maybe CopyProtectionAction
vchipAction :: Maybe VchipAction
$sel:copyProtectionAction:ExtendedDataServices' :: ExtendedDataServices -> Maybe CopyProtectionAction
$sel:vchipAction:ExtendedDataServices' :: ExtendedDataServices -> Maybe VchipAction
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"vchipAction" Text -> VchipAction -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (VchipAction -> Pair) -> Maybe VchipAction -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VchipAction
vchipAction,
(Text
"copyProtectionAction" Text -> CopyProtectionAction -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(CopyProtectionAction -> Pair)
-> Maybe CopyProtectionAction -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CopyProtectionAction
copyProtectionAction
]
)