{-# 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.Greengrass.ListBulkDeployments
-- 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)
--
-- Returns a list of bulk deployments.
--
-- This operation returns paginated results.
module Amazonka.Greengrass.ListBulkDeployments
  ( -- * Creating a Request
    ListBulkDeployments (..),
    newListBulkDeployments,

    -- * Request Lenses
    listBulkDeployments_nextToken,
    listBulkDeployments_maxResults,

    -- * Destructuring the Response
    ListBulkDeploymentsResponse (..),
    newListBulkDeploymentsResponse,

    -- * Response Lenses
    listBulkDeploymentsResponse_nextToken,
    listBulkDeploymentsResponse_bulkDeployments,
    listBulkDeploymentsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Greengrass.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:/ 'newListBulkDeployments' smart constructor.
data ListBulkDeployments = ListBulkDeployments'
  { -- | The token for the next set of results, or \'\'null\'\' if there are no
    -- additional results.
    ListBulkDeployments -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to be returned per request.
    ListBulkDeployments -> Maybe Text
maxResults :: Prelude.Maybe Prelude.Text
  }
  deriving (ListBulkDeployments -> ListBulkDeployments -> Bool
(ListBulkDeployments -> ListBulkDeployments -> Bool)
-> (ListBulkDeployments -> ListBulkDeployments -> Bool)
-> Eq ListBulkDeployments
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBulkDeployments -> ListBulkDeployments -> Bool
$c/= :: ListBulkDeployments -> ListBulkDeployments -> Bool
== :: ListBulkDeployments -> ListBulkDeployments -> Bool
$c== :: ListBulkDeployments -> ListBulkDeployments -> Bool
Prelude.Eq, ReadPrec [ListBulkDeployments]
ReadPrec ListBulkDeployments
Int -> ReadS ListBulkDeployments
ReadS [ListBulkDeployments]
(Int -> ReadS ListBulkDeployments)
-> ReadS [ListBulkDeployments]
-> ReadPrec ListBulkDeployments
-> ReadPrec [ListBulkDeployments]
-> Read ListBulkDeployments
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBulkDeployments]
$creadListPrec :: ReadPrec [ListBulkDeployments]
readPrec :: ReadPrec ListBulkDeployments
$creadPrec :: ReadPrec ListBulkDeployments
readList :: ReadS [ListBulkDeployments]
$creadList :: ReadS [ListBulkDeployments]
readsPrec :: Int -> ReadS ListBulkDeployments
$creadsPrec :: Int -> ReadS ListBulkDeployments
Prelude.Read, Int -> ListBulkDeployments -> ShowS
[ListBulkDeployments] -> ShowS
ListBulkDeployments -> String
(Int -> ListBulkDeployments -> ShowS)
-> (ListBulkDeployments -> String)
-> ([ListBulkDeployments] -> ShowS)
-> Show ListBulkDeployments
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBulkDeployments] -> ShowS
$cshowList :: [ListBulkDeployments] -> ShowS
show :: ListBulkDeployments -> String
$cshow :: ListBulkDeployments -> String
showsPrec :: Int -> ListBulkDeployments -> ShowS
$cshowsPrec :: Int -> ListBulkDeployments -> ShowS
Prelude.Show, (forall x. ListBulkDeployments -> Rep ListBulkDeployments x)
-> (forall x. Rep ListBulkDeployments x -> ListBulkDeployments)
-> Generic ListBulkDeployments
forall x. Rep ListBulkDeployments x -> ListBulkDeployments
forall x. ListBulkDeployments -> Rep ListBulkDeployments x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBulkDeployments x -> ListBulkDeployments
$cfrom :: forall x. ListBulkDeployments -> Rep ListBulkDeployments x
Prelude.Generic)

-- |
-- Create a value of 'ListBulkDeployments' 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', 'listBulkDeployments_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'maxResults', 'listBulkDeployments_maxResults' - The maximum number of results to be returned per request.
newListBulkDeployments ::
  ListBulkDeployments
newListBulkDeployments :: ListBulkDeployments
newListBulkDeployments =
  ListBulkDeployments' :: Maybe Text -> Maybe Text -> ListBulkDeployments
ListBulkDeployments'
    { $sel:nextToken:ListBulkDeployments' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListBulkDeployments' :: Maybe Text
maxResults = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
listBulkDeployments_nextToken :: Lens.Lens' ListBulkDeployments (Prelude.Maybe Prelude.Text)
listBulkDeployments_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListBulkDeployments -> f ListBulkDeployments
listBulkDeployments_nextToken = (ListBulkDeployments -> Maybe Text)
-> (ListBulkDeployments -> Maybe Text -> ListBulkDeployments)
-> Lens
     ListBulkDeployments ListBulkDeployments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBulkDeployments' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListBulkDeployments' :: ListBulkDeployments -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListBulkDeployments
s@ListBulkDeployments' {} Maybe Text
a -> ListBulkDeployments
s {$sel:nextToken:ListBulkDeployments' :: Maybe Text
nextToken = Maybe Text
a} :: ListBulkDeployments)

-- | The maximum number of results to be returned per request.
listBulkDeployments_maxResults :: Lens.Lens' ListBulkDeployments (Prelude.Maybe Prelude.Text)
listBulkDeployments_maxResults :: (Maybe Text -> f (Maybe Text))
-> ListBulkDeployments -> f ListBulkDeployments
listBulkDeployments_maxResults = (ListBulkDeployments -> Maybe Text)
-> (ListBulkDeployments -> Maybe Text -> ListBulkDeployments)
-> Lens
     ListBulkDeployments ListBulkDeployments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBulkDeployments' {Maybe Text
maxResults :: Maybe Text
$sel:maxResults:ListBulkDeployments' :: ListBulkDeployments -> Maybe Text
maxResults} -> Maybe Text
maxResults) (\s :: ListBulkDeployments
s@ListBulkDeployments' {} Maybe Text
a -> ListBulkDeployments
s {$sel:maxResults:ListBulkDeployments' :: Maybe Text
maxResults = Maybe Text
a} :: ListBulkDeployments)

instance Core.AWSPager ListBulkDeployments where
  page :: ListBulkDeployments
-> AWSResponse ListBulkDeployments -> Maybe ListBulkDeployments
page ListBulkDeployments
rq AWSResponse ListBulkDeployments
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListBulkDeployments
ListBulkDeploymentsResponse
rs
            ListBulkDeploymentsResponse
-> Getting (First Text) ListBulkDeploymentsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListBulkDeploymentsResponse
-> Const (First Text) ListBulkDeploymentsResponse
Lens' ListBulkDeploymentsResponse (Maybe Text)
listBulkDeploymentsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListBulkDeploymentsResponse
 -> Const (First Text) ListBulkDeploymentsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListBulkDeploymentsResponse 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 ListBulkDeployments
forall a. Maybe a
Prelude.Nothing
    | Maybe [BulkDeployment] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListBulkDeployments
ListBulkDeploymentsResponse
rs
            ListBulkDeploymentsResponse
-> Getting
     (First [BulkDeployment])
     ListBulkDeploymentsResponse
     [BulkDeployment]
-> Maybe [BulkDeployment]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [BulkDeployment]
 -> Const (First [BulkDeployment]) (Maybe [BulkDeployment]))
-> ListBulkDeploymentsResponse
-> Const (First [BulkDeployment]) ListBulkDeploymentsResponse
Lens' ListBulkDeploymentsResponse (Maybe [BulkDeployment])
listBulkDeploymentsResponse_bulkDeployments
              ((Maybe [BulkDeployment]
  -> Const (First [BulkDeployment]) (Maybe [BulkDeployment]))
 -> ListBulkDeploymentsResponse
 -> Const (First [BulkDeployment]) ListBulkDeploymentsResponse)
-> (([BulkDeployment]
     -> Const (First [BulkDeployment]) [BulkDeployment])
    -> Maybe [BulkDeployment]
    -> Const (First [BulkDeployment]) (Maybe [BulkDeployment]))
-> Getting
     (First [BulkDeployment])
     ListBulkDeploymentsResponse
     [BulkDeployment]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([BulkDeployment]
 -> Const (First [BulkDeployment]) [BulkDeployment])
-> Maybe [BulkDeployment]
-> Const (First [BulkDeployment]) (Maybe [BulkDeployment])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListBulkDeployments
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListBulkDeployments -> Maybe ListBulkDeployments
forall a. a -> Maybe a
Prelude.Just (ListBulkDeployments -> Maybe ListBulkDeployments)
-> ListBulkDeployments -> Maybe ListBulkDeployments
forall a b. (a -> b) -> a -> b
Prelude.$
        ListBulkDeployments
rq
          ListBulkDeployments
-> (ListBulkDeployments -> ListBulkDeployments)
-> ListBulkDeployments
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListBulkDeployments -> Identity ListBulkDeployments
Lens
  ListBulkDeployments ListBulkDeployments (Maybe Text) (Maybe Text)
listBulkDeployments_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListBulkDeployments -> Identity ListBulkDeployments)
-> Maybe Text -> ListBulkDeployments -> ListBulkDeployments
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListBulkDeployments
ListBulkDeploymentsResponse
rs
          ListBulkDeploymentsResponse
-> Getting (First Text) ListBulkDeploymentsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListBulkDeploymentsResponse
-> Const (First Text) ListBulkDeploymentsResponse
Lens' ListBulkDeploymentsResponse (Maybe Text)
listBulkDeploymentsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListBulkDeploymentsResponse
 -> Const (First Text) ListBulkDeploymentsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListBulkDeploymentsResponse 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 ListBulkDeployments where
  type
    AWSResponse ListBulkDeployments =
      ListBulkDeploymentsResponse
  request :: ListBulkDeployments -> Request ListBulkDeployments
request = Service -> ListBulkDeployments -> Request ListBulkDeployments
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListBulkDeployments
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListBulkDeployments)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListBulkDeployments))
-> Logger
-> Service
-> Proxy ListBulkDeployments
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListBulkDeployments)))
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 [BulkDeployment] -> Int -> ListBulkDeploymentsResponse
ListBulkDeploymentsResponse'
            (Maybe Text
 -> Maybe [BulkDeployment] -> Int -> ListBulkDeploymentsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [BulkDeployment] -> Int -> ListBulkDeploymentsResponse)
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 [BulkDeployment] -> Int -> ListBulkDeploymentsResponse)
-> Either String (Maybe [BulkDeployment])
-> Either String (Int -> ListBulkDeploymentsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [BulkDeployment]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"BulkDeployments"
                            Either String (Maybe (Maybe [BulkDeployment]))
-> Maybe [BulkDeployment] -> Either String (Maybe [BulkDeployment])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [BulkDeployment]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListBulkDeploymentsResponse)
-> Either String Int -> Either String ListBulkDeploymentsResponse
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 ListBulkDeployments

instance Prelude.NFData ListBulkDeployments

instance Core.ToHeaders ListBulkDeployments where
  toHeaders :: ListBulkDeployments -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListBulkDeployments -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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.ToPath ListBulkDeployments where
  toPath :: ListBulkDeployments -> ByteString
toPath = ByteString -> ListBulkDeployments -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/greengrass/bulk/deployments"

instance Core.ToQuery ListBulkDeployments where
  toQuery :: ListBulkDeployments -> QueryString
toQuery ListBulkDeployments' {Maybe Text
maxResults :: Maybe Text
nextToken :: Maybe Text
$sel:maxResults:ListBulkDeployments' :: ListBulkDeployments -> Maybe Text
$sel:nextToken:ListBulkDeployments' :: ListBulkDeployments -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"MaxResults" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
maxResults
      ]

-- | /See:/ 'newListBulkDeploymentsResponse' smart constructor.
data ListBulkDeploymentsResponse = ListBulkDeploymentsResponse'
  { -- | The token for the next set of results, or \'\'null\'\' if there are no
    -- additional results.
    ListBulkDeploymentsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of bulk deployments.
    ListBulkDeploymentsResponse -> Maybe [BulkDeployment]
bulkDeployments :: Prelude.Maybe [BulkDeployment],
    -- | The response's http status code.
    ListBulkDeploymentsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListBulkDeploymentsResponse -> ListBulkDeploymentsResponse -> Bool
(ListBulkDeploymentsResponse
 -> ListBulkDeploymentsResponse -> Bool)
-> (ListBulkDeploymentsResponse
    -> ListBulkDeploymentsResponse -> Bool)
-> Eq ListBulkDeploymentsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBulkDeploymentsResponse -> ListBulkDeploymentsResponse -> Bool
$c/= :: ListBulkDeploymentsResponse -> ListBulkDeploymentsResponse -> Bool
== :: ListBulkDeploymentsResponse -> ListBulkDeploymentsResponse -> Bool
$c== :: ListBulkDeploymentsResponse -> ListBulkDeploymentsResponse -> Bool
Prelude.Eq, ReadPrec [ListBulkDeploymentsResponse]
ReadPrec ListBulkDeploymentsResponse
Int -> ReadS ListBulkDeploymentsResponse
ReadS [ListBulkDeploymentsResponse]
(Int -> ReadS ListBulkDeploymentsResponse)
-> ReadS [ListBulkDeploymentsResponse]
-> ReadPrec ListBulkDeploymentsResponse
-> ReadPrec [ListBulkDeploymentsResponse]
-> Read ListBulkDeploymentsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBulkDeploymentsResponse]
$creadListPrec :: ReadPrec [ListBulkDeploymentsResponse]
readPrec :: ReadPrec ListBulkDeploymentsResponse
$creadPrec :: ReadPrec ListBulkDeploymentsResponse
readList :: ReadS [ListBulkDeploymentsResponse]
$creadList :: ReadS [ListBulkDeploymentsResponse]
readsPrec :: Int -> ReadS ListBulkDeploymentsResponse
$creadsPrec :: Int -> ReadS ListBulkDeploymentsResponse
Prelude.Read, Int -> ListBulkDeploymentsResponse -> ShowS
[ListBulkDeploymentsResponse] -> ShowS
ListBulkDeploymentsResponse -> String
(Int -> ListBulkDeploymentsResponse -> ShowS)
-> (ListBulkDeploymentsResponse -> String)
-> ([ListBulkDeploymentsResponse] -> ShowS)
-> Show ListBulkDeploymentsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBulkDeploymentsResponse] -> ShowS
$cshowList :: [ListBulkDeploymentsResponse] -> ShowS
show :: ListBulkDeploymentsResponse -> String
$cshow :: ListBulkDeploymentsResponse -> String
showsPrec :: Int -> ListBulkDeploymentsResponse -> ShowS
$cshowsPrec :: Int -> ListBulkDeploymentsResponse -> ShowS
Prelude.Show, (forall x.
 ListBulkDeploymentsResponse -> Rep ListBulkDeploymentsResponse x)
-> (forall x.
    Rep ListBulkDeploymentsResponse x -> ListBulkDeploymentsResponse)
-> Generic ListBulkDeploymentsResponse
forall x.
Rep ListBulkDeploymentsResponse x -> ListBulkDeploymentsResponse
forall x.
ListBulkDeploymentsResponse -> Rep ListBulkDeploymentsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListBulkDeploymentsResponse x -> ListBulkDeploymentsResponse
$cfrom :: forall x.
ListBulkDeploymentsResponse -> Rep ListBulkDeploymentsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListBulkDeploymentsResponse' 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', 'listBulkDeploymentsResponse_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'bulkDeployments', 'listBulkDeploymentsResponse_bulkDeployments' - A list of bulk deployments.
--
-- 'httpStatus', 'listBulkDeploymentsResponse_httpStatus' - The response's http status code.
newListBulkDeploymentsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListBulkDeploymentsResponse
newListBulkDeploymentsResponse :: Int -> ListBulkDeploymentsResponse
newListBulkDeploymentsResponse Int
pHttpStatus_ =
  ListBulkDeploymentsResponse' :: Maybe Text
-> Maybe [BulkDeployment] -> Int -> ListBulkDeploymentsResponse
ListBulkDeploymentsResponse'
    { $sel:nextToken:ListBulkDeploymentsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bulkDeployments:ListBulkDeploymentsResponse' :: Maybe [BulkDeployment]
bulkDeployments = Maybe [BulkDeployment]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListBulkDeploymentsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
listBulkDeploymentsResponse_nextToken :: Lens.Lens' ListBulkDeploymentsResponse (Prelude.Maybe Prelude.Text)
listBulkDeploymentsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListBulkDeploymentsResponse -> f ListBulkDeploymentsResponse
listBulkDeploymentsResponse_nextToken = (ListBulkDeploymentsResponse -> Maybe Text)
-> (ListBulkDeploymentsResponse
    -> Maybe Text -> ListBulkDeploymentsResponse)
-> Lens' ListBulkDeploymentsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBulkDeploymentsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListBulkDeploymentsResponse' :: ListBulkDeploymentsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListBulkDeploymentsResponse
s@ListBulkDeploymentsResponse' {} Maybe Text
a -> ListBulkDeploymentsResponse
s {$sel:nextToken:ListBulkDeploymentsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListBulkDeploymentsResponse)

-- | A list of bulk deployments.
listBulkDeploymentsResponse_bulkDeployments :: Lens.Lens' ListBulkDeploymentsResponse (Prelude.Maybe [BulkDeployment])
listBulkDeploymentsResponse_bulkDeployments :: (Maybe [BulkDeployment] -> f (Maybe [BulkDeployment]))
-> ListBulkDeploymentsResponse -> f ListBulkDeploymentsResponse
listBulkDeploymentsResponse_bulkDeployments = (ListBulkDeploymentsResponse -> Maybe [BulkDeployment])
-> (ListBulkDeploymentsResponse
    -> Maybe [BulkDeployment] -> ListBulkDeploymentsResponse)
-> Lens' ListBulkDeploymentsResponse (Maybe [BulkDeployment])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBulkDeploymentsResponse' {Maybe [BulkDeployment]
bulkDeployments :: Maybe [BulkDeployment]
$sel:bulkDeployments:ListBulkDeploymentsResponse' :: ListBulkDeploymentsResponse -> Maybe [BulkDeployment]
bulkDeployments} -> Maybe [BulkDeployment]
bulkDeployments) (\s :: ListBulkDeploymentsResponse
s@ListBulkDeploymentsResponse' {} Maybe [BulkDeployment]
a -> ListBulkDeploymentsResponse
s {$sel:bulkDeployments:ListBulkDeploymentsResponse' :: Maybe [BulkDeployment]
bulkDeployments = Maybe [BulkDeployment]
a} :: ListBulkDeploymentsResponse) ((Maybe [BulkDeployment] -> f (Maybe [BulkDeployment]))
 -> ListBulkDeploymentsResponse -> f ListBulkDeploymentsResponse)
-> ((Maybe [BulkDeployment] -> f (Maybe [BulkDeployment]))
    -> Maybe [BulkDeployment] -> f (Maybe [BulkDeployment]))
-> (Maybe [BulkDeployment] -> f (Maybe [BulkDeployment]))
-> ListBulkDeploymentsResponse
-> f ListBulkDeploymentsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BulkDeployment] [BulkDeployment] [BulkDeployment] [BulkDeployment]
-> Iso
     (Maybe [BulkDeployment])
     (Maybe [BulkDeployment])
     (Maybe [BulkDeployment])
     (Maybe [BulkDeployment])
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
  [BulkDeployment] [BulkDeployment] [BulkDeployment] [BulkDeployment]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListBulkDeploymentsResponse