{-# 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.Kinesis.ListStreamConsumers
(
ListStreamConsumers (..),
newListStreamConsumers,
listStreamConsumers_nextToken,
listStreamConsumers_streamCreationTimestamp,
listStreamConsumers_maxResults,
listStreamConsumers_streamARN,
ListStreamConsumersResponse (..),
newListStreamConsumersResponse,
listStreamConsumersResponse_nextToken,
listStreamConsumersResponse_consumers,
listStreamConsumersResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Kinesis.Types
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 ListStreamConsumers = ListStreamConsumers'
{
ListStreamConsumers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListStreamConsumers -> Maybe POSIX
streamCreationTimestamp :: Prelude.Maybe Core.POSIX,
ListStreamConsumers -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListStreamConsumers -> Text
streamARN :: Prelude.Text
}
deriving (ListStreamConsumers -> ListStreamConsumers -> Bool
(ListStreamConsumers -> ListStreamConsumers -> Bool)
-> (ListStreamConsumers -> ListStreamConsumers -> Bool)
-> Eq ListStreamConsumers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListStreamConsumers -> ListStreamConsumers -> Bool
$c/= :: ListStreamConsumers -> ListStreamConsumers -> Bool
== :: ListStreamConsumers -> ListStreamConsumers -> Bool
$c== :: ListStreamConsumers -> ListStreamConsumers -> Bool
Prelude.Eq, ReadPrec [ListStreamConsumers]
ReadPrec ListStreamConsumers
Int -> ReadS ListStreamConsumers
ReadS [ListStreamConsumers]
(Int -> ReadS ListStreamConsumers)
-> ReadS [ListStreamConsumers]
-> ReadPrec ListStreamConsumers
-> ReadPrec [ListStreamConsumers]
-> Read ListStreamConsumers
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListStreamConsumers]
$creadListPrec :: ReadPrec [ListStreamConsumers]
readPrec :: ReadPrec ListStreamConsumers
$creadPrec :: ReadPrec ListStreamConsumers
readList :: ReadS [ListStreamConsumers]
$creadList :: ReadS [ListStreamConsumers]
readsPrec :: Int -> ReadS ListStreamConsumers
$creadsPrec :: Int -> ReadS ListStreamConsumers
Prelude.Read, Int -> ListStreamConsumers -> ShowS
[ListStreamConsumers] -> ShowS
ListStreamConsumers -> String
(Int -> ListStreamConsumers -> ShowS)
-> (ListStreamConsumers -> String)
-> ([ListStreamConsumers] -> ShowS)
-> Show ListStreamConsumers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListStreamConsumers] -> ShowS
$cshowList :: [ListStreamConsumers] -> ShowS
show :: ListStreamConsumers -> String
$cshow :: ListStreamConsumers -> String
showsPrec :: Int -> ListStreamConsumers -> ShowS
$cshowsPrec :: Int -> ListStreamConsumers -> ShowS
Prelude.Show, (forall x. ListStreamConsumers -> Rep ListStreamConsumers x)
-> (forall x. Rep ListStreamConsumers x -> ListStreamConsumers)
-> Generic ListStreamConsumers
forall x. Rep ListStreamConsumers x -> ListStreamConsumers
forall x. ListStreamConsumers -> Rep ListStreamConsumers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListStreamConsumers x -> ListStreamConsumers
$cfrom :: forall x. ListStreamConsumers -> Rep ListStreamConsumers x
Prelude.Generic)
newListStreamConsumers ::
Prelude.Text ->
ListStreamConsumers
newListStreamConsumers :: Text -> ListStreamConsumers
newListStreamConsumers Text
pStreamARN_ =
ListStreamConsumers' :: Maybe Text
-> Maybe POSIX -> Maybe Natural -> Text -> ListStreamConsumers
ListStreamConsumers'
{ $sel:nextToken:ListStreamConsumers' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:streamCreationTimestamp:ListStreamConsumers' :: Maybe POSIX
streamCreationTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListStreamConsumers' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:streamARN:ListStreamConsumers' :: Text
streamARN = Text
pStreamARN_
}
listStreamConsumers_nextToken :: Lens.Lens' ListStreamConsumers (Prelude.Maybe Prelude.Text)
listStreamConsumers_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListStreamConsumers -> f ListStreamConsumers
listStreamConsumers_nextToken = (ListStreamConsumers -> Maybe Text)
-> (ListStreamConsumers -> Maybe Text -> ListStreamConsumers)
-> Lens
ListStreamConsumers ListStreamConsumers (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamConsumers' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListStreamConsumers' :: ListStreamConsumers -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListStreamConsumers
s@ListStreamConsumers' {} Maybe Text
a -> ListStreamConsumers
s {$sel:nextToken:ListStreamConsumers' :: Maybe Text
nextToken = Maybe Text
a} :: ListStreamConsumers)
listStreamConsumers_streamCreationTimestamp :: Lens.Lens' ListStreamConsumers (Prelude.Maybe Prelude.UTCTime)
listStreamConsumers_streamCreationTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListStreamConsumers -> f ListStreamConsumers
listStreamConsumers_streamCreationTimestamp = (ListStreamConsumers -> Maybe POSIX)
-> (ListStreamConsumers -> Maybe POSIX -> ListStreamConsumers)
-> Lens
ListStreamConsumers ListStreamConsumers (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamConsumers' {Maybe POSIX
streamCreationTimestamp :: Maybe POSIX
$sel:streamCreationTimestamp:ListStreamConsumers' :: ListStreamConsumers -> Maybe POSIX
streamCreationTimestamp} -> Maybe POSIX
streamCreationTimestamp) (\s :: ListStreamConsumers
s@ListStreamConsumers' {} Maybe POSIX
a -> ListStreamConsumers
s {$sel:streamCreationTimestamp:ListStreamConsumers' :: Maybe POSIX
streamCreationTimestamp = Maybe POSIX
a} :: ListStreamConsumers) ((Maybe POSIX -> f (Maybe POSIX))
-> ListStreamConsumers -> f ListStreamConsumers)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListStreamConsumers
-> f ListStreamConsumers
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
listStreamConsumers_maxResults :: Lens.Lens' ListStreamConsumers (Prelude.Maybe Prelude.Natural)
listStreamConsumers_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListStreamConsumers -> f ListStreamConsumers
listStreamConsumers_maxResults = (ListStreamConsumers -> Maybe Natural)
-> (ListStreamConsumers -> Maybe Natural -> ListStreamConsumers)
-> Lens
ListStreamConsumers
ListStreamConsumers
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamConsumers' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListStreamConsumers' :: ListStreamConsumers -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListStreamConsumers
s@ListStreamConsumers' {} Maybe Natural
a -> ListStreamConsumers
s {$sel:maxResults:ListStreamConsumers' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListStreamConsumers)
listStreamConsumers_streamARN :: Lens.Lens' ListStreamConsumers Prelude.Text
listStreamConsumers_streamARN :: (Text -> f Text) -> ListStreamConsumers -> f ListStreamConsumers
listStreamConsumers_streamARN = (ListStreamConsumers -> Text)
-> (ListStreamConsumers -> Text -> ListStreamConsumers)
-> Lens ListStreamConsumers ListStreamConsumers Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamConsumers' {Text
streamARN :: Text
$sel:streamARN:ListStreamConsumers' :: ListStreamConsumers -> Text
streamARN} -> Text
streamARN) (\s :: ListStreamConsumers
s@ListStreamConsumers' {} Text
a -> ListStreamConsumers
s {$sel:streamARN:ListStreamConsumers' :: Text
streamARN = Text
a} :: ListStreamConsumers)
instance Core.AWSPager ListStreamConsumers where
page :: ListStreamConsumers
-> AWSResponse ListStreamConsumers -> Maybe ListStreamConsumers
page ListStreamConsumers
rq AWSResponse ListStreamConsumers
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListStreamConsumers
ListStreamConsumersResponse
rs
ListStreamConsumersResponse
-> Getting (First Text) ListStreamConsumersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListStreamConsumersResponse
-> Const (First Text) ListStreamConsumersResponse
Lens' ListStreamConsumersResponse (Maybe Text)
listStreamConsumersResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListStreamConsumersResponse
-> Const (First Text) ListStreamConsumersResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListStreamConsumersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListStreamConsumers
forall a. Maybe a
Prelude.Nothing
| Maybe [Consumer] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListStreamConsumers
ListStreamConsumersResponse
rs
ListStreamConsumersResponse
-> Getting
(First [Consumer]) ListStreamConsumersResponse [Consumer]
-> Maybe [Consumer]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Consumer] -> Const (First [Consumer]) (Maybe [Consumer]))
-> ListStreamConsumersResponse
-> Const (First [Consumer]) ListStreamConsumersResponse
Lens' ListStreamConsumersResponse (Maybe [Consumer])
listStreamConsumersResponse_consumers
((Maybe [Consumer] -> Const (First [Consumer]) (Maybe [Consumer]))
-> ListStreamConsumersResponse
-> Const (First [Consumer]) ListStreamConsumersResponse)
-> (([Consumer] -> Const (First [Consumer]) [Consumer])
-> Maybe [Consumer] -> Const (First [Consumer]) (Maybe [Consumer]))
-> Getting
(First [Consumer]) ListStreamConsumersResponse [Consumer]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Consumer] -> Const (First [Consumer]) [Consumer])
-> Maybe [Consumer] -> Const (First [Consumer]) (Maybe [Consumer])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListStreamConsumers
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListStreamConsumers -> Maybe ListStreamConsumers
forall a. a -> Maybe a
Prelude.Just (ListStreamConsumers -> Maybe ListStreamConsumers)
-> ListStreamConsumers -> Maybe ListStreamConsumers
forall a b. (a -> b) -> a -> b
Prelude.$
ListStreamConsumers
rq
ListStreamConsumers
-> (ListStreamConsumers -> ListStreamConsumers)
-> ListStreamConsumers
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListStreamConsumers -> Identity ListStreamConsumers
Lens
ListStreamConsumers ListStreamConsumers (Maybe Text) (Maybe Text)
listStreamConsumers_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListStreamConsumers -> Identity ListStreamConsumers)
-> Maybe Text -> ListStreamConsumers -> ListStreamConsumers
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListStreamConsumers
ListStreamConsumersResponse
rs
ListStreamConsumersResponse
-> Getting (First Text) ListStreamConsumersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListStreamConsumersResponse
-> Const (First Text) ListStreamConsumersResponse
Lens' ListStreamConsumersResponse (Maybe Text)
listStreamConsumersResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListStreamConsumersResponse
-> Const (First Text) ListStreamConsumersResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListStreamConsumersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListStreamConsumers where
type
AWSResponse ListStreamConsumers =
ListStreamConsumersResponse
request :: ListStreamConsumers -> Request ListStreamConsumers
request = Service -> ListStreamConsumers -> Request ListStreamConsumers
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListStreamConsumers
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListStreamConsumers)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListStreamConsumers))
-> Logger
-> Service
-> Proxy ListStreamConsumers
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListStreamConsumers)))
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 [Consumer] -> Int -> ListStreamConsumersResponse
ListStreamConsumersResponse'
(Maybe Text
-> Maybe [Consumer] -> Int -> ListStreamConsumersResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe [Consumer] -> Int -> ListStreamConsumersResponse)
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 [Consumer] -> Int -> ListStreamConsumersResponse)
-> Either String (Maybe [Consumer])
-> Either String (Int -> ListStreamConsumersResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Consumer]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Consumers" Either String (Maybe (Maybe [Consumer]))
-> Maybe [Consumer] -> Either String (Maybe [Consumer])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Consumer]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> ListStreamConsumersResponse)
-> Either String Int -> Either String ListStreamConsumersResponse
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 ListStreamConsumers
instance Prelude.NFData ListStreamConsumers
instance Core.ToHeaders ListStreamConsumers where
toHeaders :: ListStreamConsumers -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListStreamConsumers -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Kinesis_20131202.ListStreamConsumers" ::
Prelude.ByteString
),
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 ListStreamConsumers where
toJSON :: ListStreamConsumers -> Value
toJSON ListStreamConsumers' {Maybe Natural
Maybe Text
Maybe POSIX
Text
streamARN :: Text
maxResults :: Maybe Natural
streamCreationTimestamp :: Maybe POSIX
nextToken :: Maybe Text
$sel:streamARN:ListStreamConsumers' :: ListStreamConsumers -> Text
$sel:maxResults:ListStreamConsumers' :: ListStreamConsumers -> Maybe Natural
$sel:streamCreationTimestamp:ListStreamConsumers' :: ListStreamConsumers -> Maybe POSIX
$sel:nextToken:ListStreamConsumers' :: ListStreamConsumers -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"NextToken" 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
nextToken,
(Text
"StreamCreationTimestamp" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
streamCreationTimestamp,
(Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"StreamARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
streamARN)
]
)
instance Core.ToPath ListStreamConsumers where
toPath :: ListStreamConsumers -> ByteString
toPath = ByteString -> ListStreamConsumers -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListStreamConsumers where
toQuery :: ListStreamConsumers -> QueryString
toQuery = QueryString -> ListStreamConsumers -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListStreamConsumersResponse = ListStreamConsumersResponse'
{
ListStreamConsumersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListStreamConsumersResponse -> Maybe [Consumer]
consumers :: Prelude.Maybe [Consumer],
ListStreamConsumersResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListStreamConsumersResponse -> ListStreamConsumersResponse -> Bool
(ListStreamConsumersResponse
-> ListStreamConsumersResponse -> Bool)
-> (ListStreamConsumersResponse
-> ListStreamConsumersResponse -> Bool)
-> Eq ListStreamConsumersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListStreamConsumersResponse -> ListStreamConsumersResponse -> Bool
$c/= :: ListStreamConsumersResponse -> ListStreamConsumersResponse -> Bool
== :: ListStreamConsumersResponse -> ListStreamConsumersResponse -> Bool
$c== :: ListStreamConsumersResponse -> ListStreamConsumersResponse -> Bool
Prelude.Eq, ReadPrec [ListStreamConsumersResponse]
ReadPrec ListStreamConsumersResponse
Int -> ReadS ListStreamConsumersResponse
ReadS [ListStreamConsumersResponse]
(Int -> ReadS ListStreamConsumersResponse)
-> ReadS [ListStreamConsumersResponse]
-> ReadPrec ListStreamConsumersResponse
-> ReadPrec [ListStreamConsumersResponse]
-> Read ListStreamConsumersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListStreamConsumersResponse]
$creadListPrec :: ReadPrec [ListStreamConsumersResponse]
readPrec :: ReadPrec ListStreamConsumersResponse
$creadPrec :: ReadPrec ListStreamConsumersResponse
readList :: ReadS [ListStreamConsumersResponse]
$creadList :: ReadS [ListStreamConsumersResponse]
readsPrec :: Int -> ReadS ListStreamConsumersResponse
$creadsPrec :: Int -> ReadS ListStreamConsumersResponse
Prelude.Read, Int -> ListStreamConsumersResponse -> ShowS
[ListStreamConsumersResponse] -> ShowS
ListStreamConsumersResponse -> String
(Int -> ListStreamConsumersResponse -> ShowS)
-> (ListStreamConsumersResponse -> String)
-> ([ListStreamConsumersResponse] -> ShowS)
-> Show ListStreamConsumersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListStreamConsumersResponse] -> ShowS
$cshowList :: [ListStreamConsumersResponse] -> ShowS
show :: ListStreamConsumersResponse -> String
$cshow :: ListStreamConsumersResponse -> String
showsPrec :: Int -> ListStreamConsumersResponse -> ShowS
$cshowsPrec :: Int -> ListStreamConsumersResponse -> ShowS
Prelude.Show, (forall x.
ListStreamConsumersResponse -> Rep ListStreamConsumersResponse x)
-> (forall x.
Rep ListStreamConsumersResponse x -> ListStreamConsumersResponse)
-> Generic ListStreamConsumersResponse
forall x.
Rep ListStreamConsumersResponse x -> ListStreamConsumersResponse
forall x.
ListStreamConsumersResponse -> Rep ListStreamConsumersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListStreamConsumersResponse x -> ListStreamConsumersResponse
$cfrom :: forall x.
ListStreamConsumersResponse -> Rep ListStreamConsumersResponse x
Prelude.Generic)
newListStreamConsumersResponse ::
Prelude.Int ->
ListStreamConsumersResponse
newListStreamConsumersResponse :: Int -> ListStreamConsumersResponse
newListStreamConsumersResponse Int
pHttpStatus_ =
ListStreamConsumersResponse' :: Maybe Text
-> Maybe [Consumer] -> Int -> ListStreamConsumersResponse
ListStreamConsumersResponse'
{ $sel:nextToken:ListStreamConsumersResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:consumers:ListStreamConsumersResponse' :: Maybe [Consumer]
consumers = Maybe [Consumer]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListStreamConsumersResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listStreamConsumersResponse_nextToken :: Lens.Lens' ListStreamConsumersResponse (Prelude.Maybe Prelude.Text)
listStreamConsumersResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListStreamConsumersResponse -> f ListStreamConsumersResponse
listStreamConsumersResponse_nextToken = (ListStreamConsumersResponse -> Maybe Text)
-> (ListStreamConsumersResponse
-> Maybe Text -> ListStreamConsumersResponse)
-> Lens' ListStreamConsumersResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamConsumersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListStreamConsumersResponse' :: ListStreamConsumersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListStreamConsumersResponse
s@ListStreamConsumersResponse' {} Maybe Text
a -> ListStreamConsumersResponse
s {$sel:nextToken:ListStreamConsumersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListStreamConsumersResponse)
listStreamConsumersResponse_consumers :: Lens.Lens' ListStreamConsumersResponse (Prelude.Maybe [Consumer])
listStreamConsumersResponse_consumers :: (Maybe [Consumer] -> f (Maybe [Consumer]))
-> ListStreamConsumersResponse -> f ListStreamConsumersResponse
listStreamConsumersResponse_consumers = (ListStreamConsumersResponse -> Maybe [Consumer])
-> (ListStreamConsumersResponse
-> Maybe [Consumer] -> ListStreamConsumersResponse)
-> Lens' ListStreamConsumersResponse (Maybe [Consumer])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamConsumersResponse' {Maybe [Consumer]
consumers :: Maybe [Consumer]
$sel:consumers:ListStreamConsumersResponse' :: ListStreamConsumersResponse -> Maybe [Consumer]
consumers} -> Maybe [Consumer]
consumers) (\s :: ListStreamConsumersResponse
s@ListStreamConsumersResponse' {} Maybe [Consumer]
a -> ListStreamConsumersResponse
s {$sel:consumers:ListStreamConsumersResponse' :: Maybe [Consumer]
consumers = Maybe [Consumer]
a} :: ListStreamConsumersResponse) ((Maybe [Consumer] -> f (Maybe [Consumer]))
-> ListStreamConsumersResponse -> f ListStreamConsumersResponse)
-> ((Maybe [Consumer] -> f (Maybe [Consumer]))
-> Maybe [Consumer] -> f (Maybe [Consumer]))
-> (Maybe [Consumer] -> f (Maybe [Consumer]))
-> ListStreamConsumersResponse
-> f ListStreamConsumersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Consumer] [Consumer] [Consumer] [Consumer]
-> Iso
(Maybe [Consumer])
(Maybe [Consumer])
(Maybe [Consumer])
(Maybe [Consumer])
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 [Consumer] [Consumer] [Consumer] [Consumer]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listStreamConsumersResponse_httpStatus :: Lens.Lens' ListStreamConsumersResponse Prelude.Int
listStreamConsumersResponse_httpStatus :: (Int -> f Int)
-> ListStreamConsumersResponse -> f ListStreamConsumersResponse
listStreamConsumersResponse_httpStatus = (ListStreamConsumersResponse -> Int)
-> (ListStreamConsumersResponse
-> Int -> ListStreamConsumersResponse)
-> Lens
ListStreamConsumersResponse ListStreamConsumersResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamConsumersResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListStreamConsumersResponse' :: ListStreamConsumersResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListStreamConsumersResponse
s@ListStreamConsumersResponse' {} Int
a -> ListStreamConsumersResponse
s {$sel:httpStatus:ListStreamConsumersResponse' :: Int
httpStatus = Int
a} :: ListStreamConsumersResponse)
instance Prelude.NFData ListStreamConsumersResponse