{-# 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.Chime.GetMediaCapturePipeline
(
GetMediaCapturePipeline (..),
newGetMediaCapturePipeline,
getMediaCapturePipeline_mediaPipelineId,
GetMediaCapturePipelineResponse (..),
newGetMediaCapturePipelineResponse,
getMediaCapturePipelineResponse_mediaCapturePipeline,
getMediaCapturePipelineResponse_httpStatus,
)
where
import Amazonka.Chime.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetMediaCapturePipeline = GetMediaCapturePipeline'
{
GetMediaCapturePipeline -> Text
mediaPipelineId :: Prelude.Text
}
deriving (GetMediaCapturePipeline -> GetMediaCapturePipeline -> Bool
(GetMediaCapturePipeline -> GetMediaCapturePipeline -> Bool)
-> (GetMediaCapturePipeline -> GetMediaCapturePipeline -> Bool)
-> Eq GetMediaCapturePipeline
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMediaCapturePipeline -> GetMediaCapturePipeline -> Bool
$c/= :: GetMediaCapturePipeline -> GetMediaCapturePipeline -> Bool
== :: GetMediaCapturePipeline -> GetMediaCapturePipeline -> Bool
$c== :: GetMediaCapturePipeline -> GetMediaCapturePipeline -> Bool
Prelude.Eq, ReadPrec [GetMediaCapturePipeline]
ReadPrec GetMediaCapturePipeline
Int -> ReadS GetMediaCapturePipeline
ReadS [GetMediaCapturePipeline]
(Int -> ReadS GetMediaCapturePipeline)
-> ReadS [GetMediaCapturePipeline]
-> ReadPrec GetMediaCapturePipeline
-> ReadPrec [GetMediaCapturePipeline]
-> Read GetMediaCapturePipeline
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetMediaCapturePipeline]
$creadListPrec :: ReadPrec [GetMediaCapturePipeline]
readPrec :: ReadPrec GetMediaCapturePipeline
$creadPrec :: ReadPrec GetMediaCapturePipeline
readList :: ReadS [GetMediaCapturePipeline]
$creadList :: ReadS [GetMediaCapturePipeline]
readsPrec :: Int -> ReadS GetMediaCapturePipeline
$creadsPrec :: Int -> ReadS GetMediaCapturePipeline
Prelude.Read, Int -> GetMediaCapturePipeline -> ShowS
[GetMediaCapturePipeline] -> ShowS
GetMediaCapturePipeline -> String
(Int -> GetMediaCapturePipeline -> ShowS)
-> (GetMediaCapturePipeline -> String)
-> ([GetMediaCapturePipeline] -> ShowS)
-> Show GetMediaCapturePipeline
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMediaCapturePipeline] -> ShowS
$cshowList :: [GetMediaCapturePipeline] -> ShowS
show :: GetMediaCapturePipeline -> String
$cshow :: GetMediaCapturePipeline -> String
showsPrec :: Int -> GetMediaCapturePipeline -> ShowS
$cshowsPrec :: Int -> GetMediaCapturePipeline -> ShowS
Prelude.Show, (forall x.
GetMediaCapturePipeline -> Rep GetMediaCapturePipeline x)
-> (forall x.
Rep GetMediaCapturePipeline x -> GetMediaCapturePipeline)
-> Generic GetMediaCapturePipeline
forall x. Rep GetMediaCapturePipeline x -> GetMediaCapturePipeline
forall x. GetMediaCapturePipeline -> Rep GetMediaCapturePipeline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetMediaCapturePipeline x -> GetMediaCapturePipeline
$cfrom :: forall x. GetMediaCapturePipeline -> Rep GetMediaCapturePipeline x
Prelude.Generic)
newGetMediaCapturePipeline ::
Prelude.Text ->
GetMediaCapturePipeline
newGetMediaCapturePipeline :: Text -> GetMediaCapturePipeline
newGetMediaCapturePipeline Text
pMediaPipelineId_ =
GetMediaCapturePipeline' :: Text -> GetMediaCapturePipeline
GetMediaCapturePipeline'
{ $sel:mediaPipelineId:GetMediaCapturePipeline' :: Text
mediaPipelineId =
Text
pMediaPipelineId_
}
getMediaCapturePipeline_mediaPipelineId :: Lens.Lens' GetMediaCapturePipeline Prelude.Text
getMediaCapturePipeline_mediaPipelineId :: (Text -> f Text)
-> GetMediaCapturePipeline -> f GetMediaCapturePipeline
getMediaCapturePipeline_mediaPipelineId = (GetMediaCapturePipeline -> Text)
-> (GetMediaCapturePipeline -> Text -> GetMediaCapturePipeline)
-> Lens GetMediaCapturePipeline GetMediaCapturePipeline Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMediaCapturePipeline' {Text
mediaPipelineId :: Text
$sel:mediaPipelineId:GetMediaCapturePipeline' :: GetMediaCapturePipeline -> Text
mediaPipelineId} -> Text
mediaPipelineId) (\s :: GetMediaCapturePipeline
s@GetMediaCapturePipeline' {} Text
a -> GetMediaCapturePipeline
s {$sel:mediaPipelineId:GetMediaCapturePipeline' :: Text
mediaPipelineId = Text
a} :: GetMediaCapturePipeline)
instance Core.AWSRequest GetMediaCapturePipeline where
type
AWSResponse GetMediaCapturePipeline =
GetMediaCapturePipelineResponse
request :: GetMediaCapturePipeline -> Request GetMediaCapturePipeline
request = Service
-> GetMediaCapturePipeline -> Request GetMediaCapturePipeline
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetMediaCapturePipeline
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetMediaCapturePipeline)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetMediaCapturePipeline))
-> Logger
-> Service
-> Proxy GetMediaCapturePipeline
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetMediaCapturePipeline)))
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 MediaCapturePipeline
-> Int -> GetMediaCapturePipelineResponse
GetMediaCapturePipelineResponse'
(Maybe MediaCapturePipeline
-> Int -> GetMediaCapturePipelineResponse)
-> Either String (Maybe MediaCapturePipeline)
-> Either String (Int -> GetMediaCapturePipelineResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe MediaCapturePipeline)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MediaCapturePipeline")
Either String (Int -> GetMediaCapturePipelineResponse)
-> Either String Int
-> Either String GetMediaCapturePipelineResponse
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 GetMediaCapturePipeline
instance Prelude.NFData GetMediaCapturePipeline
instance Core.ToHeaders GetMediaCapturePipeline where
toHeaders :: GetMediaCapturePipeline -> ResponseHeaders
toHeaders = ResponseHeaders -> GetMediaCapturePipeline -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath GetMediaCapturePipeline where
toPath :: GetMediaCapturePipeline -> ByteString
toPath GetMediaCapturePipeline' {Text
mediaPipelineId :: Text
$sel:mediaPipelineId:GetMediaCapturePipeline' :: GetMediaCapturePipeline -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/media-capture-pipelines/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
mediaPipelineId
]
instance Core.ToQuery GetMediaCapturePipeline where
toQuery :: GetMediaCapturePipeline -> QueryString
toQuery = QueryString -> GetMediaCapturePipeline -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetMediaCapturePipelineResponse = GetMediaCapturePipelineResponse'
{
GetMediaCapturePipelineResponse -> Maybe MediaCapturePipeline
mediaCapturePipeline :: Prelude.Maybe MediaCapturePipeline,
GetMediaCapturePipelineResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetMediaCapturePipelineResponse
-> GetMediaCapturePipelineResponse -> Bool
(GetMediaCapturePipelineResponse
-> GetMediaCapturePipelineResponse -> Bool)
-> (GetMediaCapturePipelineResponse
-> GetMediaCapturePipelineResponse -> Bool)
-> Eq GetMediaCapturePipelineResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMediaCapturePipelineResponse
-> GetMediaCapturePipelineResponse -> Bool
$c/= :: GetMediaCapturePipelineResponse
-> GetMediaCapturePipelineResponse -> Bool
== :: GetMediaCapturePipelineResponse
-> GetMediaCapturePipelineResponse -> Bool
$c== :: GetMediaCapturePipelineResponse
-> GetMediaCapturePipelineResponse -> Bool
Prelude.Eq, Int -> GetMediaCapturePipelineResponse -> ShowS
[GetMediaCapturePipelineResponse] -> ShowS
GetMediaCapturePipelineResponse -> String
(Int -> GetMediaCapturePipelineResponse -> ShowS)
-> (GetMediaCapturePipelineResponse -> String)
-> ([GetMediaCapturePipelineResponse] -> ShowS)
-> Show GetMediaCapturePipelineResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMediaCapturePipelineResponse] -> ShowS
$cshowList :: [GetMediaCapturePipelineResponse] -> ShowS
show :: GetMediaCapturePipelineResponse -> String
$cshow :: GetMediaCapturePipelineResponse -> String
showsPrec :: Int -> GetMediaCapturePipelineResponse -> ShowS
$cshowsPrec :: Int -> GetMediaCapturePipelineResponse -> ShowS
Prelude.Show, (forall x.
GetMediaCapturePipelineResponse
-> Rep GetMediaCapturePipelineResponse x)
-> (forall x.
Rep GetMediaCapturePipelineResponse x
-> GetMediaCapturePipelineResponse)
-> Generic GetMediaCapturePipelineResponse
forall x.
Rep GetMediaCapturePipelineResponse x
-> GetMediaCapturePipelineResponse
forall x.
GetMediaCapturePipelineResponse
-> Rep GetMediaCapturePipelineResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetMediaCapturePipelineResponse x
-> GetMediaCapturePipelineResponse
$cfrom :: forall x.
GetMediaCapturePipelineResponse
-> Rep GetMediaCapturePipelineResponse x
Prelude.Generic)
newGetMediaCapturePipelineResponse ::
Prelude.Int ->
GetMediaCapturePipelineResponse
newGetMediaCapturePipelineResponse :: Int -> GetMediaCapturePipelineResponse
newGetMediaCapturePipelineResponse Int
pHttpStatus_ =
GetMediaCapturePipelineResponse' :: Maybe MediaCapturePipeline
-> Int -> GetMediaCapturePipelineResponse
GetMediaCapturePipelineResponse'
{ $sel:mediaCapturePipeline:GetMediaCapturePipelineResponse' :: Maybe MediaCapturePipeline
mediaCapturePipeline =
Maybe MediaCapturePipeline
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetMediaCapturePipelineResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getMediaCapturePipelineResponse_mediaCapturePipeline :: Lens.Lens' GetMediaCapturePipelineResponse (Prelude.Maybe MediaCapturePipeline)
getMediaCapturePipelineResponse_mediaCapturePipeline :: (Maybe MediaCapturePipeline -> f (Maybe MediaCapturePipeline))
-> GetMediaCapturePipelineResponse
-> f GetMediaCapturePipelineResponse
getMediaCapturePipelineResponse_mediaCapturePipeline = (GetMediaCapturePipelineResponse -> Maybe MediaCapturePipeline)
-> (GetMediaCapturePipelineResponse
-> Maybe MediaCapturePipeline -> GetMediaCapturePipelineResponse)
-> Lens
GetMediaCapturePipelineResponse
GetMediaCapturePipelineResponse
(Maybe MediaCapturePipeline)
(Maybe MediaCapturePipeline)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMediaCapturePipelineResponse' {Maybe MediaCapturePipeline
mediaCapturePipeline :: Maybe MediaCapturePipeline
$sel:mediaCapturePipeline:GetMediaCapturePipelineResponse' :: GetMediaCapturePipelineResponse -> Maybe MediaCapturePipeline
mediaCapturePipeline} -> Maybe MediaCapturePipeline
mediaCapturePipeline) (\s :: GetMediaCapturePipelineResponse
s@GetMediaCapturePipelineResponse' {} Maybe MediaCapturePipeline
a -> GetMediaCapturePipelineResponse
s {$sel:mediaCapturePipeline:GetMediaCapturePipelineResponse' :: Maybe MediaCapturePipeline
mediaCapturePipeline = Maybe MediaCapturePipeline
a} :: GetMediaCapturePipelineResponse)
getMediaCapturePipelineResponse_httpStatus :: Lens.Lens' GetMediaCapturePipelineResponse Prelude.Int
getMediaCapturePipelineResponse_httpStatus :: (Int -> f Int)
-> GetMediaCapturePipelineResponse
-> f GetMediaCapturePipelineResponse
getMediaCapturePipelineResponse_httpStatus = (GetMediaCapturePipelineResponse -> Int)
-> (GetMediaCapturePipelineResponse
-> Int -> GetMediaCapturePipelineResponse)
-> Lens
GetMediaCapturePipelineResponse
GetMediaCapturePipelineResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMediaCapturePipelineResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetMediaCapturePipelineResponse' :: GetMediaCapturePipelineResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetMediaCapturePipelineResponse
s@GetMediaCapturePipelineResponse' {} Int
a -> GetMediaCapturePipelineResponse
s {$sel:httpStatus:GetMediaCapturePipelineResponse' :: Int
httpStatus = Int
a} :: GetMediaCapturePipelineResponse)
instance
Prelude.NFData
GetMediaCapturePipelineResponse