{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types.CopyProtectionAction
import Amazonka.MediaConvert.Types.VchipAction
import qualified Amazonka.Prelude as Prelude
data ExtendedDataServices = ExtendedDataServices'
{
ExtendedDataServices -> Maybe CopyProtectionAction
copyProtectionAction :: Prelude.Maybe CopyProtectionAction,
ExtendedDataServices -> Maybe VchipAction
vchipAction :: Prelude.Maybe VchipAction
}
deriving (ExtendedDataServices -> ExtendedDataServices -> Bool
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]
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
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. 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'
{ $sel:copyProtectionAction:ExtendedDataServices' :: Maybe CopyProtectionAction
copyProtectionAction =
forall a. Maybe a
Prelude.Nothing,
$sel:vchipAction:ExtendedDataServices' :: Maybe VchipAction
vchipAction = forall a. Maybe a
Prelude.Nothing
}
extendedDataServices_copyProtectionAction :: Lens.Lens' ExtendedDataServices (Prelude.Maybe CopyProtectionAction)
extendedDataServices_copyProtectionAction :: Lens' ExtendedDataServices (Maybe CopyProtectionAction)
extendedDataServices_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)
extendedDataServices_vchipAction :: Lens.Lens' ExtendedDataServices (Prelude.Maybe VchipAction)
extendedDataServices_vchipAction :: Lens' ExtendedDataServices (Maybe VchipAction)
extendedDataServices_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)
instance Data.FromJSON ExtendedDataServices where
parseJSON :: Value -> Parser ExtendedDataServices
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ExtendedDataServices"
( \Object
x ->
Maybe CopyProtectionAction
-> Maybe VchipAction -> ExtendedDataServices
ExtendedDataServices'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"copyProtectionAction")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"vchipAction")
)
instance Prelude.Hashable ExtendedDataServices where
hashWithSalt :: Int -> ExtendedDataServices -> Int
hashWithSalt Int
_salt ExtendedDataServices' {Maybe CopyProtectionAction
Maybe VchipAction
vchipAction :: Maybe VchipAction
copyProtectionAction :: Maybe CopyProtectionAction
$sel:vchipAction:ExtendedDataServices' :: ExtendedDataServices -> Maybe VchipAction
$sel:copyProtectionAction:ExtendedDataServices' :: ExtendedDataServices -> Maybe CopyProtectionAction
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CopyProtectionAction
copyProtectionAction
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VchipAction
vchipAction
instance Prelude.NFData ExtendedDataServices where
rnf :: ExtendedDataServices -> ()
rnf ExtendedDataServices' {Maybe CopyProtectionAction
Maybe VchipAction
vchipAction :: Maybe VchipAction
copyProtectionAction :: Maybe CopyProtectionAction
$sel:vchipAction:ExtendedDataServices' :: ExtendedDataServices -> Maybe VchipAction
$sel:copyProtectionAction:ExtendedDataServices' :: ExtendedDataServices -> Maybe CopyProtectionAction
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe CopyProtectionAction
copyProtectionAction
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VchipAction
vchipAction
instance Data.ToJSON ExtendedDataServices where
toJSON :: ExtendedDataServices -> Value
toJSON ExtendedDataServices' {Maybe CopyProtectionAction
Maybe VchipAction
vchipAction :: Maybe VchipAction
copyProtectionAction :: Maybe CopyProtectionAction
$sel:vchipAction:ExtendedDataServices' :: ExtendedDataServices -> Maybe VchipAction
$sel:copyProtectionAction:ExtendedDataServices' :: ExtendedDataServices -> Maybe CopyProtectionAction
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"copyProtectionAction" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CopyProtectionAction
copyProtectionAction,
(Key
"vchipAction" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VchipAction
vchipAction
]
)