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