{-# 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.HlsRenditionGroupSettings 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 HlsRenditionGroupSettings = HlsRenditionGroupSettings'
{
HlsRenditionGroupSettings -> Maybe Text
renditionGroupId :: Prelude.Maybe Prelude.Text,
HlsRenditionGroupSettings -> Maybe LanguageCode
renditionLanguageCode :: Prelude.Maybe LanguageCode,
HlsRenditionGroupSettings -> Maybe Text
renditionName :: Prelude.Maybe Prelude.Text
}
deriving (HlsRenditionGroupSettings -> HlsRenditionGroupSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsRenditionGroupSettings -> HlsRenditionGroupSettings -> Bool
$c/= :: HlsRenditionGroupSettings -> HlsRenditionGroupSettings -> Bool
== :: HlsRenditionGroupSettings -> HlsRenditionGroupSettings -> Bool
$c== :: HlsRenditionGroupSettings -> HlsRenditionGroupSettings -> Bool
Prelude.Eq, ReadPrec [HlsRenditionGroupSettings]
ReadPrec HlsRenditionGroupSettings
Int -> ReadS HlsRenditionGroupSettings
ReadS [HlsRenditionGroupSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsRenditionGroupSettings]
$creadListPrec :: ReadPrec [HlsRenditionGroupSettings]
readPrec :: ReadPrec HlsRenditionGroupSettings
$creadPrec :: ReadPrec HlsRenditionGroupSettings
readList :: ReadS [HlsRenditionGroupSettings]
$creadList :: ReadS [HlsRenditionGroupSettings]
readsPrec :: Int -> ReadS HlsRenditionGroupSettings
$creadsPrec :: Int -> ReadS HlsRenditionGroupSettings
Prelude.Read, Int -> HlsRenditionGroupSettings -> ShowS
[HlsRenditionGroupSettings] -> ShowS
HlsRenditionGroupSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsRenditionGroupSettings] -> ShowS
$cshowList :: [HlsRenditionGroupSettings] -> ShowS
show :: HlsRenditionGroupSettings -> String
$cshow :: HlsRenditionGroupSettings -> String
showsPrec :: Int -> HlsRenditionGroupSettings -> ShowS
$cshowsPrec :: Int -> HlsRenditionGroupSettings -> ShowS
Prelude.Show, forall x.
Rep HlsRenditionGroupSettings x -> HlsRenditionGroupSettings
forall x.
HlsRenditionGroupSettings -> Rep HlsRenditionGroupSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep HlsRenditionGroupSettings x -> HlsRenditionGroupSettings
$cfrom :: forall x.
HlsRenditionGroupSettings -> Rep HlsRenditionGroupSettings x
Prelude.Generic)
newHlsRenditionGroupSettings ::
HlsRenditionGroupSettings
newHlsRenditionGroupSettings :: HlsRenditionGroupSettings
newHlsRenditionGroupSettings =
HlsRenditionGroupSettings'
{ $sel:renditionGroupId:HlsRenditionGroupSettings' :: Maybe Text
renditionGroupId =
forall a. Maybe a
Prelude.Nothing,
$sel:renditionLanguageCode:HlsRenditionGroupSettings' :: Maybe LanguageCode
renditionLanguageCode = forall a. Maybe a
Prelude.Nothing,
$sel:renditionName:HlsRenditionGroupSettings' :: Maybe Text
renditionName = forall a. Maybe a
Prelude.Nothing
}
hlsRenditionGroupSettings_renditionGroupId :: Lens.Lens' HlsRenditionGroupSettings (Prelude.Maybe Prelude.Text)
hlsRenditionGroupSettings_renditionGroupId :: Lens' HlsRenditionGroupSettings (Maybe Text)
hlsRenditionGroupSettings_renditionGroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsRenditionGroupSettings' {Maybe Text
renditionGroupId :: Maybe Text
$sel:renditionGroupId:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> Maybe Text
renditionGroupId} -> Maybe Text
renditionGroupId) (\s :: HlsRenditionGroupSettings
s@HlsRenditionGroupSettings' {} Maybe Text
a -> HlsRenditionGroupSettings
s {$sel:renditionGroupId:HlsRenditionGroupSettings' :: Maybe Text
renditionGroupId = Maybe Text
a} :: HlsRenditionGroupSettings)
hlsRenditionGroupSettings_renditionLanguageCode :: Lens.Lens' HlsRenditionGroupSettings (Prelude.Maybe LanguageCode)
hlsRenditionGroupSettings_renditionLanguageCode :: Lens' HlsRenditionGroupSettings (Maybe LanguageCode)
hlsRenditionGroupSettings_renditionLanguageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsRenditionGroupSettings' {Maybe LanguageCode
renditionLanguageCode :: Maybe LanguageCode
$sel:renditionLanguageCode:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> Maybe LanguageCode
renditionLanguageCode} -> Maybe LanguageCode
renditionLanguageCode) (\s :: HlsRenditionGroupSettings
s@HlsRenditionGroupSettings' {} Maybe LanguageCode
a -> HlsRenditionGroupSettings
s {$sel:renditionLanguageCode:HlsRenditionGroupSettings' :: Maybe LanguageCode
renditionLanguageCode = Maybe LanguageCode
a} :: HlsRenditionGroupSettings)
hlsRenditionGroupSettings_renditionName :: Lens.Lens' HlsRenditionGroupSettings (Prelude.Maybe Prelude.Text)
hlsRenditionGroupSettings_renditionName :: Lens' HlsRenditionGroupSettings (Maybe Text)
hlsRenditionGroupSettings_renditionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsRenditionGroupSettings' {Maybe Text
renditionName :: Maybe Text
$sel:renditionName:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> Maybe Text
renditionName} -> Maybe Text
renditionName) (\s :: HlsRenditionGroupSettings
s@HlsRenditionGroupSettings' {} Maybe Text
a -> HlsRenditionGroupSettings
s {$sel:renditionName:HlsRenditionGroupSettings' :: Maybe Text
renditionName = Maybe Text
a} :: HlsRenditionGroupSettings)
instance Data.FromJSON HlsRenditionGroupSettings where
parseJSON :: Value -> Parser HlsRenditionGroupSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"HlsRenditionGroupSettings"
( \Object
x ->
Maybe Text
-> Maybe LanguageCode -> Maybe Text -> HlsRenditionGroupSettings
HlsRenditionGroupSettings'
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 HlsRenditionGroupSettings where
hashWithSalt :: Int -> HlsRenditionGroupSettings -> Int
hashWithSalt Int
_salt HlsRenditionGroupSettings' {Maybe Text
Maybe LanguageCode
renditionName :: Maybe Text
renditionLanguageCode :: Maybe LanguageCode
renditionGroupId :: Maybe Text
$sel:renditionName:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> Maybe Text
$sel:renditionLanguageCode:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> Maybe LanguageCode
$sel:renditionGroupId:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> 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 HlsRenditionGroupSettings where
rnf :: HlsRenditionGroupSettings -> ()
rnf HlsRenditionGroupSettings' {Maybe Text
Maybe LanguageCode
renditionName :: Maybe Text
renditionLanguageCode :: Maybe LanguageCode
renditionGroupId :: Maybe Text
$sel:renditionName:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> Maybe Text
$sel:renditionLanguageCode:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> Maybe LanguageCode
$sel:renditionGroupId:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> 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 HlsRenditionGroupSettings where
toJSON :: HlsRenditionGroupSettings -> Value
toJSON HlsRenditionGroupSettings' {Maybe Text
Maybe LanguageCode
renditionName :: Maybe Text
renditionLanguageCode :: Maybe LanguageCode
renditionGroupId :: Maybe Text
$sel:renditionName:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> Maybe Text
$sel:renditionLanguageCode:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> Maybe LanguageCode
$sel:renditionGroupId:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> 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
]
)