{-# 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.CreateChannel
(
CreateChannel (..),
newCreateChannel,
createChannel_fillerSlate,
createChannel_tags,
createChannel_channelName,
createChannel_outputs,
createChannel_playbackMode,
CreateChannelResponse (..),
newCreateChannelResponse,
createChannelResponse_creationTime,
createChannelResponse_arn,
createChannelResponse_lastModifiedTime,
createChannelResponse_playbackMode,
createChannelResponse_channelName,
createChannelResponse_outputs,
createChannelResponse_channelState,
createChannelResponse_fillerSlate,
createChannelResponse_tags,
createChannelResponse_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 CreateChannel = CreateChannel'
{
CreateChannel -> Maybe SlateSource
fillerSlate :: Prelude.Maybe SlateSource,
CreateChannel -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateChannel -> Text
channelName :: Prelude.Text,
CreateChannel -> [RequestOutputItem]
outputs :: [RequestOutputItem],
CreateChannel -> PlaybackMode
playbackMode :: PlaybackMode
}
deriving (CreateChannel -> CreateChannel -> Bool
(CreateChannel -> CreateChannel -> Bool)
-> (CreateChannel -> CreateChannel -> Bool) -> Eq CreateChannel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateChannel -> CreateChannel -> Bool
$c/= :: CreateChannel -> CreateChannel -> Bool
== :: CreateChannel -> CreateChannel -> Bool
$c== :: CreateChannel -> CreateChannel -> Bool
Prelude.Eq, ReadPrec [CreateChannel]
ReadPrec CreateChannel
Int -> ReadS CreateChannel
ReadS [CreateChannel]
(Int -> ReadS CreateChannel)
-> ReadS [CreateChannel]
-> ReadPrec CreateChannel
-> ReadPrec [CreateChannel]
-> Read CreateChannel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateChannel]
$creadListPrec :: ReadPrec [CreateChannel]
readPrec :: ReadPrec CreateChannel
$creadPrec :: ReadPrec CreateChannel
readList :: ReadS [CreateChannel]
$creadList :: ReadS [CreateChannel]
readsPrec :: Int -> ReadS CreateChannel
$creadsPrec :: Int -> ReadS CreateChannel
Prelude.Read, Int -> CreateChannel -> ShowS
[CreateChannel] -> ShowS
CreateChannel -> String
(Int -> CreateChannel -> ShowS)
-> (CreateChannel -> String)
-> ([CreateChannel] -> ShowS)
-> Show CreateChannel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateChannel] -> ShowS
$cshowList :: [CreateChannel] -> ShowS
show :: CreateChannel -> String
$cshow :: CreateChannel -> String
showsPrec :: Int -> CreateChannel -> ShowS
$cshowsPrec :: Int -> CreateChannel -> ShowS
Prelude.Show, (forall x. CreateChannel -> Rep CreateChannel x)
-> (forall x. Rep CreateChannel x -> CreateChannel)
-> Generic CreateChannel
forall x. Rep CreateChannel x -> CreateChannel
forall x. CreateChannel -> Rep CreateChannel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateChannel x -> CreateChannel
$cfrom :: forall x. CreateChannel -> Rep CreateChannel x
Prelude.Generic)
newCreateChannel ::
Prelude.Text ->
PlaybackMode ->
CreateChannel
newCreateChannel :: Text -> PlaybackMode -> CreateChannel
newCreateChannel Text
pChannelName_ PlaybackMode
pPlaybackMode_ =
CreateChannel' :: Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Text
-> [RequestOutputItem]
-> PlaybackMode
-> CreateChannel
CreateChannel'
{ $sel:fillerSlate:CreateChannel' :: Maybe SlateSource
fillerSlate = Maybe SlateSource
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateChannel' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:channelName:CreateChannel' :: Text
channelName = Text
pChannelName_,
$sel:outputs:CreateChannel' :: [RequestOutputItem]
outputs = [RequestOutputItem]
forall a. Monoid a => a
Prelude.mempty,
$sel:playbackMode:CreateChannel' :: PlaybackMode
playbackMode = PlaybackMode
pPlaybackMode_
}
createChannel_fillerSlate :: Lens.Lens' CreateChannel (Prelude.Maybe SlateSource)
createChannel_fillerSlate :: (Maybe SlateSource -> f (Maybe SlateSource))
-> CreateChannel -> f CreateChannel
createChannel_fillerSlate = (CreateChannel -> Maybe SlateSource)
-> (CreateChannel -> Maybe SlateSource -> CreateChannel)
-> Lens
CreateChannel CreateChannel (Maybe SlateSource) (Maybe SlateSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel' {Maybe SlateSource
fillerSlate :: Maybe SlateSource
$sel:fillerSlate:CreateChannel' :: CreateChannel -> Maybe SlateSource
fillerSlate} -> Maybe SlateSource
fillerSlate) (\s :: CreateChannel
s@CreateChannel' {} Maybe SlateSource
a -> CreateChannel
s {$sel:fillerSlate:CreateChannel' :: Maybe SlateSource
fillerSlate = Maybe SlateSource
a} :: CreateChannel)
createChannel_tags :: Lens.Lens' CreateChannel (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createChannel_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateChannel -> f CreateChannel
createChannel_tags = (CreateChannel -> Maybe (HashMap Text Text))
-> (CreateChannel -> Maybe (HashMap Text Text) -> CreateChannel)
-> Lens
CreateChannel
CreateChannel
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateChannel' :: CreateChannel -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateChannel
s@CreateChannel' {} Maybe (HashMap Text Text)
a -> CreateChannel
s {$sel:tags:CreateChannel' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateChannel) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateChannel -> f CreateChannel)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateChannel
-> f CreateChannel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createChannel_channelName :: Lens.Lens' CreateChannel Prelude.Text
createChannel_channelName :: (Text -> f Text) -> CreateChannel -> f CreateChannel
createChannel_channelName = (CreateChannel -> Text)
-> (CreateChannel -> Text -> CreateChannel)
-> Lens CreateChannel CreateChannel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel' {Text
channelName :: Text
$sel:channelName:CreateChannel' :: CreateChannel -> Text
channelName} -> Text
channelName) (\s :: CreateChannel
s@CreateChannel' {} Text
a -> CreateChannel
s {$sel:channelName:CreateChannel' :: Text
channelName = Text
a} :: CreateChannel)
createChannel_outputs :: Lens.Lens' CreateChannel [RequestOutputItem]
createChannel_outputs :: ([RequestOutputItem] -> f [RequestOutputItem])
-> CreateChannel -> f CreateChannel
createChannel_outputs = (CreateChannel -> [RequestOutputItem])
-> (CreateChannel -> [RequestOutputItem] -> CreateChannel)
-> Lens
CreateChannel CreateChannel [RequestOutputItem] [RequestOutputItem]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel' {[RequestOutputItem]
outputs :: [RequestOutputItem]
$sel:outputs:CreateChannel' :: CreateChannel -> [RequestOutputItem]
outputs} -> [RequestOutputItem]
outputs) (\s :: CreateChannel
s@CreateChannel' {} [RequestOutputItem]
a -> CreateChannel
s {$sel:outputs:CreateChannel' :: [RequestOutputItem]
outputs = [RequestOutputItem]
a} :: CreateChannel) (([RequestOutputItem] -> f [RequestOutputItem])
-> CreateChannel -> f CreateChannel)
-> (([RequestOutputItem] -> f [RequestOutputItem])
-> [RequestOutputItem] -> f [RequestOutputItem])
-> ([RequestOutputItem] -> f [RequestOutputItem])
-> CreateChannel
-> f CreateChannel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([RequestOutputItem] -> f [RequestOutputItem])
-> [RequestOutputItem] -> f [RequestOutputItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createChannel_playbackMode :: Lens.Lens' CreateChannel PlaybackMode
createChannel_playbackMode :: (PlaybackMode -> f PlaybackMode)
-> CreateChannel -> f CreateChannel
createChannel_playbackMode = (CreateChannel -> PlaybackMode)
-> (CreateChannel -> PlaybackMode -> CreateChannel)
-> Lens CreateChannel CreateChannel PlaybackMode PlaybackMode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel' {PlaybackMode
playbackMode :: PlaybackMode
$sel:playbackMode:CreateChannel' :: CreateChannel -> PlaybackMode
playbackMode} -> PlaybackMode
playbackMode) (\s :: CreateChannel
s@CreateChannel' {} PlaybackMode
a -> CreateChannel
s {$sel:playbackMode:CreateChannel' :: PlaybackMode
playbackMode = PlaybackMode
a} :: CreateChannel)
instance Core.AWSRequest CreateChannel where
type
AWSResponse CreateChannel =
CreateChannelResponse
request :: CreateChannel -> Request CreateChannel
request = Service -> CreateChannel -> Request CreateChannel
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateChannel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateChannel)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateChannel))
-> Logger
-> Service
-> Proxy CreateChannel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateChannel)))
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 POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [ResponseOutputItem]
-> Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse
CreateChannelResponse'
(Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [ResponseOutputItem]
-> Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse)
-> Either String (Maybe POSIX)
-> Either
String
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [ResponseOutputItem]
-> Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse)
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 POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [ResponseOutputItem]
-> Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [ResponseOutputItem]
-> Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse)
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 POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [ResponseOutputItem]
-> Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse)
-> Either String (Maybe POSIX)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe [ResponseOutputItem]
-> Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse)
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
"LastModifiedTime")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe [ResponseOutputItem]
-> Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe [ResponseOutputItem]
-> Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse)
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
"PlaybackMode")
Either
String
(Maybe Text
-> Maybe [ResponseOutputItem]
-> Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [ResponseOutputItem]
-> Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse)
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 [ResponseOutputItem]
-> Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse)
-> Either String (Maybe [ResponseOutputItem])
-> Either
String
(Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe (Maybe [ResponseOutputItem]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Outputs" Either String (Maybe (Maybe [ResponseOutputItem]))
-> Maybe [ResponseOutputItem]
-> Either String (Maybe [ResponseOutputItem])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ResponseOutputItem]
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse)
-> Either String (Maybe ChannelState)
-> Either
String
(Maybe SlateSource
-> Maybe (HashMap Text Text) -> Int -> CreateChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ChannelState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ChannelState")
Either
String
(Maybe SlateSource
-> Maybe (HashMap Text Text) -> Int -> CreateChannelResponse)
-> Either String (Maybe SlateSource)
-> Either
String (Maybe (HashMap Text Text) -> Int -> CreateChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe SlateSource)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FillerSlate")
Either
String (Maybe (HashMap Text Text) -> Int -> CreateChannelResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> CreateChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> CreateChannelResponse)
-> Either String Int -> Either String CreateChannelResponse
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 CreateChannel
instance Prelude.NFData CreateChannel
instance Core.ToHeaders CreateChannel where
toHeaders :: CreateChannel -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateChannel -> 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 CreateChannel where
toJSON :: CreateChannel -> Value
toJSON CreateChannel' {[RequestOutputItem]
Maybe (HashMap Text Text)
Maybe SlateSource
Text
PlaybackMode
playbackMode :: PlaybackMode
outputs :: [RequestOutputItem]
channelName :: Text
tags :: Maybe (HashMap Text Text)
fillerSlate :: Maybe SlateSource
$sel:playbackMode:CreateChannel' :: CreateChannel -> PlaybackMode
$sel:outputs:CreateChannel' :: CreateChannel -> [RequestOutputItem]
$sel:channelName:CreateChannel' :: CreateChannel -> Text
$sel:tags:CreateChannel' :: CreateChannel -> Maybe (HashMap Text Text)
$sel:fillerSlate:CreateChannel' :: CreateChannel -> Maybe SlateSource
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"FillerSlate" Text -> SlateSource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SlateSource -> Pair) -> Maybe SlateSource -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SlateSource
fillerSlate,
(Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Outputs" Text -> [RequestOutputItem] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [RequestOutputItem]
outputs),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PlaybackMode" Text -> PlaybackMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= PlaybackMode
playbackMode)
]
)
instance Core.ToPath CreateChannel where
toPath :: CreateChannel -> ByteString
toPath CreateChannel' {[RequestOutputItem]
Maybe (HashMap Text Text)
Maybe SlateSource
Text
PlaybackMode
playbackMode :: PlaybackMode
outputs :: [RequestOutputItem]
channelName :: Text
tags :: Maybe (HashMap Text Text)
fillerSlate :: Maybe SlateSource
$sel:playbackMode:CreateChannel' :: CreateChannel -> PlaybackMode
$sel:outputs:CreateChannel' :: CreateChannel -> [RequestOutputItem]
$sel:channelName:CreateChannel' :: CreateChannel -> Text
$sel:tags:CreateChannel' :: CreateChannel -> Maybe (HashMap Text Text)
$sel:fillerSlate:CreateChannel' :: CreateChannel -> Maybe SlateSource
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/channel/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
channelName]
instance Core.ToQuery CreateChannel where
toQuery :: CreateChannel -> QueryString
toQuery = QueryString -> CreateChannel -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateChannelResponse = CreateChannelResponse'
{
CreateChannelResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
CreateChannelResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CreateChannelResponse -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
CreateChannelResponse -> Maybe Text
playbackMode :: Prelude.Maybe Prelude.Text,
CreateChannelResponse -> Maybe Text
channelName :: Prelude.Maybe Prelude.Text,
CreateChannelResponse -> Maybe [ResponseOutputItem]
outputs :: Prelude.Maybe [ResponseOutputItem],
CreateChannelResponse -> Maybe ChannelState
channelState :: Prelude.Maybe ChannelState,
CreateChannelResponse -> Maybe SlateSource
fillerSlate :: Prelude.Maybe SlateSource,
CreateChannelResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateChannelResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateChannelResponse -> CreateChannelResponse -> Bool
(CreateChannelResponse -> CreateChannelResponse -> Bool)
-> (CreateChannelResponse -> CreateChannelResponse -> Bool)
-> Eq CreateChannelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateChannelResponse -> CreateChannelResponse -> Bool
$c/= :: CreateChannelResponse -> CreateChannelResponse -> Bool
== :: CreateChannelResponse -> CreateChannelResponse -> Bool
$c== :: CreateChannelResponse -> CreateChannelResponse -> Bool
Prelude.Eq, ReadPrec [CreateChannelResponse]
ReadPrec CreateChannelResponse
Int -> ReadS CreateChannelResponse
ReadS [CreateChannelResponse]
(Int -> ReadS CreateChannelResponse)
-> ReadS [CreateChannelResponse]
-> ReadPrec CreateChannelResponse
-> ReadPrec [CreateChannelResponse]
-> Read CreateChannelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateChannelResponse]
$creadListPrec :: ReadPrec [CreateChannelResponse]
readPrec :: ReadPrec CreateChannelResponse
$creadPrec :: ReadPrec CreateChannelResponse
readList :: ReadS [CreateChannelResponse]
$creadList :: ReadS [CreateChannelResponse]
readsPrec :: Int -> ReadS CreateChannelResponse
$creadsPrec :: Int -> ReadS CreateChannelResponse
Prelude.Read, Int -> CreateChannelResponse -> ShowS
[CreateChannelResponse] -> ShowS
CreateChannelResponse -> String
(Int -> CreateChannelResponse -> ShowS)
-> (CreateChannelResponse -> String)
-> ([CreateChannelResponse] -> ShowS)
-> Show CreateChannelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateChannelResponse] -> ShowS
$cshowList :: [CreateChannelResponse] -> ShowS
show :: CreateChannelResponse -> String
$cshow :: CreateChannelResponse -> String
showsPrec :: Int -> CreateChannelResponse -> ShowS
$cshowsPrec :: Int -> CreateChannelResponse -> ShowS
Prelude.Show, (forall x. CreateChannelResponse -> Rep CreateChannelResponse x)
-> (forall x. Rep CreateChannelResponse x -> CreateChannelResponse)
-> Generic CreateChannelResponse
forall x. Rep CreateChannelResponse x -> CreateChannelResponse
forall x. CreateChannelResponse -> Rep CreateChannelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateChannelResponse x -> CreateChannelResponse
$cfrom :: forall x. CreateChannelResponse -> Rep CreateChannelResponse x
Prelude.Generic)
newCreateChannelResponse ::
Prelude.Int ->
CreateChannelResponse
newCreateChannelResponse :: Int -> CreateChannelResponse
newCreateChannelResponse Int
pHttpStatus_ =
CreateChannelResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [ResponseOutputItem]
-> Maybe ChannelState
-> Maybe SlateSource
-> Maybe (HashMap Text Text)
-> Int
-> CreateChannelResponse
CreateChannelResponse'
{ $sel:creationTime:CreateChannelResponse' :: Maybe POSIX
creationTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:arn:CreateChannelResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedTime:CreateChannelResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:playbackMode:CreateChannelResponse' :: Maybe Text
playbackMode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:channelName:CreateChannelResponse' :: Maybe Text
channelName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:outputs:CreateChannelResponse' :: Maybe [ResponseOutputItem]
outputs = Maybe [ResponseOutputItem]
forall a. Maybe a
Prelude.Nothing,
$sel:channelState:CreateChannelResponse' :: Maybe ChannelState
channelState = Maybe ChannelState
forall a. Maybe a
Prelude.Nothing,
$sel:fillerSlate:CreateChannelResponse' :: Maybe SlateSource
fillerSlate = Maybe SlateSource
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateChannelResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateChannelResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createChannelResponse_creationTime :: Lens.Lens' CreateChannelResponse (Prelude.Maybe Prelude.UTCTime)
createChannelResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateChannelResponse -> f CreateChannelResponse
createChannelResponse_creationTime = (CreateChannelResponse -> Maybe POSIX)
-> (CreateChannelResponse -> Maybe POSIX -> CreateChannelResponse)
-> Lens
CreateChannelResponse
CreateChannelResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:CreateChannelResponse' :: CreateChannelResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: CreateChannelResponse
s@CreateChannelResponse' {} Maybe POSIX
a -> CreateChannelResponse
s {$sel:creationTime:CreateChannelResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: CreateChannelResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateChannelResponse -> f CreateChannelResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateChannelResponse
-> f CreateChannelResponse
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
createChannelResponse_arn :: Lens.Lens' CreateChannelResponse (Prelude.Maybe Prelude.Text)
createChannelResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateChannelResponse -> f CreateChannelResponse
createChannelResponse_arn = (CreateChannelResponse -> Maybe Text)
-> (CreateChannelResponse -> Maybe Text -> CreateChannelResponse)
-> Lens
CreateChannelResponse
CreateChannelResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateChannelResponse' :: CreateChannelResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateChannelResponse
s@CreateChannelResponse' {} Maybe Text
a -> CreateChannelResponse
s {$sel:arn:CreateChannelResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateChannelResponse)
createChannelResponse_lastModifiedTime :: Lens.Lens' CreateChannelResponse (Prelude.Maybe Prelude.UTCTime)
createChannelResponse_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateChannelResponse -> f CreateChannelResponse
createChannelResponse_lastModifiedTime = (CreateChannelResponse -> Maybe POSIX)
-> (CreateChannelResponse -> Maybe POSIX -> CreateChannelResponse)
-> Lens
CreateChannelResponse
CreateChannelResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelResponse' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:CreateChannelResponse' :: CreateChannelResponse -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: CreateChannelResponse
s@CreateChannelResponse' {} Maybe POSIX
a -> CreateChannelResponse
s {$sel:lastModifiedTime:CreateChannelResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: CreateChannelResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateChannelResponse -> f CreateChannelResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateChannelResponse
-> f CreateChannelResponse
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
createChannelResponse_playbackMode :: Lens.Lens' CreateChannelResponse (Prelude.Maybe Prelude.Text)
createChannelResponse_playbackMode :: (Maybe Text -> f (Maybe Text))
-> CreateChannelResponse -> f CreateChannelResponse
createChannelResponse_playbackMode = (CreateChannelResponse -> Maybe Text)
-> (CreateChannelResponse -> Maybe Text -> CreateChannelResponse)
-> Lens
CreateChannelResponse
CreateChannelResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelResponse' {Maybe Text
playbackMode :: Maybe Text
$sel:playbackMode:CreateChannelResponse' :: CreateChannelResponse -> Maybe Text
playbackMode} -> Maybe Text
playbackMode) (\s :: CreateChannelResponse
s@CreateChannelResponse' {} Maybe Text
a -> CreateChannelResponse
s {$sel:playbackMode:CreateChannelResponse' :: Maybe Text
playbackMode = Maybe Text
a} :: CreateChannelResponse)
createChannelResponse_channelName :: Lens.Lens' CreateChannelResponse (Prelude.Maybe Prelude.Text)
createChannelResponse_channelName :: (Maybe Text -> f (Maybe Text))
-> CreateChannelResponse -> f CreateChannelResponse
createChannelResponse_channelName = (CreateChannelResponse -> Maybe Text)
-> (CreateChannelResponse -> Maybe Text -> CreateChannelResponse)
-> Lens
CreateChannelResponse
CreateChannelResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelResponse' {Maybe Text
channelName :: Maybe Text
$sel:channelName:CreateChannelResponse' :: CreateChannelResponse -> Maybe Text
channelName} -> Maybe Text
channelName) (\s :: CreateChannelResponse
s@CreateChannelResponse' {} Maybe Text
a -> CreateChannelResponse
s {$sel:channelName:CreateChannelResponse' :: Maybe Text
channelName = Maybe Text
a} :: CreateChannelResponse)
createChannelResponse_outputs :: Lens.Lens' CreateChannelResponse (Prelude.Maybe [ResponseOutputItem])
createChannelResponse_outputs :: (Maybe [ResponseOutputItem] -> f (Maybe [ResponseOutputItem]))
-> CreateChannelResponse -> f CreateChannelResponse
createChannelResponse_outputs = (CreateChannelResponse -> Maybe [ResponseOutputItem])
-> (CreateChannelResponse
-> Maybe [ResponseOutputItem] -> CreateChannelResponse)
-> Lens
CreateChannelResponse
CreateChannelResponse
(Maybe [ResponseOutputItem])
(Maybe [ResponseOutputItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelResponse' {Maybe [ResponseOutputItem]
outputs :: Maybe [ResponseOutputItem]
$sel:outputs:CreateChannelResponse' :: CreateChannelResponse -> Maybe [ResponseOutputItem]
outputs} -> Maybe [ResponseOutputItem]
outputs) (\s :: CreateChannelResponse
s@CreateChannelResponse' {} Maybe [ResponseOutputItem]
a -> CreateChannelResponse
s {$sel:outputs:CreateChannelResponse' :: Maybe [ResponseOutputItem]
outputs = Maybe [ResponseOutputItem]
a} :: CreateChannelResponse) ((Maybe [ResponseOutputItem] -> f (Maybe [ResponseOutputItem]))
-> CreateChannelResponse -> f CreateChannelResponse)
-> ((Maybe [ResponseOutputItem] -> f (Maybe [ResponseOutputItem]))
-> Maybe [ResponseOutputItem] -> f (Maybe [ResponseOutputItem]))
-> (Maybe [ResponseOutputItem] -> f (Maybe [ResponseOutputItem]))
-> CreateChannelResponse
-> f CreateChannelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ResponseOutputItem]
[ResponseOutputItem]
[ResponseOutputItem]
[ResponseOutputItem]
-> Iso
(Maybe [ResponseOutputItem])
(Maybe [ResponseOutputItem])
(Maybe [ResponseOutputItem])
(Maybe [ResponseOutputItem])
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
[ResponseOutputItem]
[ResponseOutputItem]
[ResponseOutputItem]
[ResponseOutputItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createChannelResponse_channelState :: Lens.Lens' CreateChannelResponse (Prelude.Maybe ChannelState)
createChannelResponse_channelState :: (Maybe ChannelState -> f (Maybe ChannelState))
-> CreateChannelResponse -> f CreateChannelResponse
createChannelResponse_channelState = (CreateChannelResponse -> Maybe ChannelState)
-> (CreateChannelResponse
-> Maybe ChannelState -> CreateChannelResponse)
-> Lens
CreateChannelResponse
CreateChannelResponse
(Maybe ChannelState)
(Maybe ChannelState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelResponse' {Maybe ChannelState
channelState :: Maybe ChannelState
$sel:channelState:CreateChannelResponse' :: CreateChannelResponse -> Maybe ChannelState
channelState} -> Maybe ChannelState
channelState) (\s :: CreateChannelResponse
s@CreateChannelResponse' {} Maybe ChannelState
a -> CreateChannelResponse
s {$sel:channelState:CreateChannelResponse' :: Maybe ChannelState
channelState = Maybe ChannelState
a} :: CreateChannelResponse)
createChannelResponse_fillerSlate :: Lens.Lens' CreateChannelResponse (Prelude.Maybe SlateSource)
createChannelResponse_fillerSlate :: (Maybe SlateSource -> f (Maybe SlateSource))
-> CreateChannelResponse -> f CreateChannelResponse
createChannelResponse_fillerSlate = (CreateChannelResponse -> Maybe SlateSource)
-> (CreateChannelResponse
-> Maybe SlateSource -> CreateChannelResponse)
-> Lens
CreateChannelResponse
CreateChannelResponse
(Maybe SlateSource)
(Maybe SlateSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelResponse' {Maybe SlateSource
fillerSlate :: Maybe SlateSource
$sel:fillerSlate:CreateChannelResponse' :: CreateChannelResponse -> Maybe SlateSource
fillerSlate} -> Maybe SlateSource
fillerSlate) (\s :: CreateChannelResponse
s@CreateChannelResponse' {} Maybe SlateSource
a -> CreateChannelResponse
s {$sel:fillerSlate:CreateChannelResponse' :: Maybe SlateSource
fillerSlate = Maybe SlateSource
a} :: CreateChannelResponse)
createChannelResponse_tags :: Lens.Lens' CreateChannelResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createChannelResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateChannelResponse -> f CreateChannelResponse
createChannelResponse_tags = (CreateChannelResponse -> Maybe (HashMap Text Text))
-> (CreateChannelResponse
-> Maybe (HashMap Text Text) -> CreateChannelResponse)
-> Lens
CreateChannelResponse
CreateChannelResponse
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateChannelResponse' :: CreateChannelResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateChannelResponse
s@CreateChannelResponse' {} Maybe (HashMap Text Text)
a -> CreateChannelResponse
s {$sel:tags:CreateChannelResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateChannelResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateChannelResponse -> f CreateChannelResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateChannelResponse
-> f CreateChannelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createChannelResponse_httpStatus :: Lens.Lens' CreateChannelResponse Prelude.Int
createChannelResponse_httpStatus :: (Int -> f Int) -> CreateChannelResponse -> f CreateChannelResponse
createChannelResponse_httpStatus = (CreateChannelResponse -> Int)
-> (CreateChannelResponse -> Int -> CreateChannelResponse)
-> Lens CreateChannelResponse CreateChannelResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateChannelResponse' :: CreateChannelResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateChannelResponse
s@CreateChannelResponse' {} Int
a -> CreateChannelResponse
s {$sel:httpStatus:CreateChannelResponse' :: Int
httpStatus = Int
a} :: CreateChannelResponse)
instance Prelude.NFData CreateChannelResponse