{-# 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.Firehose.ListDeliveryStreams
-- 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 delivery streams in alphabetical order of their names.
--
-- The number of delivery streams might be too large to return using a
-- single call to @ListDeliveryStreams@. You can limit the number of
-- delivery streams returned, using the @Limit@ parameter. To determine
-- whether there are more delivery streams to list, check the value of
-- @HasMoreDeliveryStreams@ in the output. If there are more delivery
-- streams to list, you can request them by calling this operation again
-- and setting the @ExclusiveStartDeliveryStreamName@ parameter to the name
-- of the last delivery stream returned in the last call.
module Amazonka.Firehose.ListDeliveryStreams
  ( -- * Creating a Request
    ListDeliveryStreams (..),
    newListDeliveryStreams,

    -- * Request Lenses
    listDeliveryStreams_limit,
    listDeliveryStreams_deliveryStreamType,
    listDeliveryStreams_exclusiveStartDeliveryStreamName,

    -- * Destructuring the Response
    ListDeliveryStreamsResponse (..),
    newListDeliveryStreamsResponse,

    -- * Response Lenses
    listDeliveryStreamsResponse_httpStatus,
    listDeliveryStreamsResponse_deliveryStreamNames,
    listDeliveryStreamsResponse_hasMoreDeliveryStreams,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Firehose.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

-- | /See:/ 'newListDeliveryStreams' smart constructor.
data ListDeliveryStreams = ListDeliveryStreams'
  { -- | The maximum number of delivery streams to list. The default value is 10.
    ListDeliveryStreams -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The delivery stream type. This can be one of the following values:
    --
    -- -   @DirectPut@: Provider applications access the delivery stream
    --     directly.
    --
    -- -   @KinesisStreamAsSource@: The delivery stream uses a Kinesis data
    --     stream as a source.
    --
    -- This parameter is optional. If this parameter is omitted, delivery
    -- streams of all types are returned.
    ListDeliveryStreams -> Maybe DeliveryStreamType
deliveryStreamType :: Prelude.Maybe DeliveryStreamType,
    -- | The list of delivery streams returned by this call to
    -- @ListDeliveryStreams@ will start with the delivery stream whose name
    -- comes alphabetically immediately after the name you specify in
    -- @ExclusiveStartDeliveryStreamName@.
    ListDeliveryStreams -> Maybe Text
exclusiveStartDeliveryStreamName :: Prelude.Maybe Prelude.Text
  }
  deriving (ListDeliveryStreams -> ListDeliveryStreams -> Bool
(ListDeliveryStreams -> ListDeliveryStreams -> Bool)
-> (ListDeliveryStreams -> ListDeliveryStreams -> Bool)
-> Eq ListDeliveryStreams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDeliveryStreams -> ListDeliveryStreams -> Bool
$c/= :: ListDeliveryStreams -> ListDeliveryStreams -> Bool
== :: ListDeliveryStreams -> ListDeliveryStreams -> Bool
$c== :: ListDeliveryStreams -> ListDeliveryStreams -> Bool
Prelude.Eq, ReadPrec [ListDeliveryStreams]
ReadPrec ListDeliveryStreams
Int -> ReadS ListDeliveryStreams
ReadS [ListDeliveryStreams]
(Int -> ReadS ListDeliveryStreams)
-> ReadS [ListDeliveryStreams]
-> ReadPrec ListDeliveryStreams
-> ReadPrec [ListDeliveryStreams]
-> Read ListDeliveryStreams
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDeliveryStreams]
$creadListPrec :: ReadPrec [ListDeliveryStreams]
readPrec :: ReadPrec ListDeliveryStreams
$creadPrec :: ReadPrec ListDeliveryStreams
readList :: ReadS [ListDeliveryStreams]
$creadList :: ReadS [ListDeliveryStreams]
readsPrec :: Int -> ReadS ListDeliveryStreams
$creadsPrec :: Int -> ReadS ListDeliveryStreams
Prelude.Read, Int -> ListDeliveryStreams -> ShowS
[ListDeliveryStreams] -> ShowS
ListDeliveryStreams -> String
(Int -> ListDeliveryStreams -> ShowS)
-> (ListDeliveryStreams -> String)
-> ([ListDeliveryStreams] -> ShowS)
-> Show ListDeliveryStreams
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDeliveryStreams] -> ShowS
$cshowList :: [ListDeliveryStreams] -> ShowS
show :: ListDeliveryStreams -> String
$cshow :: ListDeliveryStreams -> String
showsPrec :: Int -> ListDeliveryStreams -> ShowS
$cshowsPrec :: Int -> ListDeliveryStreams -> ShowS
Prelude.Show, (forall x. ListDeliveryStreams -> Rep ListDeliveryStreams x)
-> (forall x. Rep ListDeliveryStreams x -> ListDeliveryStreams)
-> Generic ListDeliveryStreams
forall x. Rep ListDeliveryStreams x -> ListDeliveryStreams
forall x. ListDeliveryStreams -> Rep ListDeliveryStreams x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDeliveryStreams x -> ListDeliveryStreams
$cfrom :: forall x. ListDeliveryStreams -> Rep ListDeliveryStreams x
Prelude.Generic)

-- |
-- Create a value of 'ListDeliveryStreams' 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', 'listDeliveryStreams_limit' - The maximum number of delivery streams to list. The default value is 10.
--
-- 'deliveryStreamType', 'listDeliveryStreams_deliveryStreamType' - The delivery stream type. This can be one of the following values:
--
-- -   @DirectPut@: Provider applications access the delivery stream
--     directly.
--
-- -   @KinesisStreamAsSource@: The delivery stream uses a Kinesis data
--     stream as a source.
--
-- This parameter is optional. If this parameter is omitted, delivery
-- streams of all types are returned.
--
-- 'exclusiveStartDeliveryStreamName', 'listDeliveryStreams_exclusiveStartDeliveryStreamName' - The list of delivery streams returned by this call to
-- @ListDeliveryStreams@ will start with the delivery stream whose name
-- comes alphabetically immediately after the name you specify in
-- @ExclusiveStartDeliveryStreamName@.
newListDeliveryStreams ::
  ListDeliveryStreams
newListDeliveryStreams :: ListDeliveryStreams
newListDeliveryStreams =
  ListDeliveryStreams' :: Maybe Natural
-> Maybe DeliveryStreamType -> Maybe Text -> ListDeliveryStreams
ListDeliveryStreams'
    { $sel:limit:ListDeliveryStreams' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:deliveryStreamType:ListDeliveryStreams' :: Maybe DeliveryStreamType
deliveryStreamType = Maybe DeliveryStreamType
forall a. Maybe a
Prelude.Nothing,
      $sel:exclusiveStartDeliveryStreamName:ListDeliveryStreams' :: Maybe Text
exclusiveStartDeliveryStreamName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of delivery streams to list. The default value is 10.
listDeliveryStreams_limit :: Lens.Lens' ListDeliveryStreams (Prelude.Maybe Prelude.Natural)
listDeliveryStreams_limit :: (Maybe Natural -> f (Maybe Natural))
-> ListDeliveryStreams -> f ListDeliveryStreams
listDeliveryStreams_limit = (ListDeliveryStreams -> Maybe Natural)
-> (ListDeliveryStreams -> Maybe Natural -> ListDeliveryStreams)
-> Lens
     ListDeliveryStreams
     ListDeliveryStreams
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeliveryStreams' {Maybe Natural
limit :: Maybe Natural
$sel:limit:ListDeliveryStreams' :: ListDeliveryStreams -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: ListDeliveryStreams
s@ListDeliveryStreams' {} Maybe Natural
a -> ListDeliveryStreams
s {$sel:limit:ListDeliveryStreams' :: Maybe Natural
limit = Maybe Natural
a} :: ListDeliveryStreams)

-- | The delivery stream type. This can be one of the following values:
--
-- -   @DirectPut@: Provider applications access the delivery stream
--     directly.
--
-- -   @KinesisStreamAsSource@: The delivery stream uses a Kinesis data
--     stream as a source.
--
-- This parameter is optional. If this parameter is omitted, delivery
-- streams of all types are returned.
listDeliveryStreams_deliveryStreamType :: Lens.Lens' ListDeliveryStreams (Prelude.Maybe DeliveryStreamType)
listDeliveryStreams_deliveryStreamType :: (Maybe DeliveryStreamType -> f (Maybe DeliveryStreamType))
-> ListDeliveryStreams -> f ListDeliveryStreams
listDeliveryStreams_deliveryStreamType = (ListDeliveryStreams -> Maybe DeliveryStreamType)
-> (ListDeliveryStreams
    -> Maybe DeliveryStreamType -> ListDeliveryStreams)
-> Lens
     ListDeliveryStreams
     ListDeliveryStreams
     (Maybe DeliveryStreamType)
     (Maybe DeliveryStreamType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeliveryStreams' {Maybe DeliveryStreamType
deliveryStreamType :: Maybe DeliveryStreamType
$sel:deliveryStreamType:ListDeliveryStreams' :: ListDeliveryStreams -> Maybe DeliveryStreamType
deliveryStreamType} -> Maybe DeliveryStreamType
deliveryStreamType) (\s :: ListDeliveryStreams
s@ListDeliveryStreams' {} Maybe DeliveryStreamType
a -> ListDeliveryStreams
s {$sel:deliveryStreamType:ListDeliveryStreams' :: Maybe DeliveryStreamType
deliveryStreamType = Maybe DeliveryStreamType
a} :: ListDeliveryStreams)

-- | The list of delivery streams returned by this call to
-- @ListDeliveryStreams@ will start with the delivery stream whose name
-- comes alphabetically immediately after the name you specify in
-- @ExclusiveStartDeliveryStreamName@.
listDeliveryStreams_exclusiveStartDeliveryStreamName :: Lens.Lens' ListDeliveryStreams (Prelude.Maybe Prelude.Text)
listDeliveryStreams_exclusiveStartDeliveryStreamName :: (Maybe Text -> f (Maybe Text))
-> ListDeliveryStreams -> f ListDeliveryStreams
listDeliveryStreams_exclusiveStartDeliveryStreamName = (ListDeliveryStreams -> Maybe Text)
-> (ListDeliveryStreams -> Maybe Text -> ListDeliveryStreams)
-> Lens
     ListDeliveryStreams ListDeliveryStreams (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeliveryStreams' {Maybe Text
exclusiveStartDeliveryStreamName :: Maybe Text
$sel:exclusiveStartDeliveryStreamName:ListDeliveryStreams' :: ListDeliveryStreams -> Maybe Text
exclusiveStartDeliveryStreamName} -> Maybe Text
exclusiveStartDeliveryStreamName) (\s :: ListDeliveryStreams
s@ListDeliveryStreams' {} Maybe Text
a -> ListDeliveryStreams
s {$sel:exclusiveStartDeliveryStreamName:ListDeliveryStreams' :: Maybe Text
exclusiveStartDeliveryStreamName = Maybe Text
a} :: ListDeliveryStreams)

instance Core.AWSRequest ListDeliveryStreams where
  type
    AWSResponse ListDeliveryStreams =
      ListDeliveryStreamsResponse
  request :: ListDeliveryStreams -> Request ListDeliveryStreams
request = Service -> ListDeliveryStreams -> Request ListDeliveryStreams
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListDeliveryStreams
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDeliveryStreams)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListDeliveryStreams))
-> Logger
-> Service
-> Proxy ListDeliveryStreams
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDeliveryStreams)))
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 -> ListDeliveryStreamsResponse
ListDeliveryStreamsResponse'
            (Int -> [Text] -> Bool -> ListDeliveryStreamsResponse)
-> Either String Int
-> Either String ([Text] -> Bool -> ListDeliveryStreamsResponse)
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 -> ListDeliveryStreamsResponse)
-> Either String [Text]
-> Either String (Bool -> ListDeliveryStreamsResponse)
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
"DeliveryStreamNames"
                            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 -> ListDeliveryStreamsResponse)
-> Either String Bool -> Either String ListDeliveryStreamsResponse
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
"HasMoreDeliveryStreams")
      )

instance Prelude.Hashable ListDeliveryStreams

instance Prelude.NFData ListDeliveryStreams

instance Core.ToHeaders ListDeliveryStreams where
  toHeaders :: ListDeliveryStreams -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListDeliveryStreams -> 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
"Firehose_20150804.ListDeliveryStreams" ::
                          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 ListDeliveryStreams where
  toJSON :: ListDeliveryStreams -> Value
toJSON ListDeliveryStreams' {Maybe Natural
Maybe Text
Maybe DeliveryStreamType
exclusiveStartDeliveryStreamName :: Maybe Text
deliveryStreamType :: Maybe DeliveryStreamType
limit :: Maybe Natural
$sel:exclusiveStartDeliveryStreamName:ListDeliveryStreams' :: ListDeliveryStreams -> Maybe Text
$sel:deliveryStreamType:ListDeliveryStreams' :: ListDeliveryStreams -> Maybe DeliveryStreamType
$sel:limit:ListDeliveryStreams' :: ListDeliveryStreams -> 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
"DeliveryStreamType" Text -> DeliveryStreamType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DeliveryStreamType -> Pair)
-> Maybe DeliveryStreamType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeliveryStreamType
deliveryStreamType,
            (Text
"ExclusiveStartDeliveryStreamName" 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
exclusiveStartDeliveryStreamName
          ]
      )

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

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

-- | /See:/ 'newListDeliveryStreamsResponse' smart constructor.
data ListDeliveryStreamsResponse = ListDeliveryStreamsResponse'
  { -- | The response's http status code.
    ListDeliveryStreamsResponse -> Int
httpStatus :: Prelude.Int,
    -- | The names of the delivery streams.
    ListDeliveryStreamsResponse -> [Text]
deliveryStreamNames :: [Prelude.Text],
    -- | Indicates whether there are more delivery streams available to list.
    ListDeliveryStreamsResponse -> Bool
hasMoreDeliveryStreams :: Prelude.Bool
  }
  deriving (ListDeliveryStreamsResponse -> ListDeliveryStreamsResponse -> Bool
(ListDeliveryStreamsResponse
 -> ListDeliveryStreamsResponse -> Bool)
-> (ListDeliveryStreamsResponse
    -> ListDeliveryStreamsResponse -> Bool)
-> Eq ListDeliveryStreamsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDeliveryStreamsResponse -> ListDeliveryStreamsResponse -> Bool
$c/= :: ListDeliveryStreamsResponse -> ListDeliveryStreamsResponse -> Bool
== :: ListDeliveryStreamsResponse -> ListDeliveryStreamsResponse -> Bool
$c== :: ListDeliveryStreamsResponse -> ListDeliveryStreamsResponse -> Bool
Prelude.Eq, ReadPrec [ListDeliveryStreamsResponse]
ReadPrec ListDeliveryStreamsResponse
Int -> ReadS ListDeliveryStreamsResponse
ReadS [ListDeliveryStreamsResponse]
(Int -> ReadS ListDeliveryStreamsResponse)
-> ReadS [ListDeliveryStreamsResponse]
-> ReadPrec ListDeliveryStreamsResponse
-> ReadPrec [ListDeliveryStreamsResponse]
-> Read ListDeliveryStreamsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDeliveryStreamsResponse]
$creadListPrec :: ReadPrec [ListDeliveryStreamsResponse]
readPrec :: ReadPrec ListDeliveryStreamsResponse
$creadPrec :: ReadPrec ListDeliveryStreamsResponse
readList :: ReadS [ListDeliveryStreamsResponse]
$creadList :: ReadS [ListDeliveryStreamsResponse]
readsPrec :: Int -> ReadS ListDeliveryStreamsResponse
$creadsPrec :: Int -> ReadS ListDeliveryStreamsResponse
Prelude.Read, Int -> ListDeliveryStreamsResponse -> ShowS
[ListDeliveryStreamsResponse] -> ShowS
ListDeliveryStreamsResponse -> String
(Int -> ListDeliveryStreamsResponse -> ShowS)
-> (ListDeliveryStreamsResponse -> String)
-> ([ListDeliveryStreamsResponse] -> ShowS)
-> Show ListDeliveryStreamsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDeliveryStreamsResponse] -> ShowS
$cshowList :: [ListDeliveryStreamsResponse] -> ShowS
show :: ListDeliveryStreamsResponse -> String
$cshow :: ListDeliveryStreamsResponse -> String
showsPrec :: Int -> ListDeliveryStreamsResponse -> ShowS
$cshowsPrec :: Int -> ListDeliveryStreamsResponse -> ShowS
Prelude.Show, (forall x.
 ListDeliveryStreamsResponse -> Rep ListDeliveryStreamsResponse x)
-> (forall x.
    Rep ListDeliveryStreamsResponse x -> ListDeliveryStreamsResponse)
-> Generic ListDeliveryStreamsResponse
forall x.
Rep ListDeliveryStreamsResponse x -> ListDeliveryStreamsResponse
forall x.
ListDeliveryStreamsResponse -> Rep ListDeliveryStreamsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDeliveryStreamsResponse x -> ListDeliveryStreamsResponse
$cfrom :: forall x.
ListDeliveryStreamsResponse -> Rep ListDeliveryStreamsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDeliveryStreamsResponse' 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', 'listDeliveryStreamsResponse_httpStatus' - The response's http status code.
--
-- 'deliveryStreamNames', 'listDeliveryStreamsResponse_deliveryStreamNames' - The names of the delivery streams.
--
-- 'hasMoreDeliveryStreams', 'listDeliveryStreamsResponse_hasMoreDeliveryStreams' - Indicates whether there are more delivery streams available to list.
newListDeliveryStreamsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'hasMoreDeliveryStreams'
  Prelude.Bool ->
  ListDeliveryStreamsResponse
newListDeliveryStreamsResponse :: Int -> Bool -> ListDeliveryStreamsResponse
newListDeliveryStreamsResponse
  Int
pHttpStatus_
  Bool
pHasMoreDeliveryStreams_ =
    ListDeliveryStreamsResponse' :: Int -> [Text] -> Bool -> ListDeliveryStreamsResponse
ListDeliveryStreamsResponse'
      { $sel:httpStatus:ListDeliveryStreamsResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:deliveryStreamNames:ListDeliveryStreamsResponse' :: [Text]
deliveryStreamNames = [Text]
forall a. Monoid a => a
Prelude.mempty,
        $sel:hasMoreDeliveryStreams:ListDeliveryStreamsResponse' :: Bool
hasMoreDeliveryStreams =
          Bool
pHasMoreDeliveryStreams_
      }

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

-- | The names of the delivery streams.
listDeliveryStreamsResponse_deliveryStreamNames :: Lens.Lens' ListDeliveryStreamsResponse [Prelude.Text]
listDeliveryStreamsResponse_deliveryStreamNames :: ([Text] -> f [Text])
-> ListDeliveryStreamsResponse -> f ListDeliveryStreamsResponse
listDeliveryStreamsResponse_deliveryStreamNames = (ListDeliveryStreamsResponse -> [Text])
-> (ListDeliveryStreamsResponse
    -> [Text] -> ListDeliveryStreamsResponse)
-> Lens
     ListDeliveryStreamsResponse
     ListDeliveryStreamsResponse
     [Text]
     [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeliveryStreamsResponse' {[Text]
deliveryStreamNames :: [Text]
$sel:deliveryStreamNames:ListDeliveryStreamsResponse' :: ListDeliveryStreamsResponse -> [Text]
deliveryStreamNames} -> [Text]
deliveryStreamNames) (\s :: ListDeliveryStreamsResponse
s@ListDeliveryStreamsResponse' {} [Text]
a -> ListDeliveryStreamsResponse
s {$sel:deliveryStreamNames:ListDeliveryStreamsResponse' :: [Text]
deliveryStreamNames = [Text]
a} :: ListDeliveryStreamsResponse) (([Text] -> f [Text])
 -> ListDeliveryStreamsResponse -> f ListDeliveryStreamsResponse)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ListDeliveryStreamsResponse
-> f ListDeliveryStreamsResponse
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

-- | Indicates whether there are more delivery streams available to list.
listDeliveryStreamsResponse_hasMoreDeliveryStreams :: Lens.Lens' ListDeliveryStreamsResponse Prelude.Bool
listDeliveryStreamsResponse_hasMoreDeliveryStreams :: (Bool -> f Bool)
-> ListDeliveryStreamsResponse -> f ListDeliveryStreamsResponse
listDeliveryStreamsResponse_hasMoreDeliveryStreams = (ListDeliveryStreamsResponse -> Bool)
-> (ListDeliveryStreamsResponse
    -> Bool -> ListDeliveryStreamsResponse)
-> Lens
     ListDeliveryStreamsResponse ListDeliveryStreamsResponse Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDeliveryStreamsResponse' {Bool
hasMoreDeliveryStreams :: Bool
$sel:hasMoreDeliveryStreams:ListDeliveryStreamsResponse' :: ListDeliveryStreamsResponse -> Bool
hasMoreDeliveryStreams} -> Bool
hasMoreDeliveryStreams) (\s :: ListDeliveryStreamsResponse
s@ListDeliveryStreamsResponse' {} Bool
a -> ListDeliveryStreamsResponse
s {$sel:hasMoreDeliveryStreams:ListDeliveryStreamsResponse' :: Bool
hasMoreDeliveryStreams = Bool
a} :: ListDeliveryStreamsResponse)

instance Prelude.NFData ListDeliveryStreamsResponse