{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Kinesis.ListStreams
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists your Kinesis data streams.
--
-- The number of streams may be too large to return from a single call to
-- @ListStreams@. You can limit the number of returned streams using the
-- @Limit@ parameter. If you do not specify a value for the @Limit@
-- parameter, Kinesis Data Streams uses the default limit, which is
-- currently 10.
--
-- You can detect if there are more streams available to list by using the
-- @HasMoreStreams@ flag from the returned output. If there are more
-- streams available, you can request more streams by using the name of the
-- last stream returned by the @ListStreams@ request in the
-- @ExclusiveStartStreamName@ parameter in a subsequent request to
-- @ListStreams@. The group of stream names returned by the subsequent
-- request is then added to the list. You can continue this process until
-- all the stream names have been collected in the list.
--
-- ListStreams has a limit of five transactions per second per account.
--
-- This operation returns paginated results.
module Amazonka.Kinesis.ListStreams
  ( -- * Creating a Request
    ListStreams (..),
    newListStreams,

    -- * Request Lenses
    listStreams_limit,
    listStreams_exclusiveStartStreamName,

    -- * Destructuring the Response
    ListStreamsResponse (..),
    newListStreamsResponse,

    -- * Response Lenses
    listStreamsResponse_httpStatus,
    listStreamsResponse_streamNames,
    listStreamsResponse_hasMoreStreams,
  )
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

-- | Represents the input for @ListStreams@.
--
-- /See:/ 'newListStreams' smart constructor.
data ListStreams = ListStreams'
  { -- | The maximum number of streams to list.
    ListStreams -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The name of the stream to start the list with.
    ListStreams -> Maybe Text
exclusiveStartStreamName :: Prelude.Maybe Prelude.Text
  }
  deriving (ListStreams -> ListStreams -> Bool
(ListStreams -> ListStreams -> Bool)
-> (ListStreams -> ListStreams -> Bool) -> Eq ListStreams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListStreams -> ListStreams -> Bool
$c/= :: ListStreams -> ListStreams -> Bool
== :: ListStreams -> ListStreams -> Bool
$c== :: ListStreams -> ListStreams -> Bool
Prelude.Eq, ReadPrec [ListStreams]
ReadPrec ListStreams
Int -> ReadS ListStreams
ReadS [ListStreams]
(Int -> ReadS ListStreams)
-> ReadS [ListStreams]
-> ReadPrec ListStreams
-> ReadPrec [ListStreams]
-> Read ListStreams
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListStreams]
$creadListPrec :: ReadPrec [ListStreams]
readPrec :: ReadPrec ListStreams
$creadPrec :: ReadPrec ListStreams
readList :: ReadS [ListStreams]
$creadList :: ReadS [ListStreams]
readsPrec :: Int -> ReadS ListStreams
$creadsPrec :: Int -> ReadS ListStreams
Prelude.Read, Int -> ListStreams -> ShowS
[ListStreams] -> ShowS
ListStreams -> String
(Int -> ListStreams -> ShowS)
-> (ListStreams -> String)
-> ([ListStreams] -> ShowS)
-> Show ListStreams
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListStreams] -> ShowS
$cshowList :: [ListStreams] -> ShowS
show :: ListStreams -> String
$cshow :: ListStreams -> String
showsPrec :: Int -> ListStreams -> ShowS
$cshowsPrec :: Int -> ListStreams -> ShowS
Prelude.Show, (forall x. ListStreams -> Rep ListStreams x)
-> (forall x. Rep ListStreams x -> ListStreams)
-> Generic ListStreams
forall x. Rep ListStreams x -> ListStreams
forall x. ListStreams -> Rep ListStreams x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListStreams x -> ListStreams
$cfrom :: forall x. ListStreams -> Rep ListStreams x
Prelude.Generic)

-- |
-- Create a value of 'ListStreams' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'limit', 'listStreams_limit' - The maximum number of streams to list.
--
-- 'exclusiveStartStreamName', 'listStreams_exclusiveStartStreamName' - The name of the stream to start the list with.
newListStreams ::
  ListStreams
newListStreams :: ListStreams
newListStreams =
  ListStreams' :: Maybe Natural -> Maybe Text -> ListStreams
ListStreams'
    { $sel:limit:ListStreams' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:exclusiveStartStreamName:ListStreams' :: Maybe Text
exclusiveStartStreamName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of streams to list.
listStreams_limit :: Lens.Lens' ListStreams (Prelude.Maybe Prelude.Natural)
listStreams_limit :: (Maybe Natural -> f (Maybe Natural))
-> ListStreams -> f ListStreams
listStreams_limit = (ListStreams -> Maybe Natural)
-> (ListStreams -> Maybe Natural -> ListStreams)
-> Lens ListStreams ListStreams (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreams' {Maybe Natural
limit :: Maybe Natural
$sel:limit:ListStreams' :: ListStreams -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: ListStreams
s@ListStreams' {} Maybe Natural
a -> ListStreams
s {$sel:limit:ListStreams' :: Maybe Natural
limit = Maybe Natural
a} :: ListStreams)

-- | The name of the stream to start the list with.
listStreams_exclusiveStartStreamName :: Lens.Lens' ListStreams (Prelude.Maybe Prelude.Text)
listStreams_exclusiveStartStreamName :: (Maybe Text -> f (Maybe Text)) -> ListStreams -> f ListStreams
listStreams_exclusiveStartStreamName = (ListStreams -> Maybe Text)
-> (ListStreams -> Maybe Text -> ListStreams)
-> Lens ListStreams ListStreams (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreams' {Maybe Text
exclusiveStartStreamName :: Maybe Text
$sel:exclusiveStartStreamName:ListStreams' :: ListStreams -> Maybe Text
exclusiveStartStreamName} -> Maybe Text
exclusiveStartStreamName) (\s :: ListStreams
s@ListStreams' {} Maybe Text
a -> ListStreams
s {$sel:exclusiveStartStreamName:ListStreams' :: Maybe Text
exclusiveStartStreamName = Maybe Text
a} :: ListStreams)

instance Core.AWSPager ListStreams where
  page :: ListStreams -> AWSResponse ListStreams -> Maybe ListStreams
page ListStreams
rq AWSResponse ListStreams
rs
    | Bool -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse ListStreams
ListStreamsResponse
rs ListStreamsResponse
-> Getting Bool ListStreamsResponse Bool -> Bool
forall s a. s -> Getting a s a -> a
Lens.^. Getting Bool ListStreamsResponse Bool
Lens' ListStreamsResponse Bool
listStreamsResponse_hasMoreStreams) =
      Maybe ListStreams
forall a. Maybe a
Prelude.Nothing
    | Maybe Text -> Bool
forall a. Maybe a -> Bool
Prelude.isNothing
        ( AWSResponse ListStreams
ListStreamsResponse
rs
            ListStreamsResponse
-> Getting (First Text) ListStreamsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? ([Text] -> Const (First Text) [Text])
-> ListStreamsResponse -> Const (First Text) ListStreamsResponse
Lens' ListStreamsResponse [Text]
listStreamsResponse_streamNames (([Text] -> Const (First Text) [Text])
 -> ListStreamsResponse -> Const (First Text) ListStreamsResponse)
-> ((Text -> Const (First Text) Text)
    -> [Text] -> Const (First Text) [Text])
-> Getting (First Text) ListStreamsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> [Text] -> Const (First Text) [Text]
forall s a. Snoc s s a a => Traversal' s a
Lens._last
        ) =
      Maybe ListStreams
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListStreams -> Maybe ListStreams
forall a. a -> Maybe a
Prelude.Just (ListStreams -> Maybe ListStreams)
-> ListStreams -> Maybe ListStreams
forall a b. (a -> b) -> a -> b
Prelude.$
        ListStreams
rq
          ListStreams -> (ListStreams -> ListStreams) -> ListStreams
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListStreams -> Identity ListStreams
Lens ListStreams ListStreams (Maybe Text) (Maybe Text)
listStreams_exclusiveStartStreamName
          ((Maybe Text -> Identity (Maybe Text))
 -> ListStreams -> Identity ListStreams)
-> Maybe Text -> ListStreams -> ListStreams
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListStreams
ListStreamsResponse
rs
          ListStreamsResponse
-> Getting (First Text) ListStreamsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? ([Text] -> Const (First Text) [Text])
-> ListStreamsResponse -> Const (First Text) ListStreamsResponse
Lens' ListStreamsResponse [Text]
listStreamsResponse_streamNames (([Text] -> Const (First Text) [Text])
 -> ListStreamsResponse -> Const (First Text) ListStreamsResponse)
-> ((Text -> Const (First Text) Text)
    -> [Text] -> Const (First Text) [Text])
-> Getting (First Text) ListStreamsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> [Text] -> Const (First Text) [Text]
forall s a. Snoc s s a a => Traversal' s a
Lens._last

instance Core.AWSRequest ListStreams where
  type AWSResponse ListStreams = ListStreamsResponse
  request :: ListStreams -> Request ListStreams
request = Service -> ListStreams -> Request ListStreams
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListStreams
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListStreams)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListStreams))
-> Logger
-> Service
-> Proxy ListStreams
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListStreams)))
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 ->
          Int -> [Text] -> Bool -> ListStreamsResponse
ListStreamsResponse'
            (Int -> [Text] -> Bool -> ListStreamsResponse)
-> Either String Int
-> Either String ([Text] -> Bool -> ListStreamsResponse)
forall (f :: * -> *) a b. Functor 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))
            Either String ([Text] -> Bool -> ListStreamsResponse)
-> Either String [Text]
-> Either String (Bool -> ListStreamsResponse)
forall (f :: * -> *) a b. Applicative f => 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
"StreamNames" Either String (Maybe [Text]) -> [Text] -> Either String [Text]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Bool -> ListStreamsResponse)
-> Either String Bool -> Either String ListStreamsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Bool
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"HasMoreStreams")
      )

instance Prelude.Hashable ListStreams

instance Prelude.NFData ListStreams

instance Core.ToHeaders ListStreams where
  toHeaders :: ListStreams -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListStreams -> 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.ListStreams" ::
                          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 ListStreams where
  toJSON :: ListStreams -> Value
toJSON ListStreams' {Maybe Natural
Maybe Text
exclusiveStartStreamName :: Maybe Text
limit :: Maybe Natural
$sel:exclusiveStartStreamName:ListStreams' :: ListStreams -> Maybe Text
$sel:limit:ListStreams' :: ListStreams -> Maybe Natural
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Limit" 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
limit,
            (Text
"ExclusiveStartStreamName" 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
exclusiveStartStreamName
          ]
      )

instance Core.ToPath ListStreams where
  toPath :: ListStreams -> ByteString
toPath = ByteString -> ListStreams -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery ListStreams where
  toQuery :: ListStreams -> QueryString
toQuery = QueryString -> ListStreams -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | Represents the output for @ListStreams@.
--
-- /See:/ 'newListStreamsResponse' smart constructor.
data ListStreamsResponse = ListStreamsResponse'
  { -- | The response's http status code.
    ListStreamsResponse -> Int
httpStatus :: Prelude.Int,
    -- | The names of the streams that are associated with the AWS account making
    -- the @ListStreams@ request.
    ListStreamsResponse -> [Text]
streamNames :: [Prelude.Text],
    -- | If set to @true@, there are more streams available to list.
    ListStreamsResponse -> Bool
hasMoreStreams :: Prelude.Bool
  }
  deriving (ListStreamsResponse -> ListStreamsResponse -> Bool
(ListStreamsResponse -> ListStreamsResponse -> Bool)
-> (ListStreamsResponse -> ListStreamsResponse -> Bool)
-> Eq ListStreamsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListStreamsResponse -> ListStreamsResponse -> Bool
$c/= :: ListStreamsResponse -> ListStreamsResponse -> Bool
== :: ListStreamsResponse -> ListStreamsResponse -> Bool
$c== :: ListStreamsResponse -> ListStreamsResponse -> Bool
Prelude.Eq, ReadPrec [ListStreamsResponse]
ReadPrec ListStreamsResponse
Int -> ReadS ListStreamsResponse
ReadS [ListStreamsResponse]
(Int -> ReadS ListStreamsResponse)
-> ReadS [ListStreamsResponse]
-> ReadPrec ListStreamsResponse
-> ReadPrec [ListStreamsResponse]
-> Read ListStreamsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListStreamsResponse]
$creadListPrec :: ReadPrec [ListStreamsResponse]
readPrec :: ReadPrec ListStreamsResponse
$creadPrec :: ReadPrec ListStreamsResponse
readList :: ReadS [ListStreamsResponse]
$creadList :: ReadS [ListStreamsResponse]
readsPrec :: Int -> ReadS ListStreamsResponse
$creadsPrec :: Int -> ReadS ListStreamsResponse
Prelude.Read, Int -> ListStreamsResponse -> ShowS
[ListStreamsResponse] -> ShowS
ListStreamsResponse -> String
(Int -> ListStreamsResponse -> ShowS)
-> (ListStreamsResponse -> String)
-> ([ListStreamsResponse] -> ShowS)
-> Show ListStreamsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListStreamsResponse] -> ShowS
$cshowList :: [ListStreamsResponse] -> ShowS
show :: ListStreamsResponse -> String
$cshow :: ListStreamsResponse -> String
showsPrec :: Int -> ListStreamsResponse -> ShowS
$cshowsPrec :: Int -> ListStreamsResponse -> ShowS
Prelude.Show, (forall x. ListStreamsResponse -> Rep ListStreamsResponse x)
-> (forall x. Rep ListStreamsResponse x -> ListStreamsResponse)
-> Generic ListStreamsResponse
forall x. Rep ListStreamsResponse x -> ListStreamsResponse
forall x. ListStreamsResponse -> Rep ListStreamsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListStreamsResponse x -> ListStreamsResponse
$cfrom :: forall x. ListStreamsResponse -> Rep ListStreamsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListStreamsResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'listStreamsResponse_httpStatus' - The response's http status code.
--
-- 'streamNames', 'listStreamsResponse_streamNames' - The names of the streams that are associated with the AWS account making
-- the @ListStreams@ request.
--
-- 'hasMoreStreams', 'listStreamsResponse_hasMoreStreams' - If set to @true@, there are more streams available to list.
newListStreamsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'hasMoreStreams'
  Prelude.Bool ->
  ListStreamsResponse
newListStreamsResponse :: Int -> Bool -> ListStreamsResponse
newListStreamsResponse Int
pHttpStatus_ Bool
pHasMoreStreams_ =
  ListStreamsResponse' :: Int -> [Text] -> Bool -> ListStreamsResponse
ListStreamsResponse'
    { $sel:httpStatus:ListStreamsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:streamNames:ListStreamsResponse' :: [Text]
streamNames = [Text]
forall a. Monoid a => a
Prelude.mempty,
      $sel:hasMoreStreams:ListStreamsResponse' :: Bool
hasMoreStreams = Bool
pHasMoreStreams_
    }

-- | The response's http status code.
listStreamsResponse_httpStatus :: Lens.Lens' ListStreamsResponse Prelude.Int
listStreamsResponse_httpStatus :: (Int -> f Int) -> ListStreamsResponse -> f ListStreamsResponse
listStreamsResponse_httpStatus = (ListStreamsResponse -> Int)
-> (ListStreamsResponse -> Int -> ListStreamsResponse)
-> Lens ListStreamsResponse ListStreamsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListStreamsResponse' :: ListStreamsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListStreamsResponse
s@ListStreamsResponse' {} Int
a -> ListStreamsResponse
s {$sel:httpStatus:ListStreamsResponse' :: Int
httpStatus = Int
a} :: ListStreamsResponse)

-- | The names of the streams that are associated with the AWS account making
-- the @ListStreams@ request.
listStreamsResponse_streamNames :: Lens.Lens' ListStreamsResponse [Prelude.Text]
listStreamsResponse_streamNames :: ([Text] -> f [Text])
-> ListStreamsResponse -> f ListStreamsResponse
listStreamsResponse_streamNames = (ListStreamsResponse -> [Text])
-> (ListStreamsResponse -> [Text] -> ListStreamsResponse)
-> Lens' ListStreamsResponse [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamsResponse' {[Text]
streamNames :: [Text]
$sel:streamNames:ListStreamsResponse' :: ListStreamsResponse -> [Text]
streamNames} -> [Text]
streamNames) (\s :: ListStreamsResponse
s@ListStreamsResponse' {} [Text]
a -> ListStreamsResponse
s {$sel:streamNames:ListStreamsResponse' :: [Text]
streamNames = [Text]
a} :: ListStreamsResponse) (([Text] -> f [Text])
 -> ListStreamsResponse -> f ListStreamsResponse)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ListStreamsResponse
-> f ListStreamsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If set to @true@, there are more streams available to list.
listStreamsResponse_hasMoreStreams :: Lens.Lens' ListStreamsResponse Prelude.Bool
listStreamsResponse_hasMoreStreams :: (Bool -> f Bool) -> ListStreamsResponse -> f ListStreamsResponse
listStreamsResponse_hasMoreStreams = (ListStreamsResponse -> Bool)
-> (ListStreamsResponse -> Bool -> ListStreamsResponse)
-> Lens' ListStreamsResponse Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamsResponse' {Bool
hasMoreStreams :: Bool
$sel:hasMoreStreams:ListStreamsResponse' :: ListStreamsResponse -> Bool
hasMoreStreams} -> Bool
hasMoreStreams) (\s :: ListStreamsResponse
s@ListStreamsResponse' {} Bool
a -> ListStreamsResponse
s {$sel:hasMoreStreams:ListStreamsResponse' :: Bool
hasMoreStreams = Bool
a} :: ListStreamsResponse)

instance Prelude.NFData ListStreamsResponse