{-# 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.ListMediaCapturePipelines
(
ListMediaCapturePipelines (..),
newListMediaCapturePipelines,
listMediaCapturePipelines_nextToken,
listMediaCapturePipelines_maxResults,
ListMediaCapturePipelinesResponse (..),
newListMediaCapturePipelinesResponse,
listMediaCapturePipelinesResponse_nextToken,
listMediaCapturePipelinesResponse_mediaCapturePipelines,
listMediaCapturePipelinesResponse_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 ListMediaCapturePipelines = ListMediaCapturePipelines'
{
ListMediaCapturePipelines -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListMediaCapturePipelines -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListMediaCapturePipelines -> ListMediaCapturePipelines -> Bool
(ListMediaCapturePipelines -> ListMediaCapturePipelines -> Bool)
-> (ListMediaCapturePipelines -> ListMediaCapturePipelines -> Bool)
-> Eq ListMediaCapturePipelines
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMediaCapturePipelines -> ListMediaCapturePipelines -> Bool
$c/= :: ListMediaCapturePipelines -> ListMediaCapturePipelines -> Bool
== :: ListMediaCapturePipelines -> ListMediaCapturePipelines -> Bool
$c== :: ListMediaCapturePipelines -> ListMediaCapturePipelines -> Bool
Prelude.Eq, ReadPrec [ListMediaCapturePipelines]
ReadPrec ListMediaCapturePipelines
Int -> ReadS ListMediaCapturePipelines
ReadS [ListMediaCapturePipelines]
(Int -> ReadS ListMediaCapturePipelines)
-> ReadS [ListMediaCapturePipelines]
-> ReadPrec ListMediaCapturePipelines
-> ReadPrec [ListMediaCapturePipelines]
-> Read ListMediaCapturePipelines
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMediaCapturePipelines]
$creadListPrec :: ReadPrec [ListMediaCapturePipelines]
readPrec :: ReadPrec ListMediaCapturePipelines
$creadPrec :: ReadPrec ListMediaCapturePipelines
readList :: ReadS [ListMediaCapturePipelines]
$creadList :: ReadS [ListMediaCapturePipelines]
readsPrec :: Int -> ReadS ListMediaCapturePipelines
$creadsPrec :: Int -> ReadS ListMediaCapturePipelines
Prelude.Read, Int -> ListMediaCapturePipelines -> ShowS
[ListMediaCapturePipelines] -> ShowS
ListMediaCapturePipelines -> String
(Int -> ListMediaCapturePipelines -> ShowS)
-> (ListMediaCapturePipelines -> String)
-> ([ListMediaCapturePipelines] -> ShowS)
-> Show ListMediaCapturePipelines
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMediaCapturePipelines] -> ShowS
$cshowList :: [ListMediaCapturePipelines] -> ShowS
show :: ListMediaCapturePipelines -> String
$cshow :: ListMediaCapturePipelines -> String
showsPrec :: Int -> ListMediaCapturePipelines -> ShowS
$cshowsPrec :: Int -> ListMediaCapturePipelines -> ShowS
Prelude.Show, (forall x.
ListMediaCapturePipelines -> Rep ListMediaCapturePipelines x)
-> (forall x.
Rep ListMediaCapturePipelines x -> ListMediaCapturePipelines)
-> Generic ListMediaCapturePipelines
forall x.
Rep ListMediaCapturePipelines x -> ListMediaCapturePipelines
forall x.
ListMediaCapturePipelines -> Rep ListMediaCapturePipelines x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMediaCapturePipelines x -> ListMediaCapturePipelines
$cfrom :: forall x.
ListMediaCapturePipelines -> Rep ListMediaCapturePipelines x
Prelude.Generic)
newListMediaCapturePipelines ::
ListMediaCapturePipelines
newListMediaCapturePipelines :: ListMediaCapturePipelines
newListMediaCapturePipelines =
ListMediaCapturePipelines' :: Maybe Text -> Maybe Natural -> ListMediaCapturePipelines
ListMediaCapturePipelines'
{ $sel:nextToken:ListMediaCapturePipelines' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListMediaCapturePipelines' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listMediaCapturePipelines_nextToken :: Lens.Lens' ListMediaCapturePipelines (Prelude.Maybe Prelude.Text)
listMediaCapturePipelines_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMediaCapturePipelines -> f ListMediaCapturePipelines
listMediaCapturePipelines_nextToken = (ListMediaCapturePipelines -> Maybe Text)
-> (ListMediaCapturePipelines
-> Maybe Text -> ListMediaCapturePipelines)
-> Lens
ListMediaCapturePipelines
ListMediaCapturePipelines
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMediaCapturePipelines' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMediaCapturePipelines' :: ListMediaCapturePipelines -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMediaCapturePipelines
s@ListMediaCapturePipelines' {} Maybe Text
a -> ListMediaCapturePipelines
s {$sel:nextToken:ListMediaCapturePipelines' :: Maybe Text
nextToken = Maybe Text
a} :: ListMediaCapturePipelines)
listMediaCapturePipelines_maxResults :: Lens.Lens' ListMediaCapturePipelines (Prelude.Maybe Prelude.Natural)
listMediaCapturePipelines_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListMediaCapturePipelines -> f ListMediaCapturePipelines
listMediaCapturePipelines_maxResults = (ListMediaCapturePipelines -> Maybe Natural)
-> (ListMediaCapturePipelines
-> Maybe Natural -> ListMediaCapturePipelines)
-> Lens
ListMediaCapturePipelines
ListMediaCapturePipelines
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMediaCapturePipelines' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListMediaCapturePipelines' :: ListMediaCapturePipelines -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListMediaCapturePipelines
s@ListMediaCapturePipelines' {} Maybe Natural
a -> ListMediaCapturePipelines
s {$sel:maxResults:ListMediaCapturePipelines' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListMediaCapturePipelines)
instance Core.AWSRequest ListMediaCapturePipelines where
type
AWSResponse ListMediaCapturePipelines =
ListMediaCapturePipelinesResponse
request :: ListMediaCapturePipelines -> Request ListMediaCapturePipelines
request = Service
-> ListMediaCapturePipelines -> Request ListMediaCapturePipelines
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListMediaCapturePipelines
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListMediaCapturePipelines)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListMediaCapturePipelines))
-> Logger
-> Service
-> Proxy ListMediaCapturePipelines
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListMediaCapturePipelines)))
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 Text
-> Maybe [MediaCapturePipeline]
-> Int
-> ListMediaCapturePipelinesResponse
ListMediaCapturePipelinesResponse'
(Maybe Text
-> Maybe [MediaCapturePipeline]
-> Int
-> ListMediaCapturePipelinesResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [MediaCapturePipeline]
-> Int -> ListMediaCapturePipelinesResponse)
forall (f :: * -> *) a b. Functor 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
"NextToken")
Either
String
(Maybe [MediaCapturePipeline]
-> Int -> ListMediaCapturePipelinesResponse)
-> Either String (Maybe [MediaCapturePipeline])
-> Either String (Int -> ListMediaCapturePipelinesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [MediaCapturePipeline]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MediaCapturePipelines"
Either String (Maybe (Maybe [MediaCapturePipeline]))
-> Maybe [MediaCapturePipeline]
-> Either String (Maybe [MediaCapturePipeline])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MediaCapturePipeline]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Int -> ListMediaCapturePipelinesResponse)
-> Either String Int
-> Either String ListMediaCapturePipelinesResponse
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 ListMediaCapturePipelines
instance Prelude.NFData ListMediaCapturePipelines
instance Core.ToHeaders ListMediaCapturePipelines where
toHeaders :: ListMediaCapturePipelines -> ResponseHeaders
toHeaders = ResponseHeaders -> ListMediaCapturePipelines -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ListMediaCapturePipelines where
toPath :: ListMediaCapturePipelines -> ByteString
toPath = ByteString -> ListMediaCapturePipelines -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/media-capture-pipelines"
instance Core.ToQuery ListMediaCapturePipelines where
toQuery :: ListMediaCapturePipelines -> QueryString
toQuery ListMediaCapturePipelines' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListMediaCapturePipelines' :: ListMediaCapturePipelines -> Maybe Natural
$sel:nextToken:ListMediaCapturePipelines' :: ListMediaCapturePipelines -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"next-token" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"max-results" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
]
data ListMediaCapturePipelinesResponse = ListMediaCapturePipelinesResponse'
{
ListMediaCapturePipelinesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListMediaCapturePipelinesResponse -> Maybe [MediaCapturePipeline]
mediaCapturePipelines :: Prelude.Maybe [MediaCapturePipeline],
ListMediaCapturePipelinesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListMediaCapturePipelinesResponse
-> ListMediaCapturePipelinesResponse -> Bool
(ListMediaCapturePipelinesResponse
-> ListMediaCapturePipelinesResponse -> Bool)
-> (ListMediaCapturePipelinesResponse
-> ListMediaCapturePipelinesResponse -> Bool)
-> Eq ListMediaCapturePipelinesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMediaCapturePipelinesResponse
-> ListMediaCapturePipelinesResponse -> Bool
$c/= :: ListMediaCapturePipelinesResponse
-> ListMediaCapturePipelinesResponse -> Bool
== :: ListMediaCapturePipelinesResponse
-> ListMediaCapturePipelinesResponse -> Bool
$c== :: ListMediaCapturePipelinesResponse
-> ListMediaCapturePipelinesResponse -> Bool
Prelude.Eq, Int -> ListMediaCapturePipelinesResponse -> ShowS
[ListMediaCapturePipelinesResponse] -> ShowS
ListMediaCapturePipelinesResponse -> String
(Int -> ListMediaCapturePipelinesResponse -> ShowS)
-> (ListMediaCapturePipelinesResponse -> String)
-> ([ListMediaCapturePipelinesResponse] -> ShowS)
-> Show ListMediaCapturePipelinesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMediaCapturePipelinesResponse] -> ShowS
$cshowList :: [ListMediaCapturePipelinesResponse] -> ShowS
show :: ListMediaCapturePipelinesResponse -> String
$cshow :: ListMediaCapturePipelinesResponse -> String
showsPrec :: Int -> ListMediaCapturePipelinesResponse -> ShowS
$cshowsPrec :: Int -> ListMediaCapturePipelinesResponse -> ShowS
Prelude.Show, (forall x.
ListMediaCapturePipelinesResponse
-> Rep ListMediaCapturePipelinesResponse x)
-> (forall x.
Rep ListMediaCapturePipelinesResponse x
-> ListMediaCapturePipelinesResponse)
-> Generic ListMediaCapturePipelinesResponse
forall x.
Rep ListMediaCapturePipelinesResponse x
-> ListMediaCapturePipelinesResponse
forall x.
ListMediaCapturePipelinesResponse
-> Rep ListMediaCapturePipelinesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMediaCapturePipelinesResponse x
-> ListMediaCapturePipelinesResponse
$cfrom :: forall x.
ListMediaCapturePipelinesResponse
-> Rep ListMediaCapturePipelinesResponse x
Prelude.Generic)
newListMediaCapturePipelinesResponse ::
Prelude.Int ->
ListMediaCapturePipelinesResponse
newListMediaCapturePipelinesResponse :: Int -> ListMediaCapturePipelinesResponse
newListMediaCapturePipelinesResponse Int
pHttpStatus_ =
ListMediaCapturePipelinesResponse' :: Maybe Text
-> Maybe [MediaCapturePipeline]
-> Int
-> ListMediaCapturePipelinesResponse
ListMediaCapturePipelinesResponse'
{ $sel:nextToken:ListMediaCapturePipelinesResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mediaCapturePipelines:ListMediaCapturePipelinesResponse' :: Maybe [MediaCapturePipeline]
mediaCapturePipelines = Maybe [MediaCapturePipeline]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListMediaCapturePipelinesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listMediaCapturePipelinesResponse_nextToken :: Lens.Lens' ListMediaCapturePipelinesResponse (Prelude.Maybe Prelude.Text)
listMediaCapturePipelinesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMediaCapturePipelinesResponse
-> f ListMediaCapturePipelinesResponse
listMediaCapturePipelinesResponse_nextToken = (ListMediaCapturePipelinesResponse -> Maybe Text)
-> (ListMediaCapturePipelinesResponse
-> Maybe Text -> ListMediaCapturePipelinesResponse)
-> Lens
ListMediaCapturePipelinesResponse
ListMediaCapturePipelinesResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMediaCapturePipelinesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMediaCapturePipelinesResponse' :: ListMediaCapturePipelinesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMediaCapturePipelinesResponse
s@ListMediaCapturePipelinesResponse' {} Maybe Text
a -> ListMediaCapturePipelinesResponse
s {$sel:nextToken:ListMediaCapturePipelinesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMediaCapturePipelinesResponse)
listMediaCapturePipelinesResponse_mediaCapturePipelines :: Lens.Lens' ListMediaCapturePipelinesResponse (Prelude.Maybe [MediaCapturePipeline])
listMediaCapturePipelinesResponse_mediaCapturePipelines :: (Maybe [MediaCapturePipeline] -> f (Maybe [MediaCapturePipeline]))
-> ListMediaCapturePipelinesResponse
-> f ListMediaCapturePipelinesResponse
listMediaCapturePipelinesResponse_mediaCapturePipelines = (ListMediaCapturePipelinesResponse -> Maybe [MediaCapturePipeline])
-> (ListMediaCapturePipelinesResponse
-> Maybe [MediaCapturePipeline]
-> ListMediaCapturePipelinesResponse)
-> Lens
ListMediaCapturePipelinesResponse
ListMediaCapturePipelinesResponse
(Maybe [MediaCapturePipeline])
(Maybe [MediaCapturePipeline])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMediaCapturePipelinesResponse' {Maybe [MediaCapturePipeline]
mediaCapturePipelines :: Maybe [MediaCapturePipeline]
$sel:mediaCapturePipelines:ListMediaCapturePipelinesResponse' :: ListMediaCapturePipelinesResponse -> Maybe [MediaCapturePipeline]
mediaCapturePipelines} -> Maybe [MediaCapturePipeline]
mediaCapturePipelines) (\s :: ListMediaCapturePipelinesResponse
s@ListMediaCapturePipelinesResponse' {} Maybe [MediaCapturePipeline]
a -> ListMediaCapturePipelinesResponse
s {$sel:mediaCapturePipelines:ListMediaCapturePipelinesResponse' :: Maybe [MediaCapturePipeline]
mediaCapturePipelines = Maybe [MediaCapturePipeline]
a} :: ListMediaCapturePipelinesResponse) ((Maybe [MediaCapturePipeline] -> f (Maybe [MediaCapturePipeline]))
-> ListMediaCapturePipelinesResponse
-> f ListMediaCapturePipelinesResponse)
-> ((Maybe [MediaCapturePipeline]
-> f (Maybe [MediaCapturePipeline]))
-> Maybe [MediaCapturePipeline]
-> f (Maybe [MediaCapturePipeline]))
-> (Maybe [MediaCapturePipeline]
-> f (Maybe [MediaCapturePipeline]))
-> ListMediaCapturePipelinesResponse
-> f ListMediaCapturePipelinesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[MediaCapturePipeline]
[MediaCapturePipeline]
[MediaCapturePipeline]
[MediaCapturePipeline]
-> Iso
(Maybe [MediaCapturePipeline])
(Maybe [MediaCapturePipeline])
(Maybe [MediaCapturePipeline])
(Maybe [MediaCapturePipeline])
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
[MediaCapturePipeline]
[MediaCapturePipeline]
[MediaCapturePipeline]
[MediaCapturePipeline]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listMediaCapturePipelinesResponse_httpStatus :: Lens.Lens' ListMediaCapturePipelinesResponse Prelude.Int
listMediaCapturePipelinesResponse_httpStatus :: (Int -> f Int)
-> ListMediaCapturePipelinesResponse
-> f ListMediaCapturePipelinesResponse
listMediaCapturePipelinesResponse_httpStatus = (ListMediaCapturePipelinesResponse -> Int)
-> (ListMediaCapturePipelinesResponse
-> Int -> ListMediaCapturePipelinesResponse)
-> Lens
ListMediaCapturePipelinesResponse
ListMediaCapturePipelinesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMediaCapturePipelinesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListMediaCapturePipelinesResponse' :: ListMediaCapturePipelinesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListMediaCapturePipelinesResponse
s@ListMediaCapturePipelinesResponse' {} Int
a -> ListMediaCapturePipelinesResponse
s {$sel:httpStatus:ListMediaCapturePipelinesResponse' :: Int
httpStatus = Int
a} :: ListMediaCapturePipelinesResponse)
instance
Prelude.NFData
ListMediaCapturePipelinesResponse