{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.MediaTailor.CreateProgram
(
CreateProgram (..),
newCreateProgram,
createProgram_adBreaks,
createProgram_channelName,
createProgram_programName,
createProgram_vodSourceName,
createProgram_scheduleConfiguration,
createProgram_sourceLocationName,
CreateProgramResponse (..),
newCreateProgramResponse,
createProgramResponse_creationTime,
createProgramResponse_sourceLocationName,
createProgramResponse_arn,
createProgramResponse_programName,
createProgramResponse_adBreaks,
createProgramResponse_channelName,
createProgramResponse_scheduledStartTime,
createProgramResponse_vodSourceName,
createProgramResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaTailor.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateProgram = CreateProgram'
{
CreateProgram -> Maybe [AdBreak]
adBreaks :: Prelude.Maybe [AdBreak],
CreateProgram -> Text
channelName :: Prelude.Text,
CreateProgram -> Text
programName :: Prelude.Text,
CreateProgram -> Text
vodSourceName :: Prelude.Text,
CreateProgram -> ScheduleConfiguration
scheduleConfiguration :: ScheduleConfiguration,
CreateProgram -> Text
sourceLocationName :: Prelude.Text
}
deriving (CreateProgram -> CreateProgram -> Bool
(CreateProgram -> CreateProgram -> Bool)
-> (CreateProgram -> CreateProgram -> Bool) -> Eq CreateProgram
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateProgram -> CreateProgram -> Bool
$c/= :: CreateProgram -> CreateProgram -> Bool
== :: CreateProgram -> CreateProgram -> Bool
$c== :: CreateProgram -> CreateProgram -> Bool
Prelude.Eq, ReadPrec [CreateProgram]
ReadPrec CreateProgram
Int -> ReadS CreateProgram
ReadS [CreateProgram]
(Int -> ReadS CreateProgram)
-> ReadS [CreateProgram]
-> ReadPrec CreateProgram
-> ReadPrec [CreateProgram]
-> Read CreateProgram
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateProgram]
$creadListPrec :: ReadPrec [CreateProgram]
readPrec :: ReadPrec CreateProgram
$creadPrec :: ReadPrec CreateProgram
readList :: ReadS [CreateProgram]
$creadList :: ReadS [CreateProgram]
readsPrec :: Int -> ReadS CreateProgram
$creadsPrec :: Int -> ReadS CreateProgram
Prelude.Read, Int -> CreateProgram -> ShowS
[CreateProgram] -> ShowS
CreateProgram -> String
(Int -> CreateProgram -> ShowS)
-> (CreateProgram -> String)
-> ([CreateProgram] -> ShowS)
-> Show CreateProgram
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateProgram] -> ShowS
$cshowList :: [CreateProgram] -> ShowS
show :: CreateProgram -> String
$cshow :: CreateProgram -> String
showsPrec :: Int -> CreateProgram -> ShowS
$cshowsPrec :: Int -> CreateProgram -> ShowS
Prelude.Show, (forall x. CreateProgram -> Rep CreateProgram x)
-> (forall x. Rep CreateProgram x -> CreateProgram)
-> Generic CreateProgram
forall x. Rep CreateProgram x -> CreateProgram
forall x. CreateProgram -> Rep CreateProgram x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateProgram x -> CreateProgram
$cfrom :: forall x. CreateProgram -> Rep CreateProgram x
Prelude.Generic)
newCreateProgram ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ScheduleConfiguration ->
Prelude.Text ->
CreateProgram
newCreateProgram :: Text
-> Text -> Text -> ScheduleConfiguration -> Text -> CreateProgram
newCreateProgram
Text
pChannelName_
Text
pProgramName_
Text
pVodSourceName_
ScheduleConfiguration
pScheduleConfiguration_
Text
pSourceLocationName_ =
CreateProgram' :: Maybe [AdBreak]
-> Text
-> Text
-> Text
-> ScheduleConfiguration
-> Text
-> CreateProgram
CreateProgram'
{ $sel:adBreaks:CreateProgram' :: Maybe [AdBreak]
adBreaks = Maybe [AdBreak]
forall a. Maybe a
Prelude.Nothing,
$sel:channelName:CreateProgram' :: Text
channelName = Text
pChannelName_,
$sel:programName:CreateProgram' :: Text
programName = Text
pProgramName_,
$sel:vodSourceName:CreateProgram' :: Text
vodSourceName = Text
pVodSourceName_,
$sel:scheduleConfiguration:CreateProgram' :: ScheduleConfiguration
scheduleConfiguration = ScheduleConfiguration
pScheduleConfiguration_,
$sel:sourceLocationName:CreateProgram' :: Text
sourceLocationName = Text
pSourceLocationName_
}
createProgram_adBreaks :: Lens.Lens' CreateProgram (Prelude.Maybe [AdBreak])
createProgram_adBreaks :: (Maybe [AdBreak] -> f (Maybe [AdBreak]))
-> CreateProgram -> f CreateProgram
createProgram_adBreaks = (CreateProgram -> Maybe [AdBreak])
-> (CreateProgram -> Maybe [AdBreak] -> CreateProgram)
-> Lens
CreateProgram CreateProgram (Maybe [AdBreak]) (Maybe [AdBreak])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgram' {Maybe [AdBreak]
adBreaks :: Maybe [AdBreak]
$sel:adBreaks:CreateProgram' :: CreateProgram -> Maybe [AdBreak]
adBreaks} -> Maybe [AdBreak]
adBreaks) (\s :: CreateProgram
s@CreateProgram' {} Maybe [AdBreak]
a -> CreateProgram
s {$sel:adBreaks:CreateProgram' :: Maybe [AdBreak]
adBreaks = Maybe [AdBreak]
a} :: CreateProgram) ((Maybe [AdBreak] -> f (Maybe [AdBreak]))
-> CreateProgram -> f CreateProgram)
-> ((Maybe [AdBreak] -> f (Maybe [AdBreak]))
-> Maybe [AdBreak] -> f (Maybe [AdBreak]))
-> (Maybe [AdBreak] -> f (Maybe [AdBreak]))
-> CreateProgram
-> f CreateProgram
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AdBreak] [AdBreak] [AdBreak] [AdBreak]
-> Iso
(Maybe [AdBreak])
(Maybe [AdBreak])
(Maybe [AdBreak])
(Maybe [AdBreak])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [AdBreak] [AdBreak] [AdBreak] [AdBreak]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createProgram_channelName :: Lens.Lens' CreateProgram Prelude.Text
createProgram_channelName :: (Text -> f Text) -> CreateProgram -> f CreateProgram
createProgram_channelName = (CreateProgram -> Text)
-> (CreateProgram -> Text -> CreateProgram)
-> Lens CreateProgram CreateProgram Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgram' {Text
channelName :: Text
$sel:channelName:CreateProgram' :: CreateProgram -> Text
channelName} -> Text
channelName) (\s :: CreateProgram
s@CreateProgram' {} Text
a -> CreateProgram
s {$sel:channelName:CreateProgram' :: Text
channelName = Text
a} :: CreateProgram)
createProgram_programName :: Lens.Lens' CreateProgram Prelude.Text
createProgram_programName :: (Text -> f Text) -> CreateProgram -> f CreateProgram
createProgram_programName = (CreateProgram -> Text)
-> (CreateProgram -> Text -> CreateProgram)
-> Lens CreateProgram CreateProgram Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgram' {Text
programName :: Text
$sel:programName:CreateProgram' :: CreateProgram -> Text
programName} -> Text
programName) (\s :: CreateProgram
s@CreateProgram' {} Text
a -> CreateProgram
s {$sel:programName:CreateProgram' :: Text
programName = Text
a} :: CreateProgram)
createProgram_vodSourceName :: Lens.Lens' CreateProgram Prelude.Text
createProgram_vodSourceName :: (Text -> f Text) -> CreateProgram -> f CreateProgram
createProgram_vodSourceName = (CreateProgram -> Text)
-> (CreateProgram -> Text -> CreateProgram)
-> Lens CreateProgram CreateProgram Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgram' {Text
vodSourceName :: Text
$sel:vodSourceName:CreateProgram' :: CreateProgram -> Text
vodSourceName} -> Text
vodSourceName) (\s :: CreateProgram
s@CreateProgram' {} Text
a -> CreateProgram
s {$sel:vodSourceName:CreateProgram' :: Text
vodSourceName = Text
a} :: CreateProgram)
createProgram_scheduleConfiguration :: Lens.Lens' CreateProgram ScheduleConfiguration
createProgram_scheduleConfiguration :: (ScheduleConfiguration -> f ScheduleConfiguration)
-> CreateProgram -> f CreateProgram
createProgram_scheduleConfiguration = (CreateProgram -> ScheduleConfiguration)
-> (CreateProgram -> ScheduleConfiguration -> CreateProgram)
-> Lens
CreateProgram
CreateProgram
ScheduleConfiguration
ScheduleConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgram' {ScheduleConfiguration
scheduleConfiguration :: ScheduleConfiguration
$sel:scheduleConfiguration:CreateProgram' :: CreateProgram -> ScheduleConfiguration
scheduleConfiguration} -> ScheduleConfiguration
scheduleConfiguration) (\s :: CreateProgram
s@CreateProgram' {} ScheduleConfiguration
a -> CreateProgram
s {$sel:scheduleConfiguration:CreateProgram' :: ScheduleConfiguration
scheduleConfiguration = ScheduleConfiguration
a} :: CreateProgram)
createProgram_sourceLocationName :: Lens.Lens' CreateProgram Prelude.Text
createProgram_sourceLocationName :: (Text -> f Text) -> CreateProgram -> f CreateProgram
createProgram_sourceLocationName = (CreateProgram -> Text)
-> (CreateProgram -> Text -> CreateProgram)
-> Lens CreateProgram CreateProgram Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgram' {Text
sourceLocationName :: Text
$sel:sourceLocationName:CreateProgram' :: CreateProgram -> Text
sourceLocationName} -> Text
sourceLocationName) (\s :: CreateProgram
s@CreateProgram' {} Text
a -> CreateProgram
s {$sel:sourceLocationName:CreateProgram' :: Text
sourceLocationName = Text
a} :: CreateProgram)
instance Core.AWSRequest CreateProgram where
type
AWSResponse CreateProgram =
CreateProgramResponse
request :: CreateProgram -> Request CreateProgram
request = Service -> CreateProgram -> Request CreateProgram
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateProgram
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateProgram)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateProgram))
-> Logger
-> Service
-> Proxy CreateProgram
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateProgram)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AdBreak]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> CreateProgramResponse
CreateProgramResponse'
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AdBreak]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> CreateProgramResponse)
-> Either String (Maybe POSIX)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AdBreak]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> CreateProgramResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationTime")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AdBreak]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> CreateProgramResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe [AdBreak]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> CreateProgramResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SourceLocationName")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe [AdBreak]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> CreateProgramResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe [AdBreak]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> CreateProgramResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Arn")
Either
String
(Maybe Text
-> Maybe [AdBreak]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> CreateProgramResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [AdBreak]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> CreateProgramResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ProgramName")
Either
String
(Maybe [AdBreak]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> CreateProgramResponse)
-> Either String (Maybe [AdBreak])
-> Either
String
(Maybe Text
-> Maybe POSIX -> Maybe Text -> Int -> CreateProgramResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [AdBreak]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AdBreaks" Either String (Maybe (Maybe [AdBreak]))
-> Maybe [AdBreak] -> Either String (Maybe [AdBreak])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AdBreak]
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe Text
-> Maybe POSIX -> Maybe Text -> Int -> CreateProgramResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe POSIX -> Maybe Text -> Int -> CreateProgramResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ChannelName")
Either
String (Maybe POSIX -> Maybe Text -> Int -> CreateProgramResponse)
-> Either String (Maybe POSIX)
-> Either String (Maybe Text -> Int -> CreateProgramResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ScheduledStartTime")
Either String (Maybe Text -> Int -> CreateProgramResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateProgramResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"VodSourceName")
Either String (Int -> CreateProgramResponse)
-> Either String Int -> Either String CreateProgramResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateProgram
instance Prelude.NFData CreateProgram
instance Core.ToHeaders CreateProgram where
toHeaders :: CreateProgram -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateProgram -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateProgram where
toJSON :: CreateProgram -> Value
toJSON CreateProgram' {Maybe [AdBreak]
Text
ScheduleConfiguration
sourceLocationName :: Text
scheduleConfiguration :: ScheduleConfiguration
vodSourceName :: Text
programName :: Text
channelName :: Text
adBreaks :: Maybe [AdBreak]
$sel:sourceLocationName:CreateProgram' :: CreateProgram -> Text
$sel:scheduleConfiguration:CreateProgram' :: CreateProgram -> ScheduleConfiguration
$sel:vodSourceName:CreateProgram' :: CreateProgram -> Text
$sel:programName:CreateProgram' :: CreateProgram -> Text
$sel:channelName:CreateProgram' :: CreateProgram -> Text
$sel:adBreaks:CreateProgram' :: CreateProgram -> Maybe [AdBreak]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"AdBreaks" Text -> [AdBreak] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([AdBreak] -> Pair) -> Maybe [AdBreak] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AdBreak]
adBreaks,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"VodSourceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
vodSourceName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"ScheduleConfiguration"
Text -> ScheduleConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ScheduleConfiguration
scheduleConfiguration
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"SourceLocationName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
sourceLocationName)
]
)
instance Core.ToPath CreateProgram where
toPath :: CreateProgram -> ByteString
toPath CreateProgram' {Maybe [AdBreak]
Text
ScheduleConfiguration
sourceLocationName :: Text
scheduleConfiguration :: ScheduleConfiguration
vodSourceName :: Text
programName :: Text
channelName :: Text
adBreaks :: Maybe [AdBreak]
$sel:sourceLocationName:CreateProgram' :: CreateProgram -> Text
$sel:scheduleConfiguration:CreateProgram' :: CreateProgram -> ScheduleConfiguration
$sel:vodSourceName:CreateProgram' :: CreateProgram -> Text
$sel:programName:CreateProgram' :: CreateProgram -> Text
$sel:channelName:CreateProgram' :: CreateProgram -> Text
$sel:adBreaks:CreateProgram' :: CreateProgram -> Maybe [AdBreak]
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/channel/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
channelName,
ByteString
"/program/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
programName
]
instance Core.ToQuery CreateProgram where
toQuery :: CreateProgram -> QueryString
toQuery = QueryString -> CreateProgram -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateProgramResponse = CreateProgramResponse'
{
CreateProgramResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
CreateProgramResponse -> Maybe Text
sourceLocationName :: Prelude.Maybe Prelude.Text,
CreateProgramResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CreateProgramResponse -> Maybe Text
programName :: Prelude.Maybe Prelude.Text,
CreateProgramResponse -> Maybe [AdBreak]
adBreaks :: Prelude.Maybe [AdBreak],
CreateProgramResponse -> Maybe Text
channelName :: Prelude.Maybe Prelude.Text,
CreateProgramResponse -> Maybe POSIX
scheduledStartTime :: Prelude.Maybe Core.POSIX,
CreateProgramResponse -> Maybe Text
vodSourceName :: Prelude.Maybe Prelude.Text,
CreateProgramResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateProgramResponse -> CreateProgramResponse -> Bool
(CreateProgramResponse -> CreateProgramResponse -> Bool)
-> (CreateProgramResponse -> CreateProgramResponse -> Bool)
-> Eq CreateProgramResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateProgramResponse -> CreateProgramResponse -> Bool
$c/= :: CreateProgramResponse -> CreateProgramResponse -> Bool
== :: CreateProgramResponse -> CreateProgramResponse -> Bool
$c== :: CreateProgramResponse -> CreateProgramResponse -> Bool
Prelude.Eq, ReadPrec [CreateProgramResponse]
ReadPrec CreateProgramResponse
Int -> ReadS CreateProgramResponse
ReadS [CreateProgramResponse]
(Int -> ReadS CreateProgramResponse)
-> ReadS [CreateProgramResponse]
-> ReadPrec CreateProgramResponse
-> ReadPrec [CreateProgramResponse]
-> Read CreateProgramResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateProgramResponse]
$creadListPrec :: ReadPrec [CreateProgramResponse]
readPrec :: ReadPrec CreateProgramResponse
$creadPrec :: ReadPrec CreateProgramResponse
readList :: ReadS [CreateProgramResponse]
$creadList :: ReadS [CreateProgramResponse]
readsPrec :: Int -> ReadS CreateProgramResponse
$creadsPrec :: Int -> ReadS CreateProgramResponse
Prelude.Read, Int -> CreateProgramResponse -> ShowS
[CreateProgramResponse] -> ShowS
CreateProgramResponse -> String
(Int -> CreateProgramResponse -> ShowS)
-> (CreateProgramResponse -> String)
-> ([CreateProgramResponse] -> ShowS)
-> Show CreateProgramResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateProgramResponse] -> ShowS
$cshowList :: [CreateProgramResponse] -> ShowS
show :: CreateProgramResponse -> String
$cshow :: CreateProgramResponse -> String
showsPrec :: Int -> CreateProgramResponse -> ShowS
$cshowsPrec :: Int -> CreateProgramResponse -> ShowS
Prelude.Show, (forall x. CreateProgramResponse -> Rep CreateProgramResponse x)
-> (forall x. Rep CreateProgramResponse x -> CreateProgramResponse)
-> Generic CreateProgramResponse
forall x. Rep CreateProgramResponse x -> CreateProgramResponse
forall x. CreateProgramResponse -> Rep CreateProgramResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateProgramResponse x -> CreateProgramResponse
$cfrom :: forall x. CreateProgramResponse -> Rep CreateProgramResponse x
Prelude.Generic)
newCreateProgramResponse ::
Prelude.Int ->
CreateProgramResponse
newCreateProgramResponse :: Int -> CreateProgramResponse
newCreateProgramResponse Int
pHttpStatus_ =
CreateProgramResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AdBreak]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> CreateProgramResponse
CreateProgramResponse'
{ $sel:creationTime:CreateProgramResponse' :: Maybe POSIX
creationTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:sourceLocationName:CreateProgramResponse' :: Maybe Text
sourceLocationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:CreateProgramResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:programName:CreateProgramResponse' :: Maybe Text
programName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:adBreaks:CreateProgramResponse' :: Maybe [AdBreak]
adBreaks = Maybe [AdBreak]
forall a. Maybe a
Prelude.Nothing,
$sel:channelName:CreateProgramResponse' :: Maybe Text
channelName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:scheduledStartTime:CreateProgramResponse' :: Maybe POSIX
scheduledStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:vodSourceName:CreateProgramResponse' :: Maybe Text
vodSourceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateProgramResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createProgramResponse_creationTime :: Lens.Lens' CreateProgramResponse (Prelude.Maybe Prelude.UTCTime)
createProgramResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateProgramResponse -> f CreateProgramResponse
createProgramResponse_creationTime = (CreateProgramResponse -> Maybe POSIX)
-> (CreateProgramResponse -> Maybe POSIX -> CreateProgramResponse)
-> Lens
CreateProgramResponse
CreateProgramResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgramResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:CreateProgramResponse' :: CreateProgramResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: CreateProgramResponse
s@CreateProgramResponse' {} Maybe POSIX
a -> CreateProgramResponse
s {$sel:creationTime:CreateProgramResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: CreateProgramResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateProgramResponse -> f CreateProgramResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateProgramResponse
-> f CreateProgramResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
createProgramResponse_sourceLocationName :: Lens.Lens' CreateProgramResponse (Prelude.Maybe Prelude.Text)
createProgramResponse_sourceLocationName :: (Maybe Text -> f (Maybe Text))
-> CreateProgramResponse -> f CreateProgramResponse
createProgramResponse_sourceLocationName = (CreateProgramResponse -> Maybe Text)
-> (CreateProgramResponse -> Maybe Text -> CreateProgramResponse)
-> Lens
CreateProgramResponse
CreateProgramResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgramResponse' {Maybe Text
sourceLocationName :: Maybe Text
$sel:sourceLocationName:CreateProgramResponse' :: CreateProgramResponse -> Maybe Text
sourceLocationName} -> Maybe Text
sourceLocationName) (\s :: CreateProgramResponse
s@CreateProgramResponse' {} Maybe Text
a -> CreateProgramResponse
s {$sel:sourceLocationName:CreateProgramResponse' :: Maybe Text
sourceLocationName = Maybe Text
a} :: CreateProgramResponse)
createProgramResponse_arn :: Lens.Lens' CreateProgramResponse (Prelude.Maybe Prelude.Text)
createProgramResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateProgramResponse -> f CreateProgramResponse
createProgramResponse_arn = (CreateProgramResponse -> Maybe Text)
-> (CreateProgramResponse -> Maybe Text -> CreateProgramResponse)
-> Lens
CreateProgramResponse
CreateProgramResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgramResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateProgramResponse' :: CreateProgramResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateProgramResponse
s@CreateProgramResponse' {} Maybe Text
a -> CreateProgramResponse
s {$sel:arn:CreateProgramResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateProgramResponse)
createProgramResponse_programName :: Lens.Lens' CreateProgramResponse (Prelude.Maybe Prelude.Text)
createProgramResponse_programName :: (Maybe Text -> f (Maybe Text))
-> CreateProgramResponse -> f CreateProgramResponse
createProgramResponse_programName = (CreateProgramResponse -> Maybe Text)
-> (CreateProgramResponse -> Maybe Text -> CreateProgramResponse)
-> Lens
CreateProgramResponse
CreateProgramResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgramResponse' {Maybe Text
programName :: Maybe Text
$sel:programName:CreateProgramResponse' :: CreateProgramResponse -> Maybe Text
programName} -> Maybe Text
programName) (\s :: CreateProgramResponse
s@CreateProgramResponse' {} Maybe Text
a -> CreateProgramResponse
s {$sel:programName:CreateProgramResponse' :: Maybe Text
programName = Maybe Text
a} :: CreateProgramResponse)
createProgramResponse_adBreaks :: Lens.Lens' CreateProgramResponse (Prelude.Maybe [AdBreak])
createProgramResponse_adBreaks :: (Maybe [AdBreak] -> f (Maybe [AdBreak]))
-> CreateProgramResponse -> f CreateProgramResponse
createProgramResponse_adBreaks = (CreateProgramResponse -> Maybe [AdBreak])
-> (CreateProgramResponse
-> Maybe [AdBreak] -> CreateProgramResponse)
-> Lens
CreateProgramResponse
CreateProgramResponse
(Maybe [AdBreak])
(Maybe [AdBreak])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgramResponse' {Maybe [AdBreak]
adBreaks :: Maybe [AdBreak]
$sel:adBreaks:CreateProgramResponse' :: CreateProgramResponse -> Maybe [AdBreak]
adBreaks} -> Maybe [AdBreak]
adBreaks) (\s :: CreateProgramResponse
s@CreateProgramResponse' {} Maybe [AdBreak]
a -> CreateProgramResponse
s {$sel:adBreaks:CreateProgramResponse' :: Maybe [AdBreak]
adBreaks = Maybe [AdBreak]
a} :: CreateProgramResponse) ((Maybe [AdBreak] -> f (Maybe [AdBreak]))
-> CreateProgramResponse -> f CreateProgramResponse)
-> ((Maybe [AdBreak] -> f (Maybe [AdBreak]))
-> Maybe [AdBreak] -> f (Maybe [AdBreak]))
-> (Maybe [AdBreak] -> f (Maybe [AdBreak]))
-> CreateProgramResponse
-> f CreateProgramResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AdBreak] [AdBreak] [AdBreak] [AdBreak]
-> Iso
(Maybe [AdBreak])
(Maybe [AdBreak])
(Maybe [AdBreak])
(Maybe [AdBreak])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [AdBreak] [AdBreak] [AdBreak] [AdBreak]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createProgramResponse_channelName :: Lens.Lens' CreateProgramResponse (Prelude.Maybe Prelude.Text)
createProgramResponse_channelName :: (Maybe Text -> f (Maybe Text))
-> CreateProgramResponse -> f CreateProgramResponse
createProgramResponse_channelName = (CreateProgramResponse -> Maybe Text)
-> (CreateProgramResponse -> Maybe Text -> CreateProgramResponse)
-> Lens
CreateProgramResponse
CreateProgramResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgramResponse' {Maybe Text
channelName :: Maybe Text
$sel:channelName:CreateProgramResponse' :: CreateProgramResponse -> Maybe Text
channelName} -> Maybe Text
channelName) (\s :: CreateProgramResponse
s@CreateProgramResponse' {} Maybe Text
a -> CreateProgramResponse
s {$sel:channelName:CreateProgramResponse' :: Maybe Text
channelName = Maybe Text
a} :: CreateProgramResponse)
createProgramResponse_scheduledStartTime :: Lens.Lens' CreateProgramResponse (Prelude.Maybe Prelude.UTCTime)
createProgramResponse_scheduledStartTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateProgramResponse -> f CreateProgramResponse
createProgramResponse_scheduledStartTime = (CreateProgramResponse -> Maybe POSIX)
-> (CreateProgramResponse -> Maybe POSIX -> CreateProgramResponse)
-> Lens
CreateProgramResponse
CreateProgramResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgramResponse' {Maybe POSIX
scheduledStartTime :: Maybe POSIX
$sel:scheduledStartTime:CreateProgramResponse' :: CreateProgramResponse -> Maybe POSIX
scheduledStartTime} -> Maybe POSIX
scheduledStartTime) (\s :: CreateProgramResponse
s@CreateProgramResponse' {} Maybe POSIX
a -> CreateProgramResponse
s {$sel:scheduledStartTime:CreateProgramResponse' :: Maybe POSIX
scheduledStartTime = Maybe POSIX
a} :: CreateProgramResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateProgramResponse -> f CreateProgramResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateProgramResponse
-> f CreateProgramResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
createProgramResponse_vodSourceName :: Lens.Lens' CreateProgramResponse (Prelude.Maybe Prelude.Text)
createProgramResponse_vodSourceName :: (Maybe Text -> f (Maybe Text))
-> CreateProgramResponse -> f CreateProgramResponse
createProgramResponse_vodSourceName = (CreateProgramResponse -> Maybe Text)
-> (CreateProgramResponse -> Maybe Text -> CreateProgramResponse)
-> Lens
CreateProgramResponse
CreateProgramResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgramResponse' {Maybe Text
vodSourceName :: Maybe Text
$sel:vodSourceName:CreateProgramResponse' :: CreateProgramResponse -> Maybe Text
vodSourceName} -> Maybe Text
vodSourceName) (\s :: CreateProgramResponse
s@CreateProgramResponse' {} Maybe Text
a -> CreateProgramResponse
s {$sel:vodSourceName:CreateProgramResponse' :: Maybe Text
vodSourceName = Maybe Text
a} :: CreateProgramResponse)
createProgramResponse_httpStatus :: Lens.Lens' CreateProgramResponse Prelude.Int
createProgramResponse_httpStatus :: (Int -> f Int) -> CreateProgramResponse -> f CreateProgramResponse
createProgramResponse_httpStatus = (CreateProgramResponse -> Int)
-> (CreateProgramResponse -> Int -> CreateProgramResponse)
-> Lens CreateProgramResponse CreateProgramResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProgramResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateProgramResponse' :: CreateProgramResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateProgramResponse
s@CreateProgramResponse' {} Int
a -> CreateProgramResponse
s {$sel:httpStatus:CreateProgramResponse' :: Int
httpStatus = Int
a} :: CreateProgramResponse)
instance Prelude.NFData CreateProgramResponse