{-# 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.MediaLive.CreateChannel
(
CreateChannel' (..),
newCreateChannel',
createChannel'_requestId,
createChannel'_logLevel,
createChannel'_inputSpecification,
createChannel'_inputAttachments,
createChannel'_reserved,
createChannel'_destinations,
createChannel'_name,
createChannel'_cdiInputSpecification,
createChannel'_channelClass,
createChannel'_vpc,
createChannel'_tags,
createChannel'_encoderSettings,
createChannel'_roleArn,
CreateChannelResponse (..),
newCreateChannelResponse,
createChannelResponse_channel,
createChannelResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateChannel' = CreateChannel''
{
CreateChannel' -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
CreateChannel' -> Maybe LogLevel
logLevel :: Prelude.Maybe LogLevel,
CreateChannel' -> Maybe InputSpecification
inputSpecification :: Prelude.Maybe InputSpecification,
CreateChannel' -> Maybe [InputAttachment]
inputAttachments :: Prelude.Maybe [InputAttachment],
CreateChannel' -> Maybe Text
reserved :: Prelude.Maybe Prelude.Text,
CreateChannel' -> Maybe [OutputDestination]
destinations :: Prelude.Maybe [OutputDestination],
CreateChannel' -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CreateChannel' -> Maybe CdiInputSpecification
cdiInputSpecification :: Prelude.Maybe CdiInputSpecification,
CreateChannel' -> Maybe ChannelClass
channelClass :: Prelude.Maybe ChannelClass,
CreateChannel' -> Maybe VpcOutputSettings
vpc :: Prelude.Maybe VpcOutputSettings,
CreateChannel' -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateChannel' -> Maybe EncoderSettings
encoderSettings :: Prelude.Maybe EncoderSettings,
CreateChannel' -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text
}
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' ::
CreateChannel'
newCreateChannel' :: CreateChannel'
newCreateChannel' =
CreateChannel'' :: Maybe Text
-> Maybe LogLevel
-> Maybe InputSpecification
-> Maybe [InputAttachment]
-> Maybe Text
-> Maybe [OutputDestination]
-> Maybe Text
-> Maybe CdiInputSpecification
-> Maybe ChannelClass
-> Maybe VpcOutputSettings
-> Maybe (HashMap Text Text)
-> Maybe EncoderSettings
-> Maybe Text
-> CreateChannel'
CreateChannel''
{ $sel:requestId:CreateChannel'' :: Maybe Text
requestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:logLevel:CreateChannel'' :: Maybe LogLevel
logLevel = Maybe LogLevel
forall a. Maybe a
Prelude.Nothing,
$sel:inputSpecification:CreateChannel'' :: Maybe InputSpecification
inputSpecification = Maybe InputSpecification
forall a. Maybe a
Prelude.Nothing,
$sel:inputAttachments:CreateChannel'' :: Maybe [InputAttachment]
inputAttachments = Maybe [InputAttachment]
forall a. Maybe a
Prelude.Nothing,
$sel:reserved:CreateChannel'' :: Maybe Text
reserved = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:destinations:CreateChannel'' :: Maybe [OutputDestination]
destinations = Maybe [OutputDestination]
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateChannel'' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cdiInputSpecification:CreateChannel'' :: Maybe CdiInputSpecification
cdiInputSpecification = Maybe CdiInputSpecification
forall a. Maybe a
Prelude.Nothing,
$sel:channelClass:CreateChannel'' :: Maybe ChannelClass
channelClass = Maybe ChannelClass
forall a. Maybe a
Prelude.Nothing,
$sel:vpc:CreateChannel'' :: Maybe VpcOutputSettings
vpc = Maybe VpcOutputSettings
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:encoderSettings:CreateChannel'' :: Maybe EncoderSettings
encoderSettings = Maybe EncoderSettings
forall a. Maybe a
Prelude.Nothing,
$sel:roleArn:CreateChannel'' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
createChannel'_requestId :: Lens.Lens' CreateChannel' (Prelude.Maybe Prelude.Text)
createChannel'_requestId :: (Maybe Text -> f (Maybe Text))
-> CreateChannel' -> f CreateChannel'
createChannel'_requestId = (CreateChannel' -> Maybe Text)
-> (CreateChannel' -> Maybe Text -> CreateChannel')
-> Lens CreateChannel' CreateChannel' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel'' {Maybe Text
requestId :: Maybe Text
$sel:requestId:CreateChannel'' :: CreateChannel' -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: CreateChannel'
s@CreateChannel'' {} Maybe Text
a -> CreateChannel'
s {$sel:requestId:CreateChannel'' :: Maybe Text
requestId = Maybe Text
a} :: CreateChannel')
createChannel'_logLevel :: Lens.Lens' CreateChannel' (Prelude.Maybe LogLevel)
createChannel'_logLevel :: (Maybe LogLevel -> f (Maybe LogLevel))
-> CreateChannel' -> f CreateChannel'
createChannel'_logLevel = (CreateChannel' -> Maybe LogLevel)
-> (CreateChannel' -> Maybe LogLevel -> CreateChannel')
-> Lens
CreateChannel' CreateChannel' (Maybe LogLevel) (Maybe LogLevel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel'' {Maybe LogLevel
logLevel :: Maybe LogLevel
$sel:logLevel:CreateChannel'' :: CreateChannel' -> Maybe LogLevel
logLevel} -> Maybe LogLevel
logLevel) (\s :: CreateChannel'
s@CreateChannel'' {} Maybe LogLevel
a -> CreateChannel'
s {$sel:logLevel:CreateChannel'' :: Maybe LogLevel
logLevel = Maybe LogLevel
a} :: CreateChannel')
createChannel'_inputSpecification :: Lens.Lens' CreateChannel' (Prelude.Maybe InputSpecification)
createChannel'_inputSpecification :: (Maybe InputSpecification -> f (Maybe InputSpecification))
-> CreateChannel' -> f CreateChannel'
createChannel'_inputSpecification = (CreateChannel' -> Maybe InputSpecification)
-> (CreateChannel' -> Maybe InputSpecification -> CreateChannel')
-> Lens
CreateChannel'
CreateChannel'
(Maybe InputSpecification)
(Maybe InputSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel'' {Maybe InputSpecification
inputSpecification :: Maybe InputSpecification
$sel:inputSpecification:CreateChannel'' :: CreateChannel' -> Maybe InputSpecification
inputSpecification} -> Maybe InputSpecification
inputSpecification) (\s :: CreateChannel'
s@CreateChannel'' {} Maybe InputSpecification
a -> CreateChannel'
s {$sel:inputSpecification:CreateChannel'' :: Maybe InputSpecification
inputSpecification = Maybe InputSpecification
a} :: CreateChannel')
createChannel'_inputAttachments :: Lens.Lens' CreateChannel' (Prelude.Maybe [InputAttachment])
createChannel'_inputAttachments :: (Maybe [InputAttachment] -> f (Maybe [InputAttachment]))
-> CreateChannel' -> f CreateChannel'
createChannel'_inputAttachments = (CreateChannel' -> Maybe [InputAttachment])
-> (CreateChannel' -> Maybe [InputAttachment] -> CreateChannel')
-> Lens
CreateChannel'
CreateChannel'
(Maybe [InputAttachment])
(Maybe [InputAttachment])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel'' {Maybe [InputAttachment]
inputAttachments :: Maybe [InputAttachment]
$sel:inputAttachments:CreateChannel'' :: CreateChannel' -> Maybe [InputAttachment]
inputAttachments} -> Maybe [InputAttachment]
inputAttachments) (\s :: CreateChannel'
s@CreateChannel'' {} Maybe [InputAttachment]
a -> CreateChannel'
s {$sel:inputAttachments:CreateChannel'' :: Maybe [InputAttachment]
inputAttachments = Maybe [InputAttachment]
a} :: CreateChannel') ((Maybe [InputAttachment] -> f (Maybe [InputAttachment]))
-> CreateChannel' -> f CreateChannel')
-> ((Maybe [InputAttachment] -> f (Maybe [InputAttachment]))
-> Maybe [InputAttachment] -> f (Maybe [InputAttachment]))
-> (Maybe [InputAttachment] -> f (Maybe [InputAttachment]))
-> CreateChannel'
-> f CreateChannel'
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[InputAttachment]
[InputAttachment]
[InputAttachment]
[InputAttachment]
-> Iso
(Maybe [InputAttachment])
(Maybe [InputAttachment])
(Maybe [InputAttachment])
(Maybe [InputAttachment])
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
[InputAttachment]
[InputAttachment]
[InputAttachment]
[InputAttachment]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createChannel'_reserved :: Lens.Lens' CreateChannel' (Prelude.Maybe Prelude.Text)
createChannel'_reserved :: (Maybe Text -> f (Maybe Text))
-> CreateChannel' -> f CreateChannel'
createChannel'_reserved = (CreateChannel' -> Maybe Text)
-> (CreateChannel' -> Maybe Text -> CreateChannel')
-> Lens CreateChannel' CreateChannel' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel'' {Maybe Text
reserved :: Maybe Text
$sel:reserved:CreateChannel'' :: CreateChannel' -> Maybe Text
reserved} -> Maybe Text
reserved) (\s :: CreateChannel'
s@CreateChannel'' {} Maybe Text
a -> CreateChannel'
s {$sel:reserved:CreateChannel'' :: Maybe Text
reserved = Maybe Text
a} :: CreateChannel')
createChannel'_destinations :: Lens.Lens' CreateChannel' (Prelude.Maybe [OutputDestination])
createChannel'_destinations :: (Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
-> CreateChannel' -> f CreateChannel'
createChannel'_destinations = (CreateChannel' -> Maybe [OutputDestination])
-> (CreateChannel' -> Maybe [OutputDestination] -> CreateChannel')
-> Lens
CreateChannel'
CreateChannel'
(Maybe [OutputDestination])
(Maybe [OutputDestination])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel'' {Maybe [OutputDestination]
destinations :: Maybe [OutputDestination]
$sel:destinations:CreateChannel'' :: CreateChannel' -> Maybe [OutputDestination]
destinations} -> Maybe [OutputDestination]
destinations) (\s :: CreateChannel'
s@CreateChannel'' {} Maybe [OutputDestination]
a -> CreateChannel'
s {$sel:destinations:CreateChannel'' :: Maybe [OutputDestination]
destinations = Maybe [OutputDestination]
a} :: CreateChannel') ((Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
-> CreateChannel' -> f CreateChannel')
-> ((Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
-> Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
-> (Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
-> CreateChannel'
-> f CreateChannel'
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[OutputDestination]
[OutputDestination]
[OutputDestination]
[OutputDestination]
-> Iso
(Maybe [OutputDestination])
(Maybe [OutputDestination])
(Maybe [OutputDestination])
(Maybe [OutputDestination])
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
[OutputDestination]
[OutputDestination]
[OutputDestination]
[OutputDestination]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createChannel'_name :: Lens.Lens' CreateChannel' (Prelude.Maybe Prelude.Text)
createChannel'_name :: (Maybe Text -> f (Maybe Text))
-> CreateChannel' -> f CreateChannel'
createChannel'_name = (CreateChannel' -> Maybe Text)
-> (CreateChannel' -> Maybe Text -> CreateChannel')
-> Lens CreateChannel' CreateChannel' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel'' {Maybe Text
name :: Maybe Text
$sel:name:CreateChannel'' :: CreateChannel' -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateChannel'
s@CreateChannel'' {} Maybe Text
a -> CreateChannel'
s {$sel:name:CreateChannel'' :: Maybe Text
name = Maybe Text
a} :: CreateChannel')
createChannel'_cdiInputSpecification :: Lens.Lens' CreateChannel' (Prelude.Maybe CdiInputSpecification)
createChannel'_cdiInputSpecification :: (Maybe CdiInputSpecification -> f (Maybe CdiInputSpecification))
-> CreateChannel' -> f CreateChannel'
createChannel'_cdiInputSpecification = (CreateChannel' -> Maybe CdiInputSpecification)
-> (CreateChannel'
-> Maybe CdiInputSpecification -> CreateChannel')
-> Lens
CreateChannel'
CreateChannel'
(Maybe CdiInputSpecification)
(Maybe CdiInputSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel'' {Maybe CdiInputSpecification
cdiInputSpecification :: Maybe CdiInputSpecification
$sel:cdiInputSpecification:CreateChannel'' :: CreateChannel' -> Maybe CdiInputSpecification
cdiInputSpecification} -> Maybe CdiInputSpecification
cdiInputSpecification) (\s :: CreateChannel'
s@CreateChannel'' {} Maybe CdiInputSpecification
a -> CreateChannel'
s {$sel:cdiInputSpecification:CreateChannel'' :: Maybe CdiInputSpecification
cdiInputSpecification = Maybe CdiInputSpecification
a} :: CreateChannel')
createChannel'_channelClass :: Lens.Lens' CreateChannel' (Prelude.Maybe ChannelClass)
createChannel'_channelClass :: (Maybe ChannelClass -> f (Maybe ChannelClass))
-> CreateChannel' -> f CreateChannel'
createChannel'_channelClass = (CreateChannel' -> Maybe ChannelClass)
-> (CreateChannel' -> Maybe ChannelClass -> CreateChannel')
-> Lens
CreateChannel'
CreateChannel'
(Maybe ChannelClass)
(Maybe ChannelClass)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel'' {Maybe ChannelClass
channelClass :: Maybe ChannelClass
$sel:channelClass:CreateChannel'' :: CreateChannel' -> Maybe ChannelClass
channelClass} -> Maybe ChannelClass
channelClass) (\s :: CreateChannel'
s@CreateChannel'' {} Maybe ChannelClass
a -> CreateChannel'
s {$sel:channelClass:CreateChannel'' :: Maybe ChannelClass
channelClass = Maybe ChannelClass
a} :: CreateChannel')
createChannel'_vpc :: Lens.Lens' CreateChannel' (Prelude.Maybe VpcOutputSettings)
createChannel'_vpc :: (Maybe VpcOutputSettings -> f (Maybe VpcOutputSettings))
-> CreateChannel' -> f CreateChannel'
createChannel'_vpc = (CreateChannel' -> Maybe VpcOutputSettings)
-> (CreateChannel' -> Maybe VpcOutputSettings -> CreateChannel')
-> Lens
CreateChannel'
CreateChannel'
(Maybe VpcOutputSettings)
(Maybe VpcOutputSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel'' {Maybe VpcOutputSettings
vpc :: Maybe VpcOutputSettings
$sel:vpc:CreateChannel'' :: CreateChannel' -> Maybe VpcOutputSettings
vpc} -> Maybe VpcOutputSettings
vpc) (\s :: CreateChannel'
s@CreateChannel'' {} Maybe VpcOutputSettings
a -> CreateChannel'
s {$sel:vpc:CreateChannel'' :: Maybe VpcOutputSettings
vpc = Maybe VpcOutputSettings
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'_encoderSettings :: Lens.Lens' CreateChannel' (Prelude.Maybe EncoderSettings)
createChannel'_encoderSettings :: (Maybe EncoderSettings -> f (Maybe EncoderSettings))
-> CreateChannel' -> f CreateChannel'
createChannel'_encoderSettings = (CreateChannel' -> Maybe EncoderSettings)
-> (CreateChannel' -> Maybe EncoderSettings -> CreateChannel')
-> Lens
CreateChannel'
CreateChannel'
(Maybe EncoderSettings)
(Maybe EncoderSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel'' {Maybe EncoderSettings
encoderSettings :: Maybe EncoderSettings
$sel:encoderSettings:CreateChannel'' :: CreateChannel' -> Maybe EncoderSettings
encoderSettings} -> Maybe EncoderSettings
encoderSettings) (\s :: CreateChannel'
s@CreateChannel'' {} Maybe EncoderSettings
a -> CreateChannel'
s {$sel:encoderSettings:CreateChannel'' :: Maybe EncoderSettings
encoderSettings = Maybe EncoderSettings
a} :: CreateChannel')
createChannel'_roleArn :: Lens.Lens' CreateChannel' (Prelude.Maybe Prelude.Text)
createChannel'_roleArn :: (Maybe Text -> f (Maybe Text))
-> CreateChannel' -> f CreateChannel'
createChannel'_roleArn = (CreateChannel' -> Maybe Text)
-> (CreateChannel' -> Maybe Text -> CreateChannel')
-> Lens CreateChannel' CreateChannel' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannel'' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:CreateChannel'' :: CreateChannel' -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: CreateChannel'
s@CreateChannel'' {} Maybe Text
a -> CreateChannel'
s {$sel:roleArn:CreateChannel'' :: Maybe Text
roleArn = Maybe Text
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 Channel -> Int -> CreateChannelResponse
CreateChannelResponse'
(Maybe Channel -> Int -> CreateChannelResponse)
-> Either String (Maybe Channel)
-> Either String (Int -> CreateChannelResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Channel)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"channel")
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'' {Maybe [OutputDestination]
Maybe [InputAttachment]
Maybe Text
Maybe (HashMap Text Text)
Maybe CdiInputSpecification
Maybe ChannelClass
Maybe InputSpecification
Maybe LogLevel
Maybe VpcOutputSettings
Maybe EncoderSettings
roleArn :: Maybe Text
encoderSettings :: Maybe EncoderSettings
tags :: Maybe (HashMap Text Text)
vpc :: Maybe VpcOutputSettings
channelClass :: Maybe ChannelClass
cdiInputSpecification :: Maybe CdiInputSpecification
name :: Maybe Text
destinations :: Maybe [OutputDestination]
reserved :: Maybe Text
inputAttachments :: Maybe [InputAttachment]
inputSpecification :: Maybe InputSpecification
logLevel :: Maybe LogLevel
requestId :: Maybe Text
$sel:roleArn:CreateChannel'' :: CreateChannel' -> Maybe Text
$sel:encoderSettings:CreateChannel'' :: CreateChannel' -> Maybe EncoderSettings
$sel:tags:CreateChannel'' :: CreateChannel' -> Maybe (HashMap Text Text)
$sel:vpc:CreateChannel'' :: CreateChannel' -> Maybe VpcOutputSettings
$sel:channelClass:CreateChannel'' :: CreateChannel' -> Maybe ChannelClass
$sel:cdiInputSpecification:CreateChannel'' :: CreateChannel' -> Maybe CdiInputSpecification
$sel:name:CreateChannel'' :: CreateChannel' -> Maybe Text
$sel:destinations:CreateChannel'' :: CreateChannel' -> Maybe [OutputDestination]
$sel:reserved:CreateChannel'' :: CreateChannel' -> Maybe Text
$sel:inputAttachments:CreateChannel'' :: CreateChannel' -> Maybe [InputAttachment]
$sel:inputSpecification:CreateChannel'' :: CreateChannel' -> Maybe InputSpecification
$sel:logLevel:CreateChannel'' :: CreateChannel' -> Maybe LogLevel
$sel:requestId:CreateChannel'' :: CreateChannel' -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"requestId" 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
requestId,
(Text
"logLevel" Text -> LogLevel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (LogLevel -> Pair) -> Maybe LogLevel -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LogLevel
logLevel,
(Text
"inputSpecification" Text -> InputSpecification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(InputSpecification -> Pair)
-> Maybe InputSpecification -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputSpecification
inputSpecification,
(Text
"inputAttachments" Text -> [InputAttachment] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([InputAttachment] -> Pair)
-> Maybe [InputAttachment] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InputAttachment]
inputAttachments,
(Text
"reserved" 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
reserved,
(Text
"destinations" Text -> [OutputDestination] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([OutputDestination] -> Pair)
-> Maybe [OutputDestination] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [OutputDestination]
destinations,
(Text
"name" 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
name,
(Text
"cdiInputSpecification" Text -> CdiInputSpecification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(CdiInputSpecification -> Pair)
-> Maybe CdiInputSpecification -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CdiInputSpecification
cdiInputSpecification,
(Text
"channelClass" Text -> ChannelClass -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ChannelClass -> Pair) -> Maybe ChannelClass -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ChannelClass
channelClass,
(Text
"vpc" Text -> VpcOutputSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (VpcOutputSettings -> Pair)
-> Maybe VpcOutputSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcOutputSettings
vpc,
(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,
(Text
"encoderSettings" Text -> EncoderSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EncoderSettings -> Pair) -> Maybe EncoderSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncoderSettings
encoderSettings,
(Text
"roleArn" 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
roleArn
]
)
instance Core.ToPath CreateChannel' where
toPath :: CreateChannel' -> ByteString
toPath = ByteString -> CreateChannel' -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/prod/channels"
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 Channel
channel :: Prelude.Maybe Channel,
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 Channel -> Int -> CreateChannelResponse
CreateChannelResponse'
{ $sel:channel:CreateChannelResponse' :: Maybe Channel
channel = Maybe Channel
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateChannelResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createChannelResponse_channel :: Lens.Lens' CreateChannelResponse (Prelude.Maybe Channel)
createChannelResponse_channel :: (Maybe Channel -> f (Maybe Channel))
-> CreateChannelResponse -> f CreateChannelResponse
createChannelResponse_channel = (CreateChannelResponse -> Maybe Channel)
-> (CreateChannelResponse
-> Maybe Channel -> CreateChannelResponse)
-> Lens
CreateChannelResponse
CreateChannelResponse
(Maybe Channel)
(Maybe Channel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChannelResponse' {Maybe Channel
channel :: Maybe Channel
$sel:channel:CreateChannelResponse' :: CreateChannelResponse -> Maybe Channel
channel} -> Maybe Channel
channel) (\s :: CreateChannelResponse
s@CreateChannelResponse' {} Maybe Channel
a -> CreateChannelResponse
s {$sel:channel:CreateChannelResponse' :: Maybe Channel
channel = Maybe Channel
a} :: CreateChannelResponse)
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