{-# 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.Lens as Lens
import Amazonka.MediaTailor.Types.OriginManifestType
import qualified Amazonka.Prelude as Prelude
data DashConfiguration = DashConfiguration'
{
DashConfiguration -> Maybe Text
manifestEndpointPrefix :: Prelude.Maybe Prelude.Text,
DashConfiguration -> Maybe OriginManifestType
originManifestType :: Prelude.Maybe OriginManifestType,
DashConfiguration -> Maybe Text
mpdLocation :: Prelude.Maybe Prelude.Text
}
deriving (DashConfiguration -> DashConfiguration -> Bool
(DashConfiguration -> DashConfiguration -> Bool)
-> (DashConfiguration -> DashConfiguration -> Bool)
-> Eq DashConfiguration
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]
(Int -> ReadS DashConfiguration)
-> ReadS [DashConfiguration]
-> ReadPrec DashConfiguration
-> ReadPrec [DashConfiguration]
-> Read 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
(Int -> DashConfiguration -> ShowS)
-> (DashConfiguration -> String)
-> ([DashConfiguration] -> ShowS)
-> Show DashConfiguration
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. DashConfiguration -> Rep DashConfiguration x)
-> (forall x. Rep DashConfiguration x -> DashConfiguration)
-> Generic DashConfiguration
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' :: Maybe Text
-> Maybe OriginManifestType -> Maybe Text -> DashConfiguration
DashConfiguration'
{ $sel:manifestEndpointPrefix:DashConfiguration' :: Maybe Text
manifestEndpointPrefix =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:originManifestType:DashConfiguration' :: Maybe OriginManifestType
originManifestType = Maybe OriginManifestType
forall a. Maybe a
Prelude.Nothing,
$sel:mpdLocation:DashConfiguration' :: Maybe Text
mpdLocation = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
dashConfiguration_manifestEndpointPrefix :: Lens.Lens' DashConfiguration (Prelude.Maybe Prelude.Text)
dashConfiguration_manifestEndpointPrefix :: (Maybe Text -> f (Maybe Text))
-> DashConfiguration -> f DashConfiguration
dashConfiguration_manifestEndpointPrefix = (DashConfiguration -> Maybe Text)
-> (DashConfiguration -> Maybe Text -> DashConfiguration)
-> Lens
DashConfiguration DashConfiguration (Maybe Text) (Maybe Text)
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_originManifestType :: Lens.Lens' DashConfiguration (Prelude.Maybe OriginManifestType)
dashConfiguration_originManifestType :: (Maybe OriginManifestType -> f (Maybe OriginManifestType))
-> DashConfiguration -> f DashConfiguration
dashConfiguration_originManifestType = (DashConfiguration -> Maybe OriginManifestType)
-> (DashConfiguration
-> Maybe OriginManifestType -> DashConfiguration)
-> Lens
DashConfiguration
DashConfiguration
(Maybe OriginManifestType)
(Maybe 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)
dashConfiguration_mpdLocation :: Lens.Lens' DashConfiguration (Prelude.Maybe Prelude.Text)
dashConfiguration_mpdLocation :: (Maybe Text -> f (Maybe Text))
-> DashConfiguration -> f DashConfiguration
dashConfiguration_mpdLocation = (DashConfiguration -> Maybe Text)
-> (DashConfiguration -> Maybe Text -> DashConfiguration)
-> Lens
DashConfiguration DashConfiguration (Maybe Text) (Maybe Text)
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)
instance Core.FromJSON DashConfiguration where
parseJSON :: Value -> Parser DashConfiguration
parseJSON =
String
-> (Object -> Parser DashConfiguration)
-> Value
-> Parser DashConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DashConfiguration"
( \Object
x ->
Maybe Text
-> Maybe OriginManifestType -> Maybe Text -> DashConfiguration
DashConfiguration'
(Maybe Text
-> Maybe OriginManifestType -> Maybe Text -> DashConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe OriginManifestType -> Maybe Text -> DashConfiguration)
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
"ManifestEndpointPrefix")
Parser
(Maybe OriginManifestType -> Maybe Text -> DashConfiguration)
-> Parser (Maybe OriginManifestType)
-> Parser (Maybe Text -> DashConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OriginManifestType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OriginManifestType")
Parser (Maybe Text -> DashConfiguration)
-> Parser (Maybe Text) -> Parser DashConfiguration
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
"MpdLocation")
)
instance Prelude.Hashable DashConfiguration
instance Prelude.NFData DashConfiguration