{-# 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.MediaTailor.Types.DashConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaTailor.Types.OriginManifestType
import qualified Amazonka.Prelude as Prelude
data DashConfiguration = DashConfiguration'
{
DashConfiguration -> Maybe Text
manifestEndpointPrefix :: Prelude.Maybe Prelude.Text,
DashConfiguration -> Maybe Text
mpdLocation :: Prelude.Maybe Prelude.Text,
DashConfiguration -> Maybe OriginManifestType
originManifestType :: Prelude.Maybe OriginManifestType
}
deriving (DashConfiguration -> DashConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DashConfiguration -> DashConfiguration -> Bool
$c/= :: DashConfiguration -> DashConfiguration -> Bool
== :: DashConfiguration -> DashConfiguration -> Bool
$c== :: DashConfiguration -> DashConfiguration -> Bool
Prelude.Eq, ReadPrec [DashConfiguration]
ReadPrec DashConfiguration
Int -> ReadS DashConfiguration
ReadS [DashConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DashConfiguration]
$creadListPrec :: ReadPrec [DashConfiguration]
readPrec :: ReadPrec DashConfiguration
$creadPrec :: ReadPrec DashConfiguration
readList :: ReadS [DashConfiguration]
$creadList :: ReadS [DashConfiguration]
readsPrec :: Int -> ReadS DashConfiguration
$creadsPrec :: Int -> ReadS DashConfiguration
Prelude.Read, Int -> DashConfiguration -> ShowS
[DashConfiguration] -> ShowS
DashConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DashConfiguration] -> ShowS
$cshowList :: [DashConfiguration] -> ShowS
show :: DashConfiguration -> String
$cshow :: DashConfiguration -> String
showsPrec :: Int -> DashConfiguration -> ShowS
$cshowsPrec :: Int -> DashConfiguration -> ShowS
Prelude.Show, forall x. Rep DashConfiguration x -> DashConfiguration
forall x. DashConfiguration -> Rep DashConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DashConfiguration x -> DashConfiguration
$cfrom :: forall x. DashConfiguration -> Rep DashConfiguration x
Prelude.Generic)
newDashConfiguration ::
DashConfiguration
newDashConfiguration :: DashConfiguration
newDashConfiguration =
DashConfiguration'
{ $sel:manifestEndpointPrefix:DashConfiguration' :: Maybe Text
manifestEndpointPrefix =
forall a. Maybe a
Prelude.Nothing,
$sel:mpdLocation:DashConfiguration' :: Maybe Text
mpdLocation = forall a. Maybe a
Prelude.Nothing,
$sel:originManifestType:DashConfiguration' :: Maybe OriginManifestType
originManifestType = forall a. Maybe a
Prelude.Nothing
}
dashConfiguration_manifestEndpointPrefix :: Lens.Lens' DashConfiguration (Prelude.Maybe Prelude.Text)
dashConfiguration_manifestEndpointPrefix :: Lens' DashConfiguration (Maybe Text)
dashConfiguration_manifestEndpointPrefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashConfiguration' {Maybe Text
manifestEndpointPrefix :: Maybe Text
$sel:manifestEndpointPrefix:DashConfiguration' :: DashConfiguration -> Maybe Text
manifestEndpointPrefix} -> Maybe Text
manifestEndpointPrefix) (\s :: DashConfiguration
s@DashConfiguration' {} Maybe Text
a -> DashConfiguration
s {$sel:manifestEndpointPrefix:DashConfiguration' :: Maybe Text
manifestEndpointPrefix = Maybe Text
a} :: DashConfiguration)
dashConfiguration_mpdLocation :: Lens.Lens' DashConfiguration (Prelude.Maybe Prelude.Text)
dashConfiguration_mpdLocation :: Lens' DashConfiguration (Maybe Text)
dashConfiguration_mpdLocation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashConfiguration' {Maybe Text
mpdLocation :: Maybe Text
$sel:mpdLocation:DashConfiguration' :: DashConfiguration -> Maybe Text
mpdLocation} -> Maybe Text
mpdLocation) (\s :: DashConfiguration
s@DashConfiguration' {} Maybe Text
a -> DashConfiguration
s {$sel:mpdLocation:DashConfiguration' :: Maybe Text
mpdLocation = Maybe Text
a} :: DashConfiguration)
dashConfiguration_originManifestType :: Lens.Lens' DashConfiguration (Prelude.Maybe OriginManifestType)
dashConfiguration_originManifestType :: Lens' DashConfiguration (Maybe OriginManifestType)
dashConfiguration_originManifestType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashConfiguration' {Maybe OriginManifestType
originManifestType :: Maybe OriginManifestType
$sel:originManifestType:DashConfiguration' :: DashConfiguration -> Maybe OriginManifestType
originManifestType} -> Maybe OriginManifestType
originManifestType) (\s :: DashConfiguration
s@DashConfiguration' {} Maybe OriginManifestType
a -> DashConfiguration
s {$sel:originManifestType:DashConfiguration' :: Maybe OriginManifestType
originManifestType = Maybe OriginManifestType
a} :: DashConfiguration)
instance Data.FromJSON DashConfiguration where
parseJSON :: Value -> Parser DashConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DashConfiguration"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe OriginManifestType -> DashConfiguration
DashConfiguration'
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
"ManifestEndpointPrefix")
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
"MpdLocation")
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
"OriginManifestType")
)
instance Prelude.Hashable DashConfiguration where
hashWithSalt :: Int -> DashConfiguration -> Int
hashWithSalt Int
_salt DashConfiguration' {Maybe Text
Maybe OriginManifestType
originManifestType :: Maybe OriginManifestType
mpdLocation :: Maybe Text
manifestEndpointPrefix :: Maybe Text
$sel:originManifestType:DashConfiguration' :: DashConfiguration -> Maybe OriginManifestType
$sel:mpdLocation:DashConfiguration' :: DashConfiguration -> Maybe Text
$sel:manifestEndpointPrefix:DashConfiguration' :: DashConfiguration -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
manifestEndpointPrefix
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
mpdLocation
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OriginManifestType
originManifestType
instance Prelude.NFData DashConfiguration where
rnf :: DashConfiguration -> ()
rnf DashConfiguration' {Maybe Text
Maybe OriginManifestType
originManifestType :: Maybe OriginManifestType
mpdLocation :: Maybe Text
manifestEndpointPrefix :: Maybe Text
$sel:originManifestType:DashConfiguration' :: DashConfiguration -> Maybe OriginManifestType
$sel:mpdLocation:DashConfiguration' :: DashConfiguration -> Maybe Text
$sel:manifestEndpointPrefix:DashConfiguration' :: DashConfiguration -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
manifestEndpointPrefix
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
mpdLocation
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OriginManifestType
originManifestType