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