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