{-# 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.TrackSourceSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data TrackSourceSettings = TrackSourceSettings'
{
TrackSourceSettings -> Maybe Natural
trackNumber :: Prelude.Maybe Prelude.Natural
}
deriving (TrackSourceSettings -> TrackSourceSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrackSourceSettings -> TrackSourceSettings -> Bool
$c/= :: TrackSourceSettings -> TrackSourceSettings -> Bool
== :: TrackSourceSettings -> TrackSourceSettings -> Bool
$c== :: TrackSourceSettings -> TrackSourceSettings -> Bool
Prelude.Eq, ReadPrec [TrackSourceSettings]
ReadPrec TrackSourceSettings
Int -> ReadS TrackSourceSettings
ReadS [TrackSourceSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrackSourceSettings]
$creadListPrec :: ReadPrec [TrackSourceSettings]
readPrec :: ReadPrec TrackSourceSettings
$creadPrec :: ReadPrec TrackSourceSettings
readList :: ReadS [TrackSourceSettings]
$creadList :: ReadS [TrackSourceSettings]
readsPrec :: Int -> ReadS TrackSourceSettings
$creadsPrec :: Int -> ReadS TrackSourceSettings
Prelude.Read, Int -> TrackSourceSettings -> ShowS
[TrackSourceSettings] -> ShowS
TrackSourceSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrackSourceSettings] -> ShowS
$cshowList :: [TrackSourceSettings] -> ShowS
show :: TrackSourceSettings -> String
$cshow :: TrackSourceSettings -> String
showsPrec :: Int -> TrackSourceSettings -> ShowS
$cshowsPrec :: Int -> TrackSourceSettings -> ShowS
Prelude.Show, forall x. Rep TrackSourceSettings x -> TrackSourceSettings
forall x. TrackSourceSettings -> Rep TrackSourceSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TrackSourceSettings x -> TrackSourceSettings
$cfrom :: forall x. TrackSourceSettings -> Rep TrackSourceSettings x
Prelude.Generic)
newTrackSourceSettings ::
TrackSourceSettings
newTrackSourceSettings :: TrackSourceSettings
newTrackSourceSettings =
TrackSourceSettings' {$sel:trackNumber:TrackSourceSettings' :: Maybe Natural
trackNumber = forall a. Maybe a
Prelude.Nothing}
trackSourceSettings_trackNumber :: Lens.Lens' TrackSourceSettings (Prelude.Maybe Prelude.Natural)
trackSourceSettings_trackNumber :: Lens' TrackSourceSettings (Maybe Natural)
trackSourceSettings_trackNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrackSourceSettings' {Maybe Natural
trackNumber :: Maybe Natural
$sel:trackNumber:TrackSourceSettings' :: TrackSourceSettings -> Maybe Natural
trackNumber} -> Maybe Natural
trackNumber) (\s :: TrackSourceSettings
s@TrackSourceSettings' {} Maybe Natural
a -> TrackSourceSettings
s {$sel:trackNumber:TrackSourceSettings' :: Maybe Natural
trackNumber = Maybe Natural
a} :: TrackSourceSettings)
instance Data.FromJSON TrackSourceSettings where
parseJSON :: Value -> Parser TrackSourceSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TrackSourceSettings"
( \Object
x ->
Maybe Natural -> TrackSourceSettings
TrackSourceSettings'
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
"trackNumber")
)
instance Prelude.Hashable TrackSourceSettings where
hashWithSalt :: Int -> TrackSourceSettings -> Int
hashWithSalt Int
_salt TrackSourceSettings' {Maybe Natural
trackNumber :: Maybe Natural
$sel:trackNumber:TrackSourceSettings' :: TrackSourceSettings -> Maybe Natural
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
trackNumber
instance Prelude.NFData TrackSourceSettings where
rnf :: TrackSourceSettings -> ()
rnf TrackSourceSettings' {Maybe Natural
trackNumber :: Maybe Natural
$sel:trackNumber:TrackSourceSettings' :: TrackSourceSettings -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
trackNumber
instance Data.ToJSON TrackSourceSettings where
toJSON :: TrackSourceSettings -> Value
toJSON TrackSourceSettings' {Maybe Natural
trackNumber :: Maybe Natural
$sel:trackNumber:TrackSourceSettings' :: TrackSourceSettings -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"trackNumber" 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 Natural
trackNumber]
)