{-# 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.UpdateChannel
(
UpdateChannel' (..),
newUpdateChannel',
updateChannel'_logLevel,
updateChannel'_inputSpecification,
updateChannel'_inputAttachments,
updateChannel'_destinations,
updateChannel'_name,
updateChannel'_cdiInputSpecification,
updateChannel'_encoderSettings,
updateChannel'_roleArn,
updateChannel'_channelId,
UpdateChannelResponse (..),
newUpdateChannelResponse,
updateChannelResponse_channel,
updateChannelResponse_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 UpdateChannel' = UpdateChannel''
{
UpdateChannel' -> Maybe LogLevel
logLevel :: Prelude.Maybe LogLevel,
UpdateChannel' -> Maybe InputSpecification
inputSpecification :: Prelude.Maybe InputSpecification,
UpdateChannel' -> Maybe [InputAttachment]
inputAttachments :: Prelude.Maybe [InputAttachment],
UpdateChannel' -> Maybe [OutputDestination]
destinations :: Prelude.Maybe [OutputDestination],
UpdateChannel' -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
UpdateChannel' -> Maybe CdiInputSpecification
cdiInputSpecification :: Prelude.Maybe CdiInputSpecification,
UpdateChannel' -> Maybe EncoderSettings
encoderSettings :: Prelude.Maybe EncoderSettings,
UpdateChannel' -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
UpdateChannel' -> Text
channelId :: Prelude.Text
}
deriving (UpdateChannel' -> UpdateChannel' -> Bool
(UpdateChannel' -> UpdateChannel' -> Bool)
-> (UpdateChannel' -> UpdateChannel' -> Bool) -> Eq UpdateChannel'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateChannel' -> UpdateChannel' -> Bool
$c/= :: UpdateChannel' -> UpdateChannel' -> Bool
== :: UpdateChannel' -> UpdateChannel' -> Bool
$c== :: UpdateChannel' -> UpdateChannel' -> Bool
Prelude.Eq, ReadPrec [UpdateChannel']
ReadPrec UpdateChannel'
Int -> ReadS UpdateChannel'
ReadS [UpdateChannel']
(Int -> ReadS UpdateChannel')
-> ReadS [UpdateChannel']
-> ReadPrec UpdateChannel'
-> ReadPrec [UpdateChannel']
-> Read UpdateChannel'
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateChannel']
$creadListPrec :: ReadPrec [UpdateChannel']
readPrec :: ReadPrec UpdateChannel'
$creadPrec :: ReadPrec UpdateChannel'
readList :: ReadS [UpdateChannel']
$creadList :: ReadS [UpdateChannel']
readsPrec :: Int -> ReadS UpdateChannel'
$creadsPrec :: Int -> ReadS UpdateChannel'
Prelude.Read, Int -> UpdateChannel' -> ShowS
[UpdateChannel'] -> ShowS
UpdateChannel' -> String
(Int -> UpdateChannel' -> ShowS)
-> (UpdateChannel' -> String)
-> ([UpdateChannel'] -> ShowS)
-> Show UpdateChannel'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateChannel'] -> ShowS
$cshowList :: [UpdateChannel'] -> ShowS
show :: UpdateChannel' -> String
$cshow :: UpdateChannel' -> String
showsPrec :: Int -> UpdateChannel' -> ShowS
$cshowsPrec :: Int -> UpdateChannel' -> ShowS
Prelude.Show, (forall x. UpdateChannel' -> Rep UpdateChannel' x)
-> (forall x. Rep UpdateChannel' x -> UpdateChannel')
-> Generic UpdateChannel'
forall x. Rep UpdateChannel' x -> UpdateChannel'
forall x. UpdateChannel' -> Rep UpdateChannel' x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateChannel' x -> UpdateChannel'
$cfrom :: forall x. UpdateChannel' -> Rep UpdateChannel' x
Prelude.Generic)
newUpdateChannel' ::
Prelude.Text ->
UpdateChannel'
newUpdateChannel' :: Text -> UpdateChannel'
newUpdateChannel' Text
pChannelId_ =
UpdateChannel'' :: Maybe LogLevel
-> Maybe InputSpecification
-> Maybe [InputAttachment]
-> Maybe [OutputDestination]
-> Maybe Text
-> Maybe CdiInputSpecification
-> Maybe EncoderSettings
-> Maybe Text
-> Text
-> UpdateChannel'
UpdateChannel''
{ $sel:logLevel:UpdateChannel'' :: Maybe LogLevel
logLevel = Maybe LogLevel
forall a. Maybe a
Prelude.Nothing,
$sel:inputSpecification:UpdateChannel'' :: Maybe InputSpecification
inputSpecification = Maybe InputSpecification
forall a. Maybe a
Prelude.Nothing,
$sel:inputAttachments:UpdateChannel'' :: Maybe [InputAttachment]
inputAttachments = Maybe [InputAttachment]
forall a. Maybe a
Prelude.Nothing,
$sel:destinations:UpdateChannel'' :: Maybe [OutputDestination]
destinations = Maybe [OutputDestination]
forall a. Maybe a
Prelude.Nothing,
$sel:name:UpdateChannel'' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cdiInputSpecification:UpdateChannel'' :: Maybe CdiInputSpecification
cdiInputSpecification = Maybe CdiInputSpecification
forall a. Maybe a
Prelude.Nothing,
$sel:encoderSettings:UpdateChannel'' :: Maybe EncoderSettings
encoderSettings = Maybe EncoderSettings
forall a. Maybe a
Prelude.Nothing,
$sel:roleArn:UpdateChannel'' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:channelId:UpdateChannel'' :: Text
channelId = Text
pChannelId_
}
updateChannel'_logLevel :: Lens.Lens' UpdateChannel' (Prelude.Maybe LogLevel)
updateChannel'_logLevel :: (Maybe LogLevel -> f (Maybe LogLevel))
-> UpdateChannel' -> f UpdateChannel'
updateChannel'_logLevel = (UpdateChannel' -> Maybe LogLevel)
-> (UpdateChannel' -> Maybe LogLevel -> UpdateChannel')
-> Lens
UpdateChannel' UpdateChannel' (Maybe LogLevel) (Maybe LogLevel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannel'' {Maybe LogLevel
logLevel :: Maybe LogLevel
$sel:logLevel:UpdateChannel'' :: UpdateChannel' -> Maybe LogLevel
logLevel} -> Maybe LogLevel
logLevel) (\s :: UpdateChannel'
s@UpdateChannel'' {} Maybe LogLevel
a -> UpdateChannel'
s {$sel:logLevel:UpdateChannel'' :: Maybe LogLevel
logLevel = Maybe LogLevel
a} :: UpdateChannel')
updateChannel'_inputSpecification :: Lens.Lens' UpdateChannel' (Prelude.Maybe InputSpecification)
updateChannel'_inputSpecification :: (Maybe InputSpecification -> f (Maybe InputSpecification))
-> UpdateChannel' -> f UpdateChannel'
updateChannel'_inputSpecification = (UpdateChannel' -> Maybe InputSpecification)
-> (UpdateChannel' -> Maybe InputSpecification -> UpdateChannel')
-> Lens
UpdateChannel'
UpdateChannel'
(Maybe InputSpecification)
(Maybe InputSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannel'' {Maybe InputSpecification
inputSpecification :: Maybe InputSpecification
$sel:inputSpecification:UpdateChannel'' :: UpdateChannel' -> Maybe InputSpecification
inputSpecification} -> Maybe InputSpecification
inputSpecification) (\s :: UpdateChannel'
s@UpdateChannel'' {} Maybe InputSpecification
a -> UpdateChannel'
s {$sel:inputSpecification:UpdateChannel'' :: Maybe InputSpecification
inputSpecification = Maybe InputSpecification
a} :: UpdateChannel')
updateChannel'_inputAttachments :: Lens.Lens' UpdateChannel' (Prelude.Maybe [InputAttachment])
updateChannel'_inputAttachments :: (Maybe [InputAttachment] -> f (Maybe [InputAttachment]))
-> UpdateChannel' -> f UpdateChannel'
updateChannel'_inputAttachments = (UpdateChannel' -> Maybe [InputAttachment])
-> (UpdateChannel' -> Maybe [InputAttachment] -> UpdateChannel')
-> Lens
UpdateChannel'
UpdateChannel'
(Maybe [InputAttachment])
(Maybe [InputAttachment])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannel'' {Maybe [InputAttachment]
inputAttachments :: Maybe [InputAttachment]
$sel:inputAttachments:UpdateChannel'' :: UpdateChannel' -> Maybe [InputAttachment]
inputAttachments} -> Maybe [InputAttachment]
inputAttachments) (\s :: UpdateChannel'
s@UpdateChannel'' {} Maybe [InputAttachment]
a -> UpdateChannel'
s {$sel:inputAttachments:UpdateChannel'' :: Maybe [InputAttachment]
inputAttachments = Maybe [InputAttachment]
a} :: UpdateChannel') ((Maybe [InputAttachment] -> f (Maybe [InputAttachment]))
-> UpdateChannel' -> f UpdateChannel')
-> ((Maybe [InputAttachment] -> f (Maybe [InputAttachment]))
-> Maybe [InputAttachment] -> f (Maybe [InputAttachment]))
-> (Maybe [InputAttachment] -> f (Maybe [InputAttachment]))
-> UpdateChannel'
-> f UpdateChannel'
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
updateChannel'_destinations :: Lens.Lens' UpdateChannel' (Prelude.Maybe [OutputDestination])
updateChannel'_destinations :: (Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
-> UpdateChannel' -> f UpdateChannel'
updateChannel'_destinations = (UpdateChannel' -> Maybe [OutputDestination])
-> (UpdateChannel' -> Maybe [OutputDestination] -> UpdateChannel')
-> Lens
UpdateChannel'
UpdateChannel'
(Maybe [OutputDestination])
(Maybe [OutputDestination])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannel'' {Maybe [OutputDestination]
destinations :: Maybe [OutputDestination]
$sel:destinations:UpdateChannel'' :: UpdateChannel' -> Maybe [OutputDestination]
destinations} -> Maybe [OutputDestination]
destinations) (\s :: UpdateChannel'
s@UpdateChannel'' {} Maybe [OutputDestination]
a -> UpdateChannel'
s {$sel:destinations:UpdateChannel'' :: Maybe [OutputDestination]
destinations = Maybe [OutputDestination]
a} :: UpdateChannel') ((Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
-> UpdateChannel' -> f UpdateChannel')
-> ((Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
-> Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
-> (Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
-> UpdateChannel'
-> f UpdateChannel'
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
updateChannel'_name :: Lens.Lens' UpdateChannel' (Prelude.Maybe Prelude.Text)
updateChannel'_name :: (Maybe Text -> f (Maybe Text))
-> UpdateChannel' -> f UpdateChannel'
updateChannel'_name = (UpdateChannel' -> Maybe Text)
-> (UpdateChannel' -> Maybe Text -> UpdateChannel')
-> Lens UpdateChannel' UpdateChannel' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannel'' {Maybe Text
name :: Maybe Text
$sel:name:UpdateChannel'' :: UpdateChannel' -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateChannel'
s@UpdateChannel'' {} Maybe Text
a -> UpdateChannel'
s {$sel:name:UpdateChannel'' :: Maybe Text
name = Maybe Text
a} :: UpdateChannel')
updateChannel'_cdiInputSpecification :: Lens.Lens' UpdateChannel' (Prelude.Maybe CdiInputSpecification)
updateChannel'_cdiInputSpecification :: (Maybe CdiInputSpecification -> f (Maybe CdiInputSpecification))
-> UpdateChannel' -> f UpdateChannel'
updateChannel'_cdiInputSpecification = (UpdateChannel' -> Maybe CdiInputSpecification)
-> (UpdateChannel'
-> Maybe CdiInputSpecification -> UpdateChannel')
-> Lens
UpdateChannel'
UpdateChannel'
(Maybe CdiInputSpecification)
(Maybe CdiInputSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannel'' {Maybe CdiInputSpecification
cdiInputSpecification :: Maybe CdiInputSpecification
$sel:cdiInputSpecification:UpdateChannel'' :: UpdateChannel' -> Maybe CdiInputSpecification
cdiInputSpecification} -> Maybe CdiInputSpecification
cdiInputSpecification) (\s :: UpdateChannel'
s@UpdateChannel'' {} Maybe CdiInputSpecification
a -> UpdateChannel'
s {$sel:cdiInputSpecification:UpdateChannel'' :: Maybe CdiInputSpecification
cdiInputSpecification = Maybe CdiInputSpecification
a} :: UpdateChannel')
updateChannel'_encoderSettings :: Lens.Lens' UpdateChannel' (Prelude.Maybe EncoderSettings)
updateChannel'_encoderSettings :: (Maybe EncoderSettings -> f (Maybe EncoderSettings))
-> UpdateChannel' -> f UpdateChannel'
updateChannel'_encoderSettings = (UpdateChannel' -> Maybe EncoderSettings)
-> (UpdateChannel' -> Maybe EncoderSettings -> UpdateChannel')
-> Lens
UpdateChannel'
UpdateChannel'
(Maybe EncoderSettings)
(Maybe EncoderSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannel'' {Maybe EncoderSettings
encoderSettings :: Maybe EncoderSettings
$sel:encoderSettings:UpdateChannel'' :: UpdateChannel' -> Maybe EncoderSettings
encoderSettings} -> Maybe EncoderSettings
encoderSettings) (\s :: UpdateChannel'
s@UpdateChannel'' {} Maybe EncoderSettings
a -> UpdateChannel'
s {$sel:encoderSettings:UpdateChannel'' :: Maybe EncoderSettings
encoderSettings = Maybe EncoderSettings
a} :: UpdateChannel')
updateChannel'_roleArn :: Lens.Lens' UpdateChannel' (Prelude.Maybe Prelude.Text)
updateChannel'_roleArn :: (Maybe Text -> f (Maybe Text))
-> UpdateChannel' -> f UpdateChannel'
updateChannel'_roleArn = (UpdateChannel' -> Maybe Text)
-> (UpdateChannel' -> Maybe Text -> UpdateChannel')
-> Lens UpdateChannel' UpdateChannel' (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannel'' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:UpdateChannel'' :: UpdateChannel' -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: UpdateChannel'
s@UpdateChannel'' {} Maybe Text
a -> UpdateChannel'
s {$sel:roleArn:UpdateChannel'' :: Maybe Text
roleArn = Maybe Text
a} :: UpdateChannel')
updateChannel'_channelId :: Lens.Lens' UpdateChannel' Prelude.Text
updateChannel'_channelId :: (Text -> f Text) -> UpdateChannel' -> f UpdateChannel'
updateChannel'_channelId = (UpdateChannel' -> Text)
-> (UpdateChannel' -> Text -> UpdateChannel')
-> Lens UpdateChannel' UpdateChannel' Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannel'' {Text
channelId :: Text
$sel:channelId:UpdateChannel'' :: UpdateChannel' -> Text
channelId} -> Text
channelId) (\s :: UpdateChannel'
s@UpdateChannel'' {} Text
a -> UpdateChannel'
s {$sel:channelId:UpdateChannel'' :: Text
channelId = Text
a} :: UpdateChannel')
instance Core.AWSRequest UpdateChannel' where
type
AWSResponse UpdateChannel' =
UpdateChannelResponse
request :: UpdateChannel' -> Request UpdateChannel'
request = Service -> UpdateChannel' -> Request UpdateChannel'
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateChannel'
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateChannel')))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateChannel'))
-> Logger
-> Service
-> Proxy UpdateChannel'
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateChannel')))
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 -> UpdateChannelResponse
UpdateChannelResponse'
(Maybe Channel -> Int -> UpdateChannelResponse)
-> Either String (Maybe Channel)
-> Either String (Int -> UpdateChannelResponse)
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 -> UpdateChannelResponse)
-> Either String Int -> Either String UpdateChannelResponse
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 UpdateChannel'
instance Prelude.NFData UpdateChannel'
instance Core.ToHeaders UpdateChannel' where
toHeaders :: UpdateChannel' -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateChannel' -> 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 UpdateChannel' where
toJSON :: UpdateChannel' -> Value
toJSON UpdateChannel'' {Maybe [OutputDestination]
Maybe [InputAttachment]
Maybe Text
Maybe CdiInputSpecification
Maybe InputSpecification
Maybe LogLevel
Maybe EncoderSettings
Text
channelId :: Text
roleArn :: Maybe Text
encoderSettings :: Maybe EncoderSettings
cdiInputSpecification :: Maybe CdiInputSpecification
name :: Maybe Text
destinations :: Maybe [OutputDestination]
inputAttachments :: Maybe [InputAttachment]
inputSpecification :: Maybe InputSpecification
logLevel :: Maybe LogLevel
$sel:channelId:UpdateChannel'' :: UpdateChannel' -> Text
$sel:roleArn:UpdateChannel'' :: UpdateChannel' -> Maybe Text
$sel:encoderSettings:UpdateChannel'' :: UpdateChannel' -> Maybe EncoderSettings
$sel:cdiInputSpecification:UpdateChannel'' :: UpdateChannel' -> Maybe CdiInputSpecification
$sel:name:UpdateChannel'' :: UpdateChannel' -> Maybe Text
$sel:destinations:UpdateChannel'' :: UpdateChannel' -> Maybe [OutputDestination]
$sel:inputAttachments:UpdateChannel'' :: UpdateChannel' -> Maybe [InputAttachment]
$sel:inputSpecification:UpdateChannel'' :: UpdateChannel' -> Maybe InputSpecification
$sel:logLevel:UpdateChannel'' :: UpdateChannel' -> Maybe LogLevel
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"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
"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 UpdateChannel' where
toPath :: UpdateChannel' -> ByteString
toPath UpdateChannel'' {Maybe [OutputDestination]
Maybe [InputAttachment]
Maybe Text
Maybe CdiInputSpecification
Maybe InputSpecification
Maybe LogLevel
Maybe EncoderSettings
Text
channelId :: Text
roleArn :: Maybe Text
encoderSettings :: Maybe EncoderSettings
cdiInputSpecification :: Maybe CdiInputSpecification
name :: Maybe Text
destinations :: Maybe [OutputDestination]
inputAttachments :: Maybe [InputAttachment]
inputSpecification :: Maybe InputSpecification
logLevel :: Maybe LogLevel
$sel:channelId:UpdateChannel'' :: UpdateChannel' -> Text
$sel:roleArn:UpdateChannel'' :: UpdateChannel' -> Maybe Text
$sel:encoderSettings:UpdateChannel'' :: UpdateChannel' -> Maybe EncoderSettings
$sel:cdiInputSpecification:UpdateChannel'' :: UpdateChannel' -> Maybe CdiInputSpecification
$sel:name:UpdateChannel'' :: UpdateChannel' -> Maybe Text
$sel:destinations:UpdateChannel'' :: UpdateChannel' -> Maybe [OutputDestination]
$sel:inputAttachments:UpdateChannel'' :: UpdateChannel' -> Maybe [InputAttachment]
$sel:inputSpecification:UpdateChannel'' :: UpdateChannel' -> Maybe InputSpecification
$sel:logLevel:UpdateChannel'' :: UpdateChannel' -> Maybe LogLevel
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/prod/channels/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
channelId]
instance Core.ToQuery UpdateChannel' where
toQuery :: UpdateChannel' -> QueryString
toQuery = QueryString -> UpdateChannel' -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateChannelResponse = UpdateChannelResponse'
{ UpdateChannelResponse -> Maybe Channel
channel :: Prelude.Maybe Channel,
UpdateChannelResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateChannelResponse -> UpdateChannelResponse -> Bool
(UpdateChannelResponse -> UpdateChannelResponse -> Bool)
-> (UpdateChannelResponse -> UpdateChannelResponse -> Bool)
-> Eq UpdateChannelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateChannelResponse -> UpdateChannelResponse -> Bool
$c/= :: UpdateChannelResponse -> UpdateChannelResponse -> Bool
== :: UpdateChannelResponse -> UpdateChannelResponse -> Bool
$c== :: UpdateChannelResponse -> UpdateChannelResponse -> Bool
Prelude.Eq, ReadPrec [UpdateChannelResponse]
ReadPrec UpdateChannelResponse
Int -> ReadS UpdateChannelResponse
ReadS [UpdateChannelResponse]
(Int -> ReadS UpdateChannelResponse)
-> ReadS [UpdateChannelResponse]
-> ReadPrec UpdateChannelResponse
-> ReadPrec [UpdateChannelResponse]
-> Read UpdateChannelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateChannelResponse]
$creadListPrec :: ReadPrec [UpdateChannelResponse]
readPrec :: ReadPrec UpdateChannelResponse
$creadPrec :: ReadPrec UpdateChannelResponse
readList :: ReadS [UpdateChannelResponse]
$creadList :: ReadS [UpdateChannelResponse]
readsPrec :: Int -> ReadS UpdateChannelResponse
$creadsPrec :: Int -> ReadS UpdateChannelResponse
Prelude.Read, Int -> UpdateChannelResponse -> ShowS
[UpdateChannelResponse] -> ShowS
UpdateChannelResponse -> String
(Int -> UpdateChannelResponse -> ShowS)
-> (UpdateChannelResponse -> String)
-> ([UpdateChannelResponse] -> ShowS)
-> Show UpdateChannelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateChannelResponse] -> ShowS
$cshowList :: [UpdateChannelResponse] -> ShowS
show :: UpdateChannelResponse -> String
$cshow :: UpdateChannelResponse -> String
showsPrec :: Int -> UpdateChannelResponse -> ShowS
$cshowsPrec :: Int -> UpdateChannelResponse -> ShowS
Prelude.Show, (forall x. UpdateChannelResponse -> Rep UpdateChannelResponse x)
-> (forall x. Rep UpdateChannelResponse x -> UpdateChannelResponse)
-> Generic UpdateChannelResponse
forall x. Rep UpdateChannelResponse x -> UpdateChannelResponse
forall x. UpdateChannelResponse -> Rep UpdateChannelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateChannelResponse x -> UpdateChannelResponse
$cfrom :: forall x. UpdateChannelResponse -> Rep UpdateChannelResponse x
Prelude.Generic)
newUpdateChannelResponse ::
Prelude.Int ->
UpdateChannelResponse
newUpdateChannelResponse :: Int -> UpdateChannelResponse
newUpdateChannelResponse Int
pHttpStatus_ =
UpdateChannelResponse' :: Maybe Channel -> Int -> UpdateChannelResponse
UpdateChannelResponse'
{ $sel:channel:UpdateChannelResponse' :: Maybe Channel
channel = Maybe Channel
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateChannelResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateChannelResponse_channel :: Lens.Lens' UpdateChannelResponse (Prelude.Maybe Channel)
updateChannelResponse_channel :: (Maybe Channel -> f (Maybe Channel))
-> UpdateChannelResponse -> f UpdateChannelResponse
updateChannelResponse_channel = (UpdateChannelResponse -> Maybe Channel)
-> (UpdateChannelResponse
-> Maybe Channel -> UpdateChannelResponse)
-> Lens
UpdateChannelResponse
UpdateChannelResponse
(Maybe Channel)
(Maybe Channel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannelResponse' {Maybe Channel
channel :: Maybe Channel
$sel:channel:UpdateChannelResponse' :: UpdateChannelResponse -> Maybe Channel
channel} -> Maybe Channel
channel) (\s :: UpdateChannelResponse
s@UpdateChannelResponse' {} Maybe Channel
a -> UpdateChannelResponse
s {$sel:channel:UpdateChannelResponse' :: Maybe Channel
channel = Maybe Channel
a} :: UpdateChannelResponse)
updateChannelResponse_httpStatus :: Lens.Lens' UpdateChannelResponse Prelude.Int
updateChannelResponse_httpStatus :: (Int -> f Int) -> UpdateChannelResponse -> f UpdateChannelResponse
updateChannelResponse_httpStatus = (UpdateChannelResponse -> Int)
-> (UpdateChannelResponse -> Int -> UpdateChannelResponse)
-> Lens UpdateChannelResponse UpdateChannelResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateChannelResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateChannelResponse' :: UpdateChannelResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateChannelResponse
s@UpdateChannelResponse' {} Int
a -> UpdateChannelResponse
s {$sel:httpStatus:UpdateChannelResponse' :: Int
httpStatus = Int
a} :: UpdateChannelResponse)
instance Prelude.NFData UpdateChannelResponse