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