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