{-# 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.MediaLive.Types.HlsCdnSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.HlsAkamaiSettings
import Amazonka.MediaLive.Types.HlsBasicPutSettings
import Amazonka.MediaLive.Types.HlsMediaStoreSettings
import Amazonka.MediaLive.Types.HlsS3Settings
import Amazonka.MediaLive.Types.HlsWebdavSettings
import qualified Amazonka.Prelude as Prelude
data HlsCdnSettings = HlsCdnSettings'
{ HlsCdnSettings -> Maybe HlsAkamaiSettings
hlsAkamaiSettings :: Prelude.Maybe HlsAkamaiSettings,
HlsCdnSettings -> Maybe HlsBasicPutSettings
hlsBasicPutSettings :: Prelude.Maybe HlsBasicPutSettings,
HlsCdnSettings -> Maybe HlsMediaStoreSettings
hlsMediaStoreSettings :: Prelude.Maybe HlsMediaStoreSettings,
HlsCdnSettings -> Maybe HlsS3Settings
hlsS3Settings :: Prelude.Maybe HlsS3Settings,
HlsCdnSettings -> Maybe HlsWebdavSettings
hlsWebdavSettings :: Prelude.Maybe HlsWebdavSettings
}
deriving (HlsCdnSettings -> HlsCdnSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsCdnSettings -> HlsCdnSettings -> Bool
$c/= :: HlsCdnSettings -> HlsCdnSettings -> Bool
== :: HlsCdnSettings -> HlsCdnSettings -> Bool
$c== :: HlsCdnSettings -> HlsCdnSettings -> Bool
Prelude.Eq, ReadPrec [HlsCdnSettings]
ReadPrec HlsCdnSettings
Int -> ReadS HlsCdnSettings
ReadS [HlsCdnSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsCdnSettings]
$creadListPrec :: ReadPrec [HlsCdnSettings]
readPrec :: ReadPrec HlsCdnSettings
$creadPrec :: ReadPrec HlsCdnSettings
readList :: ReadS [HlsCdnSettings]
$creadList :: ReadS [HlsCdnSettings]
readsPrec :: Int -> ReadS HlsCdnSettings
$creadsPrec :: Int -> ReadS HlsCdnSettings
Prelude.Read, Int -> HlsCdnSettings -> ShowS
[HlsCdnSettings] -> ShowS
HlsCdnSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsCdnSettings] -> ShowS
$cshowList :: [HlsCdnSettings] -> ShowS
show :: HlsCdnSettings -> String
$cshow :: HlsCdnSettings -> String
showsPrec :: Int -> HlsCdnSettings -> ShowS
$cshowsPrec :: Int -> HlsCdnSettings -> ShowS
Prelude.Show, forall x. Rep HlsCdnSettings x -> HlsCdnSettings
forall x. HlsCdnSettings -> Rep HlsCdnSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HlsCdnSettings x -> HlsCdnSettings
$cfrom :: forall x. HlsCdnSettings -> Rep HlsCdnSettings x
Prelude.Generic)
newHlsCdnSettings ::
HlsCdnSettings
newHlsCdnSettings :: HlsCdnSettings
newHlsCdnSettings =
HlsCdnSettings'
{ $sel:hlsAkamaiSettings:HlsCdnSettings' :: Maybe HlsAkamaiSettings
hlsAkamaiSettings =
forall a. Maybe a
Prelude.Nothing,
$sel:hlsBasicPutSettings:HlsCdnSettings' :: Maybe HlsBasicPutSettings
hlsBasicPutSettings = forall a. Maybe a
Prelude.Nothing,
$sel:hlsMediaStoreSettings:HlsCdnSettings' :: Maybe HlsMediaStoreSettings
hlsMediaStoreSettings = forall a. Maybe a
Prelude.Nothing,
$sel:hlsS3Settings:HlsCdnSettings' :: Maybe HlsS3Settings
hlsS3Settings = forall a. Maybe a
Prelude.Nothing,
$sel:hlsWebdavSettings:HlsCdnSettings' :: Maybe HlsWebdavSettings
hlsWebdavSettings = forall a. Maybe a
Prelude.Nothing
}
hlsCdnSettings_hlsAkamaiSettings :: Lens.Lens' HlsCdnSettings (Prelude.Maybe HlsAkamaiSettings)
hlsCdnSettings_hlsAkamaiSettings :: Lens' HlsCdnSettings (Maybe HlsAkamaiSettings)
hlsCdnSettings_hlsAkamaiSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsCdnSettings' {Maybe HlsAkamaiSettings
hlsAkamaiSettings :: Maybe HlsAkamaiSettings
$sel:hlsAkamaiSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsAkamaiSettings
hlsAkamaiSettings} -> Maybe HlsAkamaiSettings
hlsAkamaiSettings) (\s :: HlsCdnSettings
s@HlsCdnSettings' {} Maybe HlsAkamaiSettings
a -> HlsCdnSettings
s {$sel:hlsAkamaiSettings:HlsCdnSettings' :: Maybe HlsAkamaiSettings
hlsAkamaiSettings = Maybe HlsAkamaiSettings
a} :: HlsCdnSettings)
hlsCdnSettings_hlsBasicPutSettings :: Lens.Lens' HlsCdnSettings (Prelude.Maybe HlsBasicPutSettings)
hlsCdnSettings_hlsBasicPutSettings :: Lens' HlsCdnSettings (Maybe HlsBasicPutSettings)
hlsCdnSettings_hlsBasicPutSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsCdnSettings' {Maybe HlsBasicPutSettings
hlsBasicPutSettings :: Maybe HlsBasicPutSettings
$sel:hlsBasicPutSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsBasicPutSettings
hlsBasicPutSettings} -> Maybe HlsBasicPutSettings
hlsBasicPutSettings) (\s :: HlsCdnSettings
s@HlsCdnSettings' {} Maybe HlsBasicPutSettings
a -> HlsCdnSettings
s {$sel:hlsBasicPutSettings:HlsCdnSettings' :: Maybe HlsBasicPutSettings
hlsBasicPutSettings = Maybe HlsBasicPutSettings
a} :: HlsCdnSettings)
hlsCdnSettings_hlsMediaStoreSettings :: Lens.Lens' HlsCdnSettings (Prelude.Maybe HlsMediaStoreSettings)
hlsCdnSettings_hlsMediaStoreSettings :: Lens' HlsCdnSettings (Maybe HlsMediaStoreSettings)
hlsCdnSettings_hlsMediaStoreSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsCdnSettings' {Maybe HlsMediaStoreSettings
hlsMediaStoreSettings :: Maybe HlsMediaStoreSettings
$sel:hlsMediaStoreSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsMediaStoreSettings
hlsMediaStoreSettings} -> Maybe HlsMediaStoreSettings
hlsMediaStoreSettings) (\s :: HlsCdnSettings
s@HlsCdnSettings' {} Maybe HlsMediaStoreSettings
a -> HlsCdnSettings
s {$sel:hlsMediaStoreSettings:HlsCdnSettings' :: Maybe HlsMediaStoreSettings
hlsMediaStoreSettings = Maybe HlsMediaStoreSettings
a} :: HlsCdnSettings)
hlsCdnSettings_hlsS3Settings :: Lens.Lens' HlsCdnSettings (Prelude.Maybe HlsS3Settings)
hlsCdnSettings_hlsS3Settings :: Lens' HlsCdnSettings (Maybe HlsS3Settings)
hlsCdnSettings_hlsS3Settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsCdnSettings' {Maybe HlsS3Settings
hlsS3Settings :: Maybe HlsS3Settings
$sel:hlsS3Settings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsS3Settings
hlsS3Settings} -> Maybe HlsS3Settings
hlsS3Settings) (\s :: HlsCdnSettings
s@HlsCdnSettings' {} Maybe HlsS3Settings
a -> HlsCdnSettings
s {$sel:hlsS3Settings:HlsCdnSettings' :: Maybe HlsS3Settings
hlsS3Settings = Maybe HlsS3Settings
a} :: HlsCdnSettings)
hlsCdnSettings_hlsWebdavSettings :: Lens.Lens' HlsCdnSettings (Prelude.Maybe HlsWebdavSettings)
hlsCdnSettings_hlsWebdavSettings :: Lens' HlsCdnSettings (Maybe HlsWebdavSettings)
hlsCdnSettings_hlsWebdavSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsCdnSettings' {Maybe HlsWebdavSettings
hlsWebdavSettings :: Maybe HlsWebdavSettings
$sel:hlsWebdavSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsWebdavSettings
hlsWebdavSettings} -> Maybe HlsWebdavSettings
hlsWebdavSettings) (\s :: HlsCdnSettings
s@HlsCdnSettings' {} Maybe HlsWebdavSettings
a -> HlsCdnSettings
s {$sel:hlsWebdavSettings:HlsCdnSettings' :: Maybe HlsWebdavSettings
hlsWebdavSettings = Maybe HlsWebdavSettings
a} :: HlsCdnSettings)
instance Data.FromJSON HlsCdnSettings where
parseJSON :: Value -> Parser HlsCdnSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"HlsCdnSettings"
( \Object
x ->
Maybe HlsAkamaiSettings
-> Maybe HlsBasicPutSettings
-> Maybe HlsMediaStoreSettings
-> Maybe HlsS3Settings
-> Maybe HlsWebdavSettings
-> HlsCdnSettings
HlsCdnSettings'
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
"hlsAkamaiSettings")
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
"hlsBasicPutSettings")
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
"hlsMediaStoreSettings")
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
"hlsS3Settings")
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
"hlsWebdavSettings")
)
instance Prelude.Hashable HlsCdnSettings where
hashWithSalt :: Int -> HlsCdnSettings -> Int
hashWithSalt Int
_salt HlsCdnSettings' {Maybe HlsAkamaiSettings
Maybe HlsBasicPutSettings
Maybe HlsMediaStoreSettings
Maybe HlsWebdavSettings
Maybe HlsS3Settings
hlsWebdavSettings :: Maybe HlsWebdavSettings
hlsS3Settings :: Maybe HlsS3Settings
hlsMediaStoreSettings :: Maybe HlsMediaStoreSettings
hlsBasicPutSettings :: Maybe HlsBasicPutSettings
hlsAkamaiSettings :: Maybe HlsAkamaiSettings
$sel:hlsWebdavSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsWebdavSettings
$sel:hlsS3Settings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsS3Settings
$sel:hlsMediaStoreSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsMediaStoreSettings
$sel:hlsBasicPutSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsBasicPutSettings
$sel:hlsAkamaiSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsAkamaiSettings
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsAkamaiSettings
hlsAkamaiSettings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsBasicPutSettings
hlsBasicPutSettings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsMediaStoreSettings
hlsMediaStoreSettings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsS3Settings
hlsS3Settings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsWebdavSettings
hlsWebdavSettings
instance Prelude.NFData HlsCdnSettings where
rnf :: HlsCdnSettings -> ()
rnf HlsCdnSettings' {Maybe HlsAkamaiSettings
Maybe HlsBasicPutSettings
Maybe HlsMediaStoreSettings
Maybe HlsWebdavSettings
Maybe HlsS3Settings
hlsWebdavSettings :: Maybe HlsWebdavSettings
hlsS3Settings :: Maybe HlsS3Settings
hlsMediaStoreSettings :: Maybe HlsMediaStoreSettings
hlsBasicPutSettings :: Maybe HlsBasicPutSettings
hlsAkamaiSettings :: Maybe HlsAkamaiSettings
$sel:hlsWebdavSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsWebdavSettings
$sel:hlsS3Settings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsS3Settings
$sel:hlsMediaStoreSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsMediaStoreSettings
$sel:hlsBasicPutSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsBasicPutSettings
$sel:hlsAkamaiSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsAkamaiSettings
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsAkamaiSettings
hlsAkamaiSettings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsBasicPutSettings
hlsBasicPutSettings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsMediaStoreSettings
hlsMediaStoreSettings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsS3Settings
hlsS3Settings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsWebdavSettings
hlsWebdavSettings
instance Data.ToJSON HlsCdnSettings where
toJSON :: HlsCdnSettings -> Value
toJSON HlsCdnSettings' {Maybe HlsAkamaiSettings
Maybe HlsBasicPutSettings
Maybe HlsMediaStoreSettings
Maybe HlsWebdavSettings
Maybe HlsS3Settings
hlsWebdavSettings :: Maybe HlsWebdavSettings
hlsS3Settings :: Maybe HlsS3Settings
hlsMediaStoreSettings :: Maybe HlsMediaStoreSettings
hlsBasicPutSettings :: Maybe HlsBasicPutSettings
hlsAkamaiSettings :: Maybe HlsAkamaiSettings
$sel:hlsWebdavSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsWebdavSettings
$sel:hlsS3Settings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsS3Settings
$sel:hlsMediaStoreSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsMediaStoreSettings
$sel:hlsBasicPutSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsBasicPutSettings
$sel:hlsAkamaiSettings:HlsCdnSettings' :: HlsCdnSettings -> Maybe HlsAkamaiSettings
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"hlsAkamaiSettings" 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 HlsAkamaiSettings
hlsAkamaiSettings,
(Key
"hlsBasicPutSettings" 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 HlsBasicPutSettings
hlsBasicPutSettings,
(Key
"hlsMediaStoreSettings" 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 HlsMediaStoreSettings
hlsMediaStoreSettings,
(Key
"hlsS3Settings" 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 HlsS3Settings
hlsS3Settings,
(Key
"hlsWebdavSettings" 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 HlsWebdavSettings
hlsWebdavSettings
]
)