{-# 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.KafkaConnect.ListCustomPlugins
-- 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 all of the custom plugins in this account and Region.
--
-- This operation returns paginated results.
module Amazonka.KafkaConnect.ListCustomPlugins
  ( -- * Creating a Request
    ListCustomPlugins (..),
    newListCustomPlugins,

    -- * Request Lenses
    listCustomPlugins_nextToken,
    listCustomPlugins_maxResults,

    -- * Destructuring the Response
    ListCustomPluginsResponse (..),
    newListCustomPluginsResponse,

    -- * Response Lenses
    listCustomPluginsResponse_customPlugins,
    listCustomPluginsResponse_nextToken,
    listCustomPluginsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.KafkaConnect.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:/ 'newListCustomPlugins' smart constructor.
data ListCustomPlugins = ListCustomPlugins'
  { -- | If the response of a ListCustomPlugins operation is truncated, it will
    -- include a NextToken. Send this NextToken in a subsequent request to
    -- continue listing from where the previous operation left off.
    ListCustomPlugins -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of custom plugins to list in one response.
    ListCustomPlugins -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListCustomPlugins -> ListCustomPlugins -> Bool
(ListCustomPlugins -> ListCustomPlugins -> Bool)
-> (ListCustomPlugins -> ListCustomPlugins -> Bool)
-> Eq ListCustomPlugins
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCustomPlugins -> ListCustomPlugins -> Bool
$c/= :: ListCustomPlugins -> ListCustomPlugins -> Bool
== :: ListCustomPlugins -> ListCustomPlugins -> Bool
$c== :: ListCustomPlugins -> ListCustomPlugins -> Bool
Prelude.Eq, ReadPrec [ListCustomPlugins]
ReadPrec ListCustomPlugins
Int -> ReadS ListCustomPlugins
ReadS [ListCustomPlugins]
(Int -> ReadS ListCustomPlugins)
-> ReadS [ListCustomPlugins]
-> ReadPrec ListCustomPlugins
-> ReadPrec [ListCustomPlugins]
-> Read ListCustomPlugins
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCustomPlugins]
$creadListPrec :: ReadPrec [ListCustomPlugins]
readPrec :: ReadPrec ListCustomPlugins
$creadPrec :: ReadPrec ListCustomPlugins
readList :: ReadS [ListCustomPlugins]
$creadList :: ReadS [ListCustomPlugins]
readsPrec :: Int -> ReadS ListCustomPlugins
$creadsPrec :: Int -> ReadS ListCustomPlugins
Prelude.Read, Int -> ListCustomPlugins -> ShowS
[ListCustomPlugins] -> ShowS
ListCustomPlugins -> String
(Int -> ListCustomPlugins -> ShowS)
-> (ListCustomPlugins -> String)
-> ([ListCustomPlugins] -> ShowS)
-> Show ListCustomPlugins
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCustomPlugins] -> ShowS
$cshowList :: [ListCustomPlugins] -> ShowS
show :: ListCustomPlugins -> String
$cshow :: ListCustomPlugins -> String
showsPrec :: Int -> ListCustomPlugins -> ShowS
$cshowsPrec :: Int -> ListCustomPlugins -> ShowS
Prelude.Show, (forall x. ListCustomPlugins -> Rep ListCustomPlugins x)
-> (forall x. Rep ListCustomPlugins x -> ListCustomPlugins)
-> Generic ListCustomPlugins
forall x. Rep ListCustomPlugins x -> ListCustomPlugins
forall x. ListCustomPlugins -> Rep ListCustomPlugins x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListCustomPlugins x -> ListCustomPlugins
$cfrom :: forall x. ListCustomPlugins -> Rep ListCustomPlugins x
Prelude.Generic)

-- |
-- Create a value of 'ListCustomPlugins' 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', 'listCustomPlugins_nextToken' - If the response of a ListCustomPlugins operation is truncated, it will
-- include a NextToken. Send this NextToken in a subsequent request to
-- continue listing from where the previous operation left off.
--
-- 'maxResults', 'listCustomPlugins_maxResults' - The maximum number of custom plugins to list in one response.
newListCustomPlugins ::
  ListCustomPlugins
newListCustomPlugins :: ListCustomPlugins
newListCustomPlugins =
  ListCustomPlugins' :: Maybe Text -> Maybe Natural -> ListCustomPlugins
ListCustomPlugins'
    { $sel:nextToken:ListCustomPlugins' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListCustomPlugins' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | If the response of a ListCustomPlugins operation is truncated, it will
-- include a NextToken. Send this NextToken in a subsequent request to
-- continue listing from where the previous operation left off.
listCustomPlugins_nextToken :: Lens.Lens' ListCustomPlugins (Prelude.Maybe Prelude.Text)
listCustomPlugins_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListCustomPlugins -> f ListCustomPlugins
listCustomPlugins_nextToken = (ListCustomPlugins -> Maybe Text)
-> (ListCustomPlugins -> Maybe Text -> ListCustomPlugins)
-> Lens
     ListCustomPlugins ListCustomPlugins (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomPlugins' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCustomPlugins' :: ListCustomPlugins -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCustomPlugins
s@ListCustomPlugins' {} Maybe Text
a -> ListCustomPlugins
s {$sel:nextToken:ListCustomPlugins' :: Maybe Text
nextToken = Maybe Text
a} :: ListCustomPlugins)

-- | The maximum number of custom plugins to list in one response.
listCustomPlugins_maxResults :: Lens.Lens' ListCustomPlugins (Prelude.Maybe Prelude.Natural)
listCustomPlugins_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListCustomPlugins -> f ListCustomPlugins
listCustomPlugins_maxResults = (ListCustomPlugins -> Maybe Natural)
-> (ListCustomPlugins -> Maybe Natural -> ListCustomPlugins)
-> Lens
     ListCustomPlugins ListCustomPlugins (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomPlugins' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListCustomPlugins' :: ListCustomPlugins -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListCustomPlugins
s@ListCustomPlugins' {} Maybe Natural
a -> ListCustomPlugins
s {$sel:maxResults:ListCustomPlugins' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListCustomPlugins)

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

instance Prelude.NFData ListCustomPlugins

instance Core.ToHeaders ListCustomPlugins where
  toHeaders :: ListCustomPlugins -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListCustomPlugins -> 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 ListCustomPlugins where
  toPath :: ListCustomPlugins -> ByteString
toPath = ByteString -> ListCustomPlugins -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/custom-plugins"

instance Core.ToQuery ListCustomPlugins where
  toQuery :: ListCustomPlugins -> QueryString
toQuery ListCustomPlugins' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListCustomPlugins' :: ListCustomPlugins -> Maybe Natural
$sel:nextToken:ListCustomPlugins' :: ListCustomPlugins -> 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 Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListCustomPluginsResponse' smart constructor.
data ListCustomPluginsResponse = ListCustomPluginsResponse'
  { -- | An array of custom plugin descriptions.
    ListCustomPluginsResponse -> Maybe [CustomPluginSummary]
customPlugins :: Prelude.Maybe [CustomPluginSummary],
    -- | If the response of a ListCustomPlugins operation is truncated, it will
    -- include a NextToken. Send this NextToken in a subsequent request to
    -- continue listing from where the previous operation left off.
    ListCustomPluginsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListCustomPluginsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListCustomPluginsResponse -> ListCustomPluginsResponse -> Bool
(ListCustomPluginsResponse -> ListCustomPluginsResponse -> Bool)
-> (ListCustomPluginsResponse -> ListCustomPluginsResponse -> Bool)
-> Eq ListCustomPluginsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCustomPluginsResponse -> ListCustomPluginsResponse -> Bool
$c/= :: ListCustomPluginsResponse -> ListCustomPluginsResponse -> Bool
== :: ListCustomPluginsResponse -> ListCustomPluginsResponse -> Bool
$c== :: ListCustomPluginsResponse -> ListCustomPluginsResponse -> Bool
Prelude.Eq, ReadPrec [ListCustomPluginsResponse]
ReadPrec ListCustomPluginsResponse
Int -> ReadS ListCustomPluginsResponse
ReadS [ListCustomPluginsResponse]
(Int -> ReadS ListCustomPluginsResponse)
-> ReadS [ListCustomPluginsResponse]
-> ReadPrec ListCustomPluginsResponse
-> ReadPrec [ListCustomPluginsResponse]
-> Read ListCustomPluginsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCustomPluginsResponse]
$creadListPrec :: ReadPrec [ListCustomPluginsResponse]
readPrec :: ReadPrec ListCustomPluginsResponse
$creadPrec :: ReadPrec ListCustomPluginsResponse
readList :: ReadS [ListCustomPluginsResponse]
$creadList :: ReadS [ListCustomPluginsResponse]
readsPrec :: Int -> ReadS ListCustomPluginsResponse
$creadsPrec :: Int -> ReadS ListCustomPluginsResponse
Prelude.Read, Int -> ListCustomPluginsResponse -> ShowS
[ListCustomPluginsResponse] -> ShowS
ListCustomPluginsResponse -> String
(Int -> ListCustomPluginsResponse -> ShowS)
-> (ListCustomPluginsResponse -> String)
-> ([ListCustomPluginsResponse] -> ShowS)
-> Show ListCustomPluginsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCustomPluginsResponse] -> ShowS
$cshowList :: [ListCustomPluginsResponse] -> ShowS
show :: ListCustomPluginsResponse -> String
$cshow :: ListCustomPluginsResponse -> String
showsPrec :: Int -> ListCustomPluginsResponse -> ShowS
$cshowsPrec :: Int -> ListCustomPluginsResponse -> ShowS
Prelude.Show, (forall x.
 ListCustomPluginsResponse -> Rep ListCustomPluginsResponse x)
-> (forall x.
    Rep ListCustomPluginsResponse x -> ListCustomPluginsResponse)
-> Generic ListCustomPluginsResponse
forall x.
Rep ListCustomPluginsResponse x -> ListCustomPluginsResponse
forall x.
ListCustomPluginsResponse -> Rep ListCustomPluginsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCustomPluginsResponse x -> ListCustomPluginsResponse
$cfrom :: forall x.
ListCustomPluginsResponse -> Rep ListCustomPluginsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListCustomPluginsResponse' 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:
--
-- 'customPlugins', 'listCustomPluginsResponse_customPlugins' - An array of custom plugin descriptions.
--
-- 'nextToken', 'listCustomPluginsResponse_nextToken' - If the response of a ListCustomPlugins operation is truncated, it will
-- include a NextToken. Send this NextToken in a subsequent request to
-- continue listing from where the previous operation left off.
--
-- 'httpStatus', 'listCustomPluginsResponse_httpStatus' - The response's http status code.
newListCustomPluginsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListCustomPluginsResponse
newListCustomPluginsResponse :: Int -> ListCustomPluginsResponse
newListCustomPluginsResponse Int
pHttpStatus_ =
  ListCustomPluginsResponse' :: Maybe [CustomPluginSummary]
-> Maybe Text -> Int -> ListCustomPluginsResponse
ListCustomPluginsResponse'
    { $sel:customPlugins:ListCustomPluginsResponse' :: Maybe [CustomPluginSummary]
customPlugins =
        Maybe [CustomPluginSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListCustomPluginsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListCustomPluginsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of custom plugin descriptions.
listCustomPluginsResponse_customPlugins :: Lens.Lens' ListCustomPluginsResponse (Prelude.Maybe [CustomPluginSummary])
listCustomPluginsResponse_customPlugins :: (Maybe [CustomPluginSummary] -> f (Maybe [CustomPluginSummary]))
-> ListCustomPluginsResponse -> f ListCustomPluginsResponse
listCustomPluginsResponse_customPlugins = (ListCustomPluginsResponse -> Maybe [CustomPluginSummary])
-> (ListCustomPluginsResponse
    -> Maybe [CustomPluginSummary] -> ListCustomPluginsResponse)
-> Lens' ListCustomPluginsResponse (Maybe [CustomPluginSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomPluginsResponse' {Maybe [CustomPluginSummary]
customPlugins :: Maybe [CustomPluginSummary]
$sel:customPlugins:ListCustomPluginsResponse' :: ListCustomPluginsResponse -> Maybe [CustomPluginSummary]
customPlugins} -> Maybe [CustomPluginSummary]
customPlugins) (\s :: ListCustomPluginsResponse
s@ListCustomPluginsResponse' {} Maybe [CustomPluginSummary]
a -> ListCustomPluginsResponse
s {$sel:customPlugins:ListCustomPluginsResponse' :: Maybe [CustomPluginSummary]
customPlugins = Maybe [CustomPluginSummary]
a} :: ListCustomPluginsResponse) ((Maybe [CustomPluginSummary] -> f (Maybe [CustomPluginSummary]))
 -> ListCustomPluginsResponse -> f ListCustomPluginsResponse)
-> ((Maybe [CustomPluginSummary]
     -> f (Maybe [CustomPluginSummary]))
    -> Maybe [CustomPluginSummary] -> f (Maybe [CustomPluginSummary]))
-> (Maybe [CustomPluginSummary] -> f (Maybe [CustomPluginSummary]))
-> ListCustomPluginsResponse
-> f ListCustomPluginsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [CustomPluginSummary]
  [CustomPluginSummary]
  [CustomPluginSummary]
  [CustomPluginSummary]
-> Iso
     (Maybe [CustomPluginSummary])
     (Maybe [CustomPluginSummary])
     (Maybe [CustomPluginSummary])
     (Maybe [CustomPluginSummary])
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
  [CustomPluginSummary]
  [CustomPluginSummary]
  [CustomPluginSummary]
  [CustomPluginSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If the response of a ListCustomPlugins operation is truncated, it will
-- include a NextToken. Send this NextToken in a subsequent request to
-- continue listing from where the previous operation left off.
listCustomPluginsResponse_nextToken :: Lens.Lens' ListCustomPluginsResponse (Prelude.Maybe Prelude.Text)
listCustomPluginsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListCustomPluginsResponse -> f ListCustomPluginsResponse
listCustomPluginsResponse_nextToken = (ListCustomPluginsResponse -> Maybe Text)
-> (ListCustomPluginsResponse
    -> Maybe Text -> ListCustomPluginsResponse)
-> Lens' ListCustomPluginsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomPluginsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCustomPluginsResponse' :: ListCustomPluginsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCustomPluginsResponse
s@ListCustomPluginsResponse' {} Maybe Text
a -> ListCustomPluginsResponse
s {$sel:nextToken:ListCustomPluginsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListCustomPluginsResponse)

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

instance Prelude.NFData ListCustomPluginsResponse