{-# 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.Lens as Lens
import Amazonka.MediaConvert.Types.LanguageCode
import qualified Amazonka.Prelude as Prelude
data HlsRenditionGroupSettings = HlsRenditionGroupSettings'
{
HlsRenditionGroupSettings -> Maybe Text
renditionName :: Prelude.Maybe Prelude.Text,
HlsRenditionGroupSettings -> Maybe Text
renditionGroupId :: Prelude.Maybe Prelude.Text,
HlsRenditionGroupSettings -> Maybe LanguageCode
renditionLanguageCode :: Prelude.Maybe LanguageCode
}
deriving (HlsRenditionGroupSettings -> HlsRenditionGroupSettings -> Bool
(HlsRenditionGroupSettings -> HlsRenditionGroupSettings -> Bool)
-> (HlsRenditionGroupSettings -> HlsRenditionGroupSettings -> Bool)
-> Eq HlsRenditionGroupSettings
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]
(Int -> ReadS HlsRenditionGroupSettings)
-> ReadS [HlsRenditionGroupSettings]
-> ReadPrec HlsRenditionGroupSettings
-> ReadPrec [HlsRenditionGroupSettings]
-> Read 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
(Int -> HlsRenditionGroupSettings -> ShowS)
-> (HlsRenditionGroupSettings -> String)
-> ([HlsRenditionGroupSettings] -> ShowS)
-> Show HlsRenditionGroupSettings
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.
HlsRenditionGroupSettings -> Rep HlsRenditionGroupSettings x)
-> (forall x.
Rep HlsRenditionGroupSettings x -> HlsRenditionGroupSettings)
-> Generic HlsRenditionGroupSettings
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' :: Maybe Text
-> Maybe Text -> Maybe LanguageCode -> HlsRenditionGroupSettings
HlsRenditionGroupSettings'
{ $sel:renditionName:HlsRenditionGroupSettings' :: Maybe Text
renditionName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:renditionGroupId:HlsRenditionGroupSettings' :: Maybe Text
renditionGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:renditionLanguageCode:HlsRenditionGroupSettings' :: Maybe LanguageCode
renditionLanguageCode = Maybe LanguageCode
forall a. Maybe a
Prelude.Nothing
}
hlsRenditionGroupSettings_renditionName :: Lens.Lens' HlsRenditionGroupSettings (Prelude.Maybe Prelude.Text)
hlsRenditionGroupSettings_renditionName :: (Maybe Text -> f (Maybe Text))
-> HlsRenditionGroupSettings -> f HlsRenditionGroupSettings
hlsRenditionGroupSettings_renditionName = (HlsRenditionGroupSettings -> Maybe Text)
-> (HlsRenditionGroupSettings
-> Maybe Text -> HlsRenditionGroupSettings)
-> Lens
HlsRenditionGroupSettings
HlsRenditionGroupSettings
(Maybe Text)
(Maybe Text)
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)
hlsRenditionGroupSettings_renditionGroupId :: Lens.Lens' HlsRenditionGroupSettings (Prelude.Maybe Prelude.Text)
hlsRenditionGroupSettings_renditionGroupId :: (Maybe Text -> f (Maybe Text))
-> HlsRenditionGroupSettings -> f HlsRenditionGroupSettings
hlsRenditionGroupSettings_renditionGroupId = (HlsRenditionGroupSettings -> Maybe Text)
-> (HlsRenditionGroupSettings
-> Maybe Text -> HlsRenditionGroupSettings)
-> Lens
HlsRenditionGroupSettings
HlsRenditionGroupSettings
(Maybe Text)
(Maybe Text)
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 :: (Maybe LanguageCode -> f (Maybe LanguageCode))
-> HlsRenditionGroupSettings -> f HlsRenditionGroupSettings
hlsRenditionGroupSettings_renditionLanguageCode = (HlsRenditionGroupSettings -> Maybe LanguageCode)
-> (HlsRenditionGroupSettings
-> Maybe LanguageCode -> HlsRenditionGroupSettings)
-> Lens
HlsRenditionGroupSettings
HlsRenditionGroupSettings
(Maybe LanguageCode)
(Maybe LanguageCode)
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)
instance Core.FromJSON HlsRenditionGroupSettings where
parseJSON :: Value -> Parser HlsRenditionGroupSettings
parseJSON =
String
-> (Object -> Parser HlsRenditionGroupSettings)
-> Value
-> Parser HlsRenditionGroupSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"HlsRenditionGroupSettings"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe LanguageCode -> HlsRenditionGroupSettings
HlsRenditionGroupSettings'
(Maybe Text
-> Maybe Text -> Maybe LanguageCode -> HlsRenditionGroupSettings)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe LanguageCode -> HlsRenditionGroupSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"renditionName")
Parser
(Maybe Text -> Maybe LanguageCode -> HlsRenditionGroupSettings)
-> Parser (Maybe Text)
-> Parser (Maybe LanguageCode -> HlsRenditionGroupSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"renditionGroupId")
Parser (Maybe LanguageCode -> HlsRenditionGroupSettings)
-> Parser (Maybe LanguageCode) -> Parser HlsRenditionGroupSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LanguageCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"renditionLanguageCode")
)
instance Prelude.Hashable HlsRenditionGroupSettings
instance Prelude.NFData HlsRenditionGroupSettings
instance Core.ToJSON HlsRenditionGroupSettings where
toJSON :: HlsRenditionGroupSettings -> Value
toJSON HlsRenditionGroupSettings' {Maybe Text
Maybe LanguageCode
renditionLanguageCode :: Maybe LanguageCode
renditionGroupId :: Maybe Text
renditionName :: Maybe Text
$sel:renditionLanguageCode:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> Maybe LanguageCode
$sel:renditionGroupId:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> Maybe Text
$sel:renditionName:HlsRenditionGroupSettings' :: HlsRenditionGroupSettings -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"renditionName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
renditionName,
(Text
"renditionGroupId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
renditionGroupId,
(Text
"renditionLanguageCode" Text -> LanguageCode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(LanguageCode -> Pair) -> Maybe LanguageCode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LanguageCode
renditionLanguageCode
]
)