{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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 100.
--
-- 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_exclusiveStartStreamName,
    listStreams_limit,
    listStreams_nextToken,

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

    -- * Response Lenses
    listStreamsResponse_nextToken,
    listStreamsResponse_streamSummaries,
    listStreamsResponse_httpStatus,
    listStreamsResponse_streamNames,
    listStreamsResponse_hasMoreStreams,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Kinesis.Types
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 name of the stream to start the list with.
    ListStreams -> Maybe Text
exclusiveStartStreamName :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of streams to list. The default value is 100. If you
    -- specify a value greater than 100, at most 100 results are returned.
    ListStreams -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    ListStreams -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListStreams -> ListStreams -> Bool
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]
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
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. 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:
--
-- 'exclusiveStartStreamName', 'listStreams_exclusiveStartStreamName' - The name of the stream to start the list with.
--
-- 'limit', 'listStreams_limit' - The maximum number of streams to list. The default value is 100. If you
-- specify a value greater than 100, at most 100 results are returned.
--
-- 'nextToken', 'listStreams_nextToken' -
newListStreams ::
  ListStreams
newListStreams :: ListStreams
newListStreams =
  ListStreams'
    { $sel:exclusiveStartStreamName:ListStreams' :: Maybe Text
exclusiveStartStreamName =
        forall a. Maybe a
Prelude.Nothing,
      $sel:limit:ListStreams' :: Maybe Natural
limit = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListStreams' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the stream to start the list with.
listStreams_exclusiveStartStreamName :: Lens.Lens' ListStreams (Prelude.Maybe Prelude.Text)
listStreams_exclusiveStartStreamName :: Lens' ListStreams (Maybe Text)
listStreams_exclusiveStartStreamName = 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)

-- | The maximum number of streams to list. The default value is 100. If you
-- specify a value greater than 100, at most 100 results are returned.
listStreams_limit :: Lens.Lens' ListStreams (Prelude.Maybe Prelude.Natural)
listStreams_limit :: Lens' ListStreams (Maybe Natural)
listStreams_limit = 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)

listStreams_nextToken :: Lens.Lens' ListStreams (Prelude.Maybe Prelude.Text)
listStreams_nextToken :: Lens' ListStreams (Maybe Text)
listStreams_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreams' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListStreams' :: ListStreams -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListStreams
s@ListStreams' {} Maybe Text
a -> ListStreams
s {$sel:nextToken:ListStreams' :: Maybe Text
nextToken = Maybe Text
a} :: ListStreams)

instance Core.AWSPager ListStreams where
  page :: ListStreams -> AWSResponse ListStreams -> Maybe ListStreams
page ListStreams
rq AWSResponse ListStreams
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse ListStreams
rs forall s a. s -> Getting a s a -> a
Lens.^. Lens' ListStreamsResponse Bool
listStreamsResponse_hasMoreStreams) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. Maybe a -> Bool
Prelude.isNothing
        ( AWSResponse ListStreams
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListStreamsResponse (Maybe Text)
listStreamsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListStreams
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListStreams (Maybe Text)
listStreams_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListStreams
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListStreamsResponse (Maybe Text)
listStreamsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListStreams where
  type AWSResponse ListStreams = ListStreamsResponse
  request :: (Service -> Service) -> ListStreams -> Request ListStreams
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListStreams
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListStreams)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [StreamSummary]
-> Int
-> [Text]
-> Bool
-> ListStreamsResponse
ListStreamsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"StreamSummaries"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"StreamNames" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"HasMoreStreams")
      )

instance Prelude.Hashable ListStreams where
  hashWithSalt :: Int -> ListStreams -> Int
hashWithSalt Int
_salt ListStreams' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
limit :: Maybe Natural
exclusiveStartStreamName :: Maybe Text
$sel:nextToken:ListStreams' :: ListStreams -> Maybe Text
$sel:limit:ListStreams' :: ListStreams -> Maybe Natural
$sel:exclusiveStartStreamName:ListStreams' :: ListStreams -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
exclusiveStartStreamName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
limit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData ListStreams where
  rnf :: ListStreams -> ()
rnf ListStreams' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
limit :: Maybe Natural
exclusiveStartStreamName :: Maybe Text
$sel:nextToken:ListStreams' :: ListStreams -> Maybe Text
$sel:limit:ListStreams' :: ListStreams -> Maybe Natural
$sel:exclusiveStartStreamName:ListStreams' :: ListStreams -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
exclusiveStartStreamName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
limit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance Data.ToHeaders ListStreams where
  toHeaders :: ListStreams -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"Kinesis_20131202.ListStreams" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListStreams where
  toJSON :: ListStreams -> Value
toJSON ListStreams' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
limit :: Maybe Natural
exclusiveStartStreamName :: Maybe Text
$sel:nextToken:ListStreams' :: ListStreams -> Maybe Text
$sel:limit:ListStreams' :: ListStreams -> Maybe Natural
$sel:exclusiveStartStreamName:ListStreams' :: ListStreams -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ExclusiveStartStreamName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
exclusiveStartStreamName,
            (Key
"Limit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken
          ]
      )

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

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

-- | Represents the output for @ListStreams@.
--
-- /See:/ 'newListStreamsResponse' smart constructor.
data ListStreamsResponse = ListStreamsResponse'
  { ListStreamsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    ListStreamsResponse -> Maybe [StreamSummary]
streamSummaries :: Prelude.Maybe [StreamSummary],
    -- | The response's http status code.
    ListStreamsResponse -> Int
httpStatus :: Prelude.Int,
    -- | The names of the streams that are associated with the Amazon Web
    -- Services 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
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]
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
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. 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:
--
-- 'nextToken', 'listStreamsResponse_nextToken' -
--
-- 'streamSummaries', 'listStreamsResponse_streamSummaries' -
--
-- 'httpStatus', 'listStreamsResponse_httpStatus' - The response's http status code.
--
-- 'streamNames', 'listStreamsResponse_streamNames' - The names of the streams that are associated with the Amazon Web
-- Services 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'
    { $sel:nextToken:ListStreamsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:streamSummaries:ListStreamsResponse' :: Maybe [StreamSummary]
streamSummaries = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListStreamsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:streamNames:ListStreamsResponse' :: [Text]
streamNames = forall a. Monoid a => a
Prelude.mempty,
      $sel:hasMoreStreams:ListStreamsResponse' :: Bool
hasMoreStreams = Bool
pHasMoreStreams_
    }

listStreamsResponse_nextToken :: Lens.Lens' ListStreamsResponse (Prelude.Maybe Prelude.Text)
listStreamsResponse_nextToken :: Lens' ListStreamsResponse (Maybe Text)
listStreamsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListStreamsResponse' :: ListStreamsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListStreamsResponse
s@ListStreamsResponse' {} Maybe Text
a -> ListStreamsResponse
s {$sel:nextToken:ListStreamsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListStreamsResponse)

listStreamsResponse_streamSummaries :: Lens.Lens' ListStreamsResponse (Prelude.Maybe [StreamSummary])
listStreamsResponse_streamSummaries :: Lens' ListStreamsResponse (Maybe [StreamSummary])
listStreamsResponse_streamSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStreamsResponse' {Maybe [StreamSummary]
streamSummaries :: Maybe [StreamSummary]
$sel:streamSummaries:ListStreamsResponse' :: ListStreamsResponse -> Maybe [StreamSummary]
streamSummaries} -> Maybe [StreamSummary]
streamSummaries) (\s :: ListStreamsResponse
s@ListStreamsResponse' {} Maybe [StreamSummary]
a -> ListStreamsResponse
s {$sel:streamSummaries:ListStreamsResponse' :: Maybe [StreamSummary]
streamSummaries = Maybe [StreamSummary]
a} :: ListStreamsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
listStreamsResponse_httpStatus :: Lens.Lens' ListStreamsResponse Prelude.Int
listStreamsResponse_httpStatus :: Lens' ListStreamsResponse Int
listStreamsResponse_httpStatus = 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 Amazon Web
-- Services account making the @ListStreams@ request.
listStreamsResponse_streamNames :: Lens.Lens' ListStreamsResponse [Prelude.Text]
listStreamsResponse_streamNames :: Lens' ListStreamsResponse [Text]
listStreamsResponse_streamNames = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 :: Lens' ListStreamsResponse Bool
listStreamsResponse_hasMoreStreams = 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 where
  rnf :: ListStreamsResponse -> ()
rnf ListStreamsResponse' {Bool
Int
[Text]
Maybe [StreamSummary]
Maybe Text
hasMoreStreams :: Bool
streamNames :: [Text]
httpStatus :: Int
streamSummaries :: Maybe [StreamSummary]
nextToken :: Maybe Text
$sel:hasMoreStreams:ListStreamsResponse' :: ListStreamsResponse -> Bool
$sel:streamNames:ListStreamsResponse' :: ListStreamsResponse -> [Text]
$sel:httpStatus:ListStreamsResponse' :: ListStreamsResponse -> Int
$sel:streamSummaries:ListStreamsResponse' :: ListStreamsResponse -> Maybe [StreamSummary]
$sel:nextToken:ListStreamsResponse' :: ListStreamsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [StreamSummary]
streamSummaries
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
streamNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
hasMoreStreams