{-# 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.DefaultSegmentDeliveryConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data DefaultSegmentDeliveryConfiguration = DefaultSegmentDeliveryConfiguration'
{
DefaultSegmentDeliveryConfiguration -> Maybe Text
baseUrl :: Prelude.Maybe Prelude.Text
}
deriving (DefaultSegmentDeliveryConfiguration
-> DefaultSegmentDeliveryConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DefaultSegmentDeliveryConfiguration
-> DefaultSegmentDeliveryConfiguration -> Bool
$c/= :: DefaultSegmentDeliveryConfiguration
-> DefaultSegmentDeliveryConfiguration -> Bool
== :: DefaultSegmentDeliveryConfiguration
-> DefaultSegmentDeliveryConfiguration -> Bool
$c== :: DefaultSegmentDeliveryConfiguration
-> DefaultSegmentDeliveryConfiguration -> Bool
Prelude.Eq, ReadPrec [DefaultSegmentDeliveryConfiguration]
ReadPrec DefaultSegmentDeliveryConfiguration
Int -> ReadS DefaultSegmentDeliveryConfiguration
ReadS [DefaultSegmentDeliveryConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DefaultSegmentDeliveryConfiguration]
$creadListPrec :: ReadPrec [DefaultSegmentDeliveryConfiguration]
readPrec :: ReadPrec DefaultSegmentDeliveryConfiguration
$creadPrec :: ReadPrec DefaultSegmentDeliveryConfiguration
readList :: ReadS [DefaultSegmentDeliveryConfiguration]
$creadList :: ReadS [DefaultSegmentDeliveryConfiguration]
readsPrec :: Int -> ReadS DefaultSegmentDeliveryConfiguration
$creadsPrec :: Int -> ReadS DefaultSegmentDeliveryConfiguration
Prelude.Read, Int -> DefaultSegmentDeliveryConfiguration -> ShowS
[DefaultSegmentDeliveryConfiguration] -> ShowS
DefaultSegmentDeliveryConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DefaultSegmentDeliveryConfiguration] -> ShowS
$cshowList :: [DefaultSegmentDeliveryConfiguration] -> ShowS
show :: DefaultSegmentDeliveryConfiguration -> String
$cshow :: DefaultSegmentDeliveryConfiguration -> String
showsPrec :: Int -> DefaultSegmentDeliveryConfiguration -> ShowS
$cshowsPrec :: Int -> DefaultSegmentDeliveryConfiguration -> ShowS
Prelude.Show, forall x.
Rep DefaultSegmentDeliveryConfiguration x
-> DefaultSegmentDeliveryConfiguration
forall x.
DefaultSegmentDeliveryConfiguration
-> Rep DefaultSegmentDeliveryConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DefaultSegmentDeliveryConfiguration x
-> DefaultSegmentDeliveryConfiguration
$cfrom :: forall x.
DefaultSegmentDeliveryConfiguration
-> Rep DefaultSegmentDeliveryConfiguration x
Prelude.Generic)
newDefaultSegmentDeliveryConfiguration ::
DefaultSegmentDeliveryConfiguration
newDefaultSegmentDeliveryConfiguration :: DefaultSegmentDeliveryConfiguration
newDefaultSegmentDeliveryConfiguration =
DefaultSegmentDeliveryConfiguration'
{ $sel:baseUrl:DefaultSegmentDeliveryConfiguration' :: Maybe Text
baseUrl =
forall a. Maybe a
Prelude.Nothing
}
defaultSegmentDeliveryConfiguration_baseUrl :: Lens.Lens' DefaultSegmentDeliveryConfiguration (Prelude.Maybe Prelude.Text)
defaultSegmentDeliveryConfiguration_baseUrl :: Lens' DefaultSegmentDeliveryConfiguration (Maybe Text)
defaultSegmentDeliveryConfiguration_baseUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefaultSegmentDeliveryConfiguration' {Maybe Text
baseUrl :: Maybe Text
$sel:baseUrl:DefaultSegmentDeliveryConfiguration' :: DefaultSegmentDeliveryConfiguration -> Maybe Text
baseUrl} -> Maybe Text
baseUrl) (\s :: DefaultSegmentDeliveryConfiguration
s@DefaultSegmentDeliveryConfiguration' {} Maybe Text
a -> DefaultSegmentDeliveryConfiguration
s {$sel:baseUrl:DefaultSegmentDeliveryConfiguration' :: Maybe Text
baseUrl = Maybe Text
a} :: DefaultSegmentDeliveryConfiguration)
instance
Data.FromJSON
DefaultSegmentDeliveryConfiguration
where
parseJSON :: Value -> Parser DefaultSegmentDeliveryConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DefaultSegmentDeliveryConfiguration"
( \Object
x ->
Maybe Text -> DefaultSegmentDeliveryConfiguration
DefaultSegmentDeliveryConfiguration'
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
"BaseUrl")
)
instance
Prelude.Hashable
DefaultSegmentDeliveryConfiguration
where
hashWithSalt :: Int -> DefaultSegmentDeliveryConfiguration -> Int
hashWithSalt
Int
_salt
DefaultSegmentDeliveryConfiguration' {Maybe Text
baseUrl :: Maybe Text
$sel:baseUrl:DefaultSegmentDeliveryConfiguration' :: DefaultSegmentDeliveryConfiguration -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
baseUrl
instance
Prelude.NFData
DefaultSegmentDeliveryConfiguration
where
rnf :: DefaultSegmentDeliveryConfiguration -> ()
rnf DefaultSegmentDeliveryConfiguration' {Maybe Text
baseUrl :: Maybe Text
$sel:baseUrl:DefaultSegmentDeliveryConfiguration' :: DefaultSegmentDeliveryConfiguration -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
baseUrl
instance
Data.ToJSON
DefaultSegmentDeliveryConfiguration
where
toJSON :: DefaultSegmentDeliveryConfiguration -> Value
toJSON DefaultSegmentDeliveryConfiguration' {Maybe Text
baseUrl :: Maybe Text
$sel:baseUrl:DefaultSegmentDeliveryConfiguration' :: DefaultSegmentDeliveryConfiguration -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"BaseUrl" 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 Text
baseUrl]
)