{-# 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.ResponseOutputItem where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaTailor.Types.DashPlaylistSettings
import Amazonka.MediaTailor.Types.HlsPlaylistSettings
import qualified Amazonka.Prelude as Prelude
data ResponseOutputItem = ResponseOutputItem'
{
ResponseOutputItem -> Maybe HlsPlaylistSettings
hlsPlaylistSettings :: Prelude.Maybe HlsPlaylistSettings,
ResponseOutputItem -> Maybe DashPlaylistSettings
dashPlaylistSettings :: Prelude.Maybe DashPlaylistSettings,
ResponseOutputItem -> Text
manifestName :: Prelude.Text,
ResponseOutputItem -> Text
playbackUrl :: Prelude.Text,
ResponseOutputItem -> Text
sourceGroup :: Prelude.Text
}
deriving (ResponseOutputItem -> ResponseOutputItem -> Bool
(ResponseOutputItem -> ResponseOutputItem -> Bool)
-> (ResponseOutputItem -> ResponseOutputItem -> Bool)
-> Eq ResponseOutputItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseOutputItem -> ResponseOutputItem -> Bool
$c/= :: ResponseOutputItem -> ResponseOutputItem -> Bool
== :: ResponseOutputItem -> ResponseOutputItem -> Bool
$c== :: ResponseOutputItem -> ResponseOutputItem -> Bool
Prelude.Eq, ReadPrec [ResponseOutputItem]
ReadPrec ResponseOutputItem
Int -> ReadS ResponseOutputItem
ReadS [ResponseOutputItem]
(Int -> ReadS ResponseOutputItem)
-> ReadS [ResponseOutputItem]
-> ReadPrec ResponseOutputItem
-> ReadPrec [ResponseOutputItem]
-> Read ResponseOutputItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResponseOutputItem]
$creadListPrec :: ReadPrec [ResponseOutputItem]
readPrec :: ReadPrec ResponseOutputItem
$creadPrec :: ReadPrec ResponseOutputItem
readList :: ReadS [ResponseOutputItem]
$creadList :: ReadS [ResponseOutputItem]
readsPrec :: Int -> ReadS ResponseOutputItem
$creadsPrec :: Int -> ReadS ResponseOutputItem
Prelude.Read, Int -> ResponseOutputItem -> ShowS
[ResponseOutputItem] -> ShowS
ResponseOutputItem -> String
(Int -> ResponseOutputItem -> ShowS)
-> (ResponseOutputItem -> String)
-> ([ResponseOutputItem] -> ShowS)
-> Show ResponseOutputItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResponseOutputItem] -> ShowS
$cshowList :: [ResponseOutputItem] -> ShowS
show :: ResponseOutputItem -> String
$cshow :: ResponseOutputItem -> String
showsPrec :: Int -> ResponseOutputItem -> ShowS
$cshowsPrec :: Int -> ResponseOutputItem -> ShowS
Prelude.Show, (forall x. ResponseOutputItem -> Rep ResponseOutputItem x)
-> (forall x. Rep ResponseOutputItem x -> ResponseOutputItem)
-> Generic ResponseOutputItem
forall x. Rep ResponseOutputItem x -> ResponseOutputItem
forall x. ResponseOutputItem -> Rep ResponseOutputItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResponseOutputItem x -> ResponseOutputItem
$cfrom :: forall x. ResponseOutputItem -> Rep ResponseOutputItem x
Prelude.Generic)
newResponseOutputItem ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ResponseOutputItem
newResponseOutputItem :: Text -> Text -> Text -> ResponseOutputItem
newResponseOutputItem
Text
pManifestName_
Text
pPlaybackUrl_
Text
pSourceGroup_ =
ResponseOutputItem' :: Maybe HlsPlaylistSettings
-> Maybe DashPlaylistSettings
-> Text
-> Text
-> Text
-> ResponseOutputItem
ResponseOutputItem'
{ $sel:hlsPlaylistSettings:ResponseOutputItem' :: Maybe HlsPlaylistSettings
hlsPlaylistSettings =
Maybe HlsPlaylistSettings
forall a. Maybe a
Prelude.Nothing,
$sel:dashPlaylistSettings:ResponseOutputItem' :: Maybe DashPlaylistSettings
dashPlaylistSettings = Maybe DashPlaylistSettings
forall a. Maybe a
Prelude.Nothing,
$sel:manifestName:ResponseOutputItem' :: Text
manifestName = Text
pManifestName_,
$sel:playbackUrl:ResponseOutputItem' :: Text
playbackUrl = Text
pPlaybackUrl_,
$sel:sourceGroup:ResponseOutputItem' :: Text
sourceGroup = Text
pSourceGroup_
}
responseOutputItem_hlsPlaylistSettings :: Lens.Lens' ResponseOutputItem (Prelude.Maybe HlsPlaylistSettings)
responseOutputItem_hlsPlaylistSettings :: (Maybe HlsPlaylistSettings -> f (Maybe HlsPlaylistSettings))
-> ResponseOutputItem -> f ResponseOutputItem
responseOutputItem_hlsPlaylistSettings = (ResponseOutputItem -> Maybe HlsPlaylistSettings)
-> (ResponseOutputItem
-> Maybe HlsPlaylistSettings -> ResponseOutputItem)
-> Lens
ResponseOutputItem
ResponseOutputItem
(Maybe HlsPlaylistSettings)
(Maybe HlsPlaylistSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponseOutputItem' {Maybe HlsPlaylistSettings
hlsPlaylistSettings :: Maybe HlsPlaylistSettings
$sel:hlsPlaylistSettings:ResponseOutputItem' :: ResponseOutputItem -> Maybe HlsPlaylistSettings
hlsPlaylistSettings} -> Maybe HlsPlaylistSettings
hlsPlaylistSettings) (\s :: ResponseOutputItem
s@ResponseOutputItem' {} Maybe HlsPlaylistSettings
a -> ResponseOutputItem
s {$sel:hlsPlaylistSettings:ResponseOutputItem' :: Maybe HlsPlaylistSettings
hlsPlaylistSettings = Maybe HlsPlaylistSettings
a} :: ResponseOutputItem)
responseOutputItem_dashPlaylistSettings :: Lens.Lens' ResponseOutputItem (Prelude.Maybe DashPlaylistSettings)
responseOutputItem_dashPlaylistSettings :: (Maybe DashPlaylistSettings -> f (Maybe DashPlaylistSettings))
-> ResponseOutputItem -> f ResponseOutputItem
responseOutputItem_dashPlaylistSettings = (ResponseOutputItem -> Maybe DashPlaylistSettings)
-> (ResponseOutputItem
-> Maybe DashPlaylistSettings -> ResponseOutputItem)
-> Lens
ResponseOutputItem
ResponseOutputItem
(Maybe DashPlaylistSettings)
(Maybe DashPlaylistSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponseOutputItem' {Maybe DashPlaylistSettings
dashPlaylistSettings :: Maybe DashPlaylistSettings
$sel:dashPlaylistSettings:ResponseOutputItem' :: ResponseOutputItem -> Maybe DashPlaylistSettings
dashPlaylistSettings} -> Maybe DashPlaylistSettings
dashPlaylistSettings) (\s :: ResponseOutputItem
s@ResponseOutputItem' {} Maybe DashPlaylistSettings
a -> ResponseOutputItem
s {$sel:dashPlaylistSettings:ResponseOutputItem' :: Maybe DashPlaylistSettings
dashPlaylistSettings = Maybe DashPlaylistSettings
a} :: ResponseOutputItem)
responseOutputItem_manifestName :: Lens.Lens' ResponseOutputItem Prelude.Text
responseOutputItem_manifestName :: (Text -> f Text) -> ResponseOutputItem -> f ResponseOutputItem
responseOutputItem_manifestName = (ResponseOutputItem -> Text)
-> (ResponseOutputItem -> Text -> ResponseOutputItem)
-> Lens ResponseOutputItem ResponseOutputItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponseOutputItem' {Text
manifestName :: Text
$sel:manifestName:ResponseOutputItem' :: ResponseOutputItem -> Text
manifestName} -> Text
manifestName) (\s :: ResponseOutputItem
s@ResponseOutputItem' {} Text
a -> ResponseOutputItem
s {$sel:manifestName:ResponseOutputItem' :: Text
manifestName = Text
a} :: ResponseOutputItem)
responseOutputItem_playbackUrl :: Lens.Lens' ResponseOutputItem Prelude.Text
responseOutputItem_playbackUrl :: (Text -> f Text) -> ResponseOutputItem -> f ResponseOutputItem
responseOutputItem_playbackUrl = (ResponseOutputItem -> Text)
-> (ResponseOutputItem -> Text -> ResponseOutputItem)
-> Lens ResponseOutputItem ResponseOutputItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponseOutputItem' {Text
playbackUrl :: Text
$sel:playbackUrl:ResponseOutputItem' :: ResponseOutputItem -> Text
playbackUrl} -> Text
playbackUrl) (\s :: ResponseOutputItem
s@ResponseOutputItem' {} Text
a -> ResponseOutputItem
s {$sel:playbackUrl:ResponseOutputItem' :: Text
playbackUrl = Text
a} :: ResponseOutputItem)
responseOutputItem_sourceGroup :: Lens.Lens' ResponseOutputItem Prelude.Text
responseOutputItem_sourceGroup :: (Text -> f Text) -> ResponseOutputItem -> f ResponseOutputItem
responseOutputItem_sourceGroup = (ResponseOutputItem -> Text)
-> (ResponseOutputItem -> Text -> ResponseOutputItem)
-> Lens ResponseOutputItem ResponseOutputItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponseOutputItem' {Text
sourceGroup :: Text
$sel:sourceGroup:ResponseOutputItem' :: ResponseOutputItem -> Text
sourceGroup} -> Text
sourceGroup) (\s :: ResponseOutputItem
s@ResponseOutputItem' {} Text
a -> ResponseOutputItem
s {$sel:sourceGroup:ResponseOutputItem' :: Text
sourceGroup = Text
a} :: ResponseOutputItem)
instance Core.FromJSON ResponseOutputItem where
parseJSON :: Value -> Parser ResponseOutputItem
parseJSON =
String
-> (Object -> Parser ResponseOutputItem)
-> Value
-> Parser ResponseOutputItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ResponseOutputItem"
( \Object
x ->
Maybe HlsPlaylistSettings
-> Maybe DashPlaylistSettings
-> Text
-> Text
-> Text
-> ResponseOutputItem
ResponseOutputItem'
(Maybe HlsPlaylistSettings
-> Maybe DashPlaylistSettings
-> Text
-> Text
-> Text
-> ResponseOutputItem)
-> Parser (Maybe HlsPlaylistSettings)
-> Parser
(Maybe DashPlaylistSettings
-> Text -> Text -> Text -> ResponseOutputItem)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe HlsPlaylistSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HlsPlaylistSettings")
Parser
(Maybe DashPlaylistSettings
-> Text -> Text -> Text -> ResponseOutputItem)
-> Parser (Maybe DashPlaylistSettings)
-> Parser (Text -> Text -> Text -> ResponseOutputItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DashPlaylistSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DashPlaylistSettings")
Parser (Text -> Text -> Text -> ResponseOutputItem)
-> Parser Text -> Parser (Text -> Text -> ResponseOutputItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ManifestName")
Parser (Text -> Text -> ResponseOutputItem)
-> Parser Text -> Parser (Text -> ResponseOutputItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"PlaybackUrl")
Parser (Text -> ResponseOutputItem)
-> Parser Text -> Parser ResponseOutputItem
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"SourceGroup")
)
instance Prelude.Hashable ResponseOutputItem
instance Prelude.NFData ResponseOutputItem