{-# 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.DashConfigurationForPut 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 DashConfigurationForPut = DashConfigurationForPut'
{
DashConfigurationForPut -> Maybe OriginManifestType
originManifestType :: Prelude.Maybe OriginManifestType,
DashConfigurationForPut -> Maybe Text
mpdLocation :: Prelude.Maybe Prelude.Text
}
deriving (DashConfigurationForPut -> DashConfigurationForPut -> Bool
(DashConfigurationForPut -> DashConfigurationForPut -> Bool)
-> (DashConfigurationForPut -> DashConfigurationForPut -> Bool)
-> Eq DashConfigurationForPut
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DashConfigurationForPut -> DashConfigurationForPut -> Bool
$c/= :: DashConfigurationForPut -> DashConfigurationForPut -> Bool
== :: DashConfigurationForPut -> DashConfigurationForPut -> Bool
$c== :: DashConfigurationForPut -> DashConfigurationForPut -> Bool
Prelude.Eq, ReadPrec [DashConfigurationForPut]
ReadPrec DashConfigurationForPut
Int -> ReadS DashConfigurationForPut
ReadS [DashConfigurationForPut]
(Int -> ReadS DashConfigurationForPut)
-> ReadS [DashConfigurationForPut]
-> ReadPrec DashConfigurationForPut
-> ReadPrec [DashConfigurationForPut]
-> Read DashConfigurationForPut
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DashConfigurationForPut]
$creadListPrec :: ReadPrec [DashConfigurationForPut]
readPrec :: ReadPrec DashConfigurationForPut
$creadPrec :: ReadPrec DashConfigurationForPut
readList :: ReadS [DashConfigurationForPut]
$creadList :: ReadS [DashConfigurationForPut]
readsPrec :: Int -> ReadS DashConfigurationForPut
$creadsPrec :: Int -> ReadS DashConfigurationForPut
Prelude.Read, Int -> DashConfigurationForPut -> ShowS
[DashConfigurationForPut] -> ShowS
DashConfigurationForPut -> String
(Int -> DashConfigurationForPut -> ShowS)
-> (DashConfigurationForPut -> String)
-> ([DashConfigurationForPut] -> ShowS)
-> Show DashConfigurationForPut
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DashConfigurationForPut] -> ShowS
$cshowList :: [DashConfigurationForPut] -> ShowS
show :: DashConfigurationForPut -> String
$cshow :: DashConfigurationForPut -> String
showsPrec :: Int -> DashConfigurationForPut -> ShowS
$cshowsPrec :: Int -> DashConfigurationForPut -> ShowS
Prelude.Show, (forall x.
DashConfigurationForPut -> Rep DashConfigurationForPut x)
-> (forall x.
Rep DashConfigurationForPut x -> DashConfigurationForPut)
-> Generic DashConfigurationForPut
forall x. Rep DashConfigurationForPut x -> DashConfigurationForPut
forall x. DashConfigurationForPut -> Rep DashConfigurationForPut x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DashConfigurationForPut x -> DashConfigurationForPut
$cfrom :: forall x. DashConfigurationForPut -> Rep DashConfigurationForPut x
Prelude.Generic)
newDashConfigurationForPut ::
DashConfigurationForPut
newDashConfigurationForPut :: DashConfigurationForPut
newDashConfigurationForPut =
DashConfigurationForPut' :: Maybe OriginManifestType -> Maybe Text -> DashConfigurationForPut
DashConfigurationForPut'
{ $sel:originManifestType:DashConfigurationForPut' :: Maybe OriginManifestType
originManifestType =
Maybe OriginManifestType
forall a. Maybe a
Prelude.Nothing,
$sel:mpdLocation:DashConfigurationForPut' :: Maybe Text
mpdLocation = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
dashConfigurationForPut_originManifestType :: Lens.Lens' DashConfigurationForPut (Prelude.Maybe OriginManifestType)
dashConfigurationForPut_originManifestType :: (Maybe OriginManifestType -> f (Maybe OriginManifestType))
-> DashConfigurationForPut -> f DashConfigurationForPut
dashConfigurationForPut_originManifestType = (DashConfigurationForPut -> Maybe OriginManifestType)
-> (DashConfigurationForPut
-> Maybe OriginManifestType -> DashConfigurationForPut)
-> Lens
DashConfigurationForPut
DashConfigurationForPut
(Maybe OriginManifestType)
(Maybe OriginManifestType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashConfigurationForPut' {Maybe OriginManifestType
originManifestType :: Maybe OriginManifestType
$sel:originManifestType:DashConfigurationForPut' :: DashConfigurationForPut -> Maybe OriginManifestType
originManifestType} -> Maybe OriginManifestType
originManifestType) (\s :: DashConfigurationForPut
s@DashConfigurationForPut' {} Maybe OriginManifestType
a -> DashConfigurationForPut
s {$sel:originManifestType:DashConfigurationForPut' :: Maybe OriginManifestType
originManifestType = Maybe OriginManifestType
a} :: DashConfigurationForPut)
dashConfigurationForPut_mpdLocation :: Lens.Lens' DashConfigurationForPut (Prelude.Maybe Prelude.Text)
dashConfigurationForPut_mpdLocation :: (Maybe Text -> f (Maybe Text))
-> DashConfigurationForPut -> f DashConfigurationForPut
dashConfigurationForPut_mpdLocation = (DashConfigurationForPut -> Maybe Text)
-> (DashConfigurationForPut
-> Maybe Text -> DashConfigurationForPut)
-> Lens
DashConfigurationForPut
DashConfigurationForPut
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashConfigurationForPut' {Maybe Text
mpdLocation :: Maybe Text
$sel:mpdLocation:DashConfigurationForPut' :: DashConfigurationForPut -> Maybe Text
mpdLocation} -> Maybe Text
mpdLocation) (\s :: DashConfigurationForPut
s@DashConfigurationForPut' {} Maybe Text
a -> DashConfigurationForPut
s {$sel:mpdLocation:DashConfigurationForPut' :: Maybe Text
mpdLocation = Maybe Text
a} :: DashConfigurationForPut)
instance Prelude.Hashable DashConfigurationForPut
instance Prelude.NFData DashConfigurationForPut
instance Core.ToJSON DashConfigurationForPut where
toJSON :: DashConfigurationForPut -> Value
toJSON DashConfigurationForPut' {Maybe Text
Maybe OriginManifestType
mpdLocation :: Maybe Text
originManifestType :: Maybe OriginManifestType
$sel:mpdLocation:DashConfigurationForPut' :: DashConfigurationForPut -> Maybe Text
$sel:originManifestType:DashConfigurationForPut' :: DashConfigurationForPut -> Maybe OriginManifestType
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"OriginManifestType" Text -> OriginManifestType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(OriginManifestType -> Pair)
-> Maybe OriginManifestType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OriginManifestType
originManifestType,
(Text
"MpdLocation" 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
mpdLocation
]
)