{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DefaultSegmentDeliveryConfiguration = DefaultSegmentDeliveryConfiguration'
{
DefaultSegmentDeliveryConfiguration -> Maybe Text
baseUrl :: Prelude.Maybe Prelude.Text
}
deriving (DefaultSegmentDeliveryConfiguration
-> DefaultSegmentDeliveryConfiguration -> Bool
(DefaultSegmentDeliveryConfiguration
-> DefaultSegmentDeliveryConfiguration -> Bool)
-> (DefaultSegmentDeliveryConfiguration
-> DefaultSegmentDeliveryConfiguration -> Bool)
-> Eq DefaultSegmentDeliveryConfiguration
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]
(Int -> ReadS DefaultSegmentDeliveryConfiguration)
-> ReadS [DefaultSegmentDeliveryConfiguration]
-> ReadPrec DefaultSegmentDeliveryConfiguration
-> ReadPrec [DefaultSegmentDeliveryConfiguration]
-> Read 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
(Int -> DefaultSegmentDeliveryConfiguration -> ShowS)
-> (DefaultSegmentDeliveryConfiguration -> String)
-> ([DefaultSegmentDeliveryConfiguration] -> ShowS)
-> Show DefaultSegmentDeliveryConfiguration
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.
DefaultSegmentDeliveryConfiguration
-> Rep DefaultSegmentDeliveryConfiguration x)
-> (forall x.
Rep DefaultSegmentDeliveryConfiguration x
-> DefaultSegmentDeliveryConfiguration)
-> Generic DefaultSegmentDeliveryConfiguration
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' :: Maybe Text -> DefaultSegmentDeliveryConfiguration
DefaultSegmentDeliveryConfiguration'
{ $sel:baseUrl:DefaultSegmentDeliveryConfiguration' :: Maybe Text
baseUrl =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
defaultSegmentDeliveryConfiguration_baseUrl :: Lens.Lens' DefaultSegmentDeliveryConfiguration (Prelude.Maybe Prelude.Text)
defaultSegmentDeliveryConfiguration_baseUrl :: (Maybe Text -> f (Maybe Text))
-> DefaultSegmentDeliveryConfiguration
-> f DefaultSegmentDeliveryConfiguration
defaultSegmentDeliveryConfiguration_baseUrl = (DefaultSegmentDeliveryConfiguration -> Maybe Text)
-> (DefaultSegmentDeliveryConfiguration
-> Maybe Text -> DefaultSegmentDeliveryConfiguration)
-> Lens
DefaultSegmentDeliveryConfiguration
DefaultSegmentDeliveryConfiguration
(Maybe Text)
(Maybe Text)
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
Core.FromJSON
DefaultSegmentDeliveryConfiguration
where
parseJSON :: Value -> Parser DefaultSegmentDeliveryConfiguration
parseJSON =
String
-> (Object -> Parser DefaultSegmentDeliveryConfiguration)
-> Value
-> Parser DefaultSegmentDeliveryConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DefaultSegmentDeliveryConfiguration"
( \Object
x ->
Maybe Text -> DefaultSegmentDeliveryConfiguration
DefaultSegmentDeliveryConfiguration'
(Maybe Text -> DefaultSegmentDeliveryConfiguration)
-> Parser (Maybe Text)
-> Parser DefaultSegmentDeliveryConfiguration
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
"BaseUrl")
)
instance
Prelude.Hashable
DefaultSegmentDeliveryConfiguration
instance
Prelude.NFData
DefaultSegmentDeliveryConfiguration
instance
Core.ToJSON
DefaultSegmentDeliveryConfiguration
where
toJSON :: DefaultSegmentDeliveryConfiguration -> Value
toJSON DefaultSegmentDeliveryConfiguration' {Maybe Text
baseUrl :: Maybe Text
$sel:baseUrl:DefaultSegmentDeliveryConfiguration' :: DefaultSegmentDeliveryConfiguration -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"BaseUrl" 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
baseUrl]
)