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