{-# 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.Connect.ListLambdaFunctions
-- 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)
--
-- This API is in preview release for Amazon Connect and is subject to
-- change.
--
-- Returns a paginated list of all Lambda functions that display in the
-- dropdown options in the relevant contact flow blocks.
--
-- This operation returns paginated results.
module Amazonka.Connect.ListLambdaFunctions
  ( -- * Creating a Request
    ListLambdaFunctions (..),
    newListLambdaFunctions,

    -- * Request Lenses
    listLambdaFunctions_nextToken,
    listLambdaFunctions_maxResults,
    listLambdaFunctions_instanceId,

    -- * Destructuring the Response
    ListLambdaFunctionsResponse (..),
    newListLambdaFunctionsResponse,

    -- * Response Lenses
    listLambdaFunctionsResponse_lambdaFunctions,
    listLambdaFunctionsResponse_nextToken,
    listLambdaFunctionsResponse_httpStatus,
  )
where

import Amazonka.Connect.Types
import qualified Amazonka.Core as Core
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:/ 'newListLambdaFunctions' smart constructor.
data ListLambdaFunctions = ListLambdaFunctions'
  { -- | The token for the next set of results. Use the value returned in the
    -- previous response in the next request to retrieve the next set of
    -- results.
    ListLambdaFunctions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return per page.
    ListLambdaFunctions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The identifier of the Amazon Connect instance. You can find the
    -- instanceId in the ARN of the instance.
    ListLambdaFunctions -> Text
instanceId :: Prelude.Text
  }
  deriving (ListLambdaFunctions -> ListLambdaFunctions -> Bool
(ListLambdaFunctions -> ListLambdaFunctions -> Bool)
-> (ListLambdaFunctions -> ListLambdaFunctions -> Bool)
-> Eq ListLambdaFunctions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLambdaFunctions -> ListLambdaFunctions -> Bool
$c/= :: ListLambdaFunctions -> ListLambdaFunctions -> Bool
== :: ListLambdaFunctions -> ListLambdaFunctions -> Bool
$c== :: ListLambdaFunctions -> ListLambdaFunctions -> Bool
Prelude.Eq, ReadPrec [ListLambdaFunctions]
ReadPrec ListLambdaFunctions
Int -> ReadS ListLambdaFunctions
ReadS [ListLambdaFunctions]
(Int -> ReadS ListLambdaFunctions)
-> ReadS [ListLambdaFunctions]
-> ReadPrec ListLambdaFunctions
-> ReadPrec [ListLambdaFunctions]
-> Read ListLambdaFunctions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLambdaFunctions]
$creadListPrec :: ReadPrec [ListLambdaFunctions]
readPrec :: ReadPrec ListLambdaFunctions
$creadPrec :: ReadPrec ListLambdaFunctions
readList :: ReadS [ListLambdaFunctions]
$creadList :: ReadS [ListLambdaFunctions]
readsPrec :: Int -> ReadS ListLambdaFunctions
$creadsPrec :: Int -> ReadS ListLambdaFunctions
Prelude.Read, Int -> ListLambdaFunctions -> ShowS
[ListLambdaFunctions] -> ShowS
ListLambdaFunctions -> String
(Int -> ListLambdaFunctions -> ShowS)
-> (ListLambdaFunctions -> String)
-> ([ListLambdaFunctions] -> ShowS)
-> Show ListLambdaFunctions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLambdaFunctions] -> ShowS
$cshowList :: [ListLambdaFunctions] -> ShowS
show :: ListLambdaFunctions -> String
$cshow :: ListLambdaFunctions -> String
showsPrec :: Int -> ListLambdaFunctions -> ShowS
$cshowsPrec :: Int -> ListLambdaFunctions -> ShowS
Prelude.Show, (forall x. ListLambdaFunctions -> Rep ListLambdaFunctions x)
-> (forall x. Rep ListLambdaFunctions x -> ListLambdaFunctions)
-> Generic ListLambdaFunctions
forall x. Rep ListLambdaFunctions x -> ListLambdaFunctions
forall x. ListLambdaFunctions -> Rep ListLambdaFunctions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListLambdaFunctions x -> ListLambdaFunctions
$cfrom :: forall x. ListLambdaFunctions -> Rep ListLambdaFunctions x
Prelude.Generic)

-- |
-- Create a value of 'ListLambdaFunctions' 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', 'listLambdaFunctions_nextToken' - The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
--
-- 'maxResults', 'listLambdaFunctions_maxResults' - The maximum number of results to return per page.
--
-- 'instanceId', 'listLambdaFunctions_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
newListLambdaFunctions ::
  -- | 'instanceId'
  Prelude.Text ->
  ListLambdaFunctions
newListLambdaFunctions :: Text -> ListLambdaFunctions
newListLambdaFunctions Text
pInstanceId_ =
  ListLambdaFunctions' :: Maybe Text -> Maybe Natural -> Text -> ListLambdaFunctions
ListLambdaFunctions'
    { $sel:nextToken:ListLambdaFunctions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListLambdaFunctions' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceId:ListLambdaFunctions' :: Text
instanceId = Text
pInstanceId_
    }

-- | The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
listLambdaFunctions_nextToken :: Lens.Lens' ListLambdaFunctions (Prelude.Maybe Prelude.Text)
listLambdaFunctions_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListLambdaFunctions -> f ListLambdaFunctions
listLambdaFunctions_nextToken = (ListLambdaFunctions -> Maybe Text)
-> (ListLambdaFunctions -> Maybe Text -> ListLambdaFunctions)
-> Lens
     ListLambdaFunctions ListLambdaFunctions (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLambdaFunctions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLambdaFunctions' :: ListLambdaFunctions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLambdaFunctions
s@ListLambdaFunctions' {} Maybe Text
a -> ListLambdaFunctions
s {$sel:nextToken:ListLambdaFunctions' :: Maybe Text
nextToken = Maybe Text
a} :: ListLambdaFunctions)

-- | The maximum number of results to return per page.
listLambdaFunctions_maxResults :: Lens.Lens' ListLambdaFunctions (Prelude.Maybe Prelude.Natural)
listLambdaFunctions_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListLambdaFunctions -> f ListLambdaFunctions
listLambdaFunctions_maxResults = (ListLambdaFunctions -> Maybe Natural)
-> (ListLambdaFunctions -> Maybe Natural -> ListLambdaFunctions)
-> Lens
     ListLambdaFunctions
     ListLambdaFunctions
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLambdaFunctions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListLambdaFunctions' :: ListLambdaFunctions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListLambdaFunctions
s@ListLambdaFunctions' {} Maybe Natural
a -> ListLambdaFunctions
s {$sel:maxResults:ListLambdaFunctions' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListLambdaFunctions)

-- | The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
listLambdaFunctions_instanceId :: Lens.Lens' ListLambdaFunctions Prelude.Text
listLambdaFunctions_instanceId :: (Text -> f Text) -> ListLambdaFunctions -> f ListLambdaFunctions
listLambdaFunctions_instanceId = (ListLambdaFunctions -> Text)
-> (ListLambdaFunctions -> Text -> ListLambdaFunctions)
-> Lens ListLambdaFunctions ListLambdaFunctions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLambdaFunctions' {Text
instanceId :: Text
$sel:instanceId:ListLambdaFunctions' :: ListLambdaFunctions -> Text
instanceId} -> Text
instanceId) (\s :: ListLambdaFunctions
s@ListLambdaFunctions' {} Text
a -> ListLambdaFunctions
s {$sel:instanceId:ListLambdaFunctions' :: Text
instanceId = Text
a} :: ListLambdaFunctions)

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

instance Prelude.NFData ListLambdaFunctions

instance Core.ToHeaders ListLambdaFunctions where
  toHeaders :: ListLambdaFunctions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListLambdaFunctions -> 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 ListLambdaFunctions where
  toPath :: ListLambdaFunctions -> ByteString
toPath ListLambdaFunctions' {Maybe Natural
Maybe Text
Text
instanceId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:instanceId:ListLambdaFunctions' :: ListLambdaFunctions -> Text
$sel:maxResults:ListLambdaFunctions' :: ListLambdaFunctions -> Maybe Natural
$sel:nextToken:ListLambdaFunctions' :: ListLambdaFunctions -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/instance/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId,
        ByteString
"/lambda-functions"
      ]

instance Core.ToQuery ListLambdaFunctions where
  toQuery :: ListLambdaFunctions -> QueryString
toQuery ListLambdaFunctions' {Maybe Natural
Maybe Text
Text
instanceId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:instanceId:ListLambdaFunctions' :: ListLambdaFunctions -> Text
$sel:maxResults:ListLambdaFunctions' :: ListLambdaFunctions -> Maybe Natural
$sel:nextToken:ListLambdaFunctions' :: ListLambdaFunctions -> 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:/ 'newListLambdaFunctionsResponse' smart constructor.
data ListLambdaFunctionsResponse = ListLambdaFunctionsResponse'
  { -- | The Lambdafunction ARNs associated with the specified instance.
    ListLambdaFunctionsResponse -> Maybe [Text]
lambdaFunctions :: Prelude.Maybe [Prelude.Text],
    -- | If there are additional results, this is the token for the next set of
    -- results.
    ListLambdaFunctionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListLambdaFunctionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListLambdaFunctionsResponse -> ListLambdaFunctionsResponse -> Bool
(ListLambdaFunctionsResponse
 -> ListLambdaFunctionsResponse -> Bool)
-> (ListLambdaFunctionsResponse
    -> ListLambdaFunctionsResponse -> Bool)
-> Eq ListLambdaFunctionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLambdaFunctionsResponse -> ListLambdaFunctionsResponse -> Bool
$c/= :: ListLambdaFunctionsResponse -> ListLambdaFunctionsResponse -> Bool
== :: ListLambdaFunctionsResponse -> ListLambdaFunctionsResponse -> Bool
$c== :: ListLambdaFunctionsResponse -> ListLambdaFunctionsResponse -> Bool
Prelude.Eq, ReadPrec [ListLambdaFunctionsResponse]
ReadPrec ListLambdaFunctionsResponse
Int -> ReadS ListLambdaFunctionsResponse
ReadS [ListLambdaFunctionsResponse]
(Int -> ReadS ListLambdaFunctionsResponse)
-> ReadS [ListLambdaFunctionsResponse]
-> ReadPrec ListLambdaFunctionsResponse
-> ReadPrec [ListLambdaFunctionsResponse]
-> Read ListLambdaFunctionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLambdaFunctionsResponse]
$creadListPrec :: ReadPrec [ListLambdaFunctionsResponse]
readPrec :: ReadPrec ListLambdaFunctionsResponse
$creadPrec :: ReadPrec ListLambdaFunctionsResponse
readList :: ReadS [ListLambdaFunctionsResponse]
$creadList :: ReadS [ListLambdaFunctionsResponse]
readsPrec :: Int -> ReadS ListLambdaFunctionsResponse
$creadsPrec :: Int -> ReadS ListLambdaFunctionsResponse
Prelude.Read, Int -> ListLambdaFunctionsResponse -> ShowS
[ListLambdaFunctionsResponse] -> ShowS
ListLambdaFunctionsResponse -> String
(Int -> ListLambdaFunctionsResponse -> ShowS)
-> (ListLambdaFunctionsResponse -> String)
-> ([ListLambdaFunctionsResponse] -> ShowS)
-> Show ListLambdaFunctionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLambdaFunctionsResponse] -> ShowS
$cshowList :: [ListLambdaFunctionsResponse] -> ShowS
show :: ListLambdaFunctionsResponse -> String
$cshow :: ListLambdaFunctionsResponse -> String
showsPrec :: Int -> ListLambdaFunctionsResponse -> ShowS
$cshowsPrec :: Int -> ListLambdaFunctionsResponse -> ShowS
Prelude.Show, (forall x.
 ListLambdaFunctionsResponse -> Rep ListLambdaFunctionsResponse x)
-> (forall x.
    Rep ListLambdaFunctionsResponse x -> ListLambdaFunctionsResponse)
-> Generic ListLambdaFunctionsResponse
forall x.
Rep ListLambdaFunctionsResponse x -> ListLambdaFunctionsResponse
forall x.
ListLambdaFunctionsResponse -> Rep ListLambdaFunctionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListLambdaFunctionsResponse x -> ListLambdaFunctionsResponse
$cfrom :: forall x.
ListLambdaFunctionsResponse -> Rep ListLambdaFunctionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListLambdaFunctionsResponse' 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:
--
-- 'lambdaFunctions', 'listLambdaFunctionsResponse_lambdaFunctions' - The Lambdafunction ARNs associated with the specified instance.
--
-- 'nextToken', 'listLambdaFunctionsResponse_nextToken' - If there are additional results, this is the token for the next set of
-- results.
--
-- 'httpStatus', 'listLambdaFunctionsResponse_httpStatus' - The response's http status code.
newListLambdaFunctionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListLambdaFunctionsResponse
newListLambdaFunctionsResponse :: Int -> ListLambdaFunctionsResponse
newListLambdaFunctionsResponse Int
pHttpStatus_ =
  ListLambdaFunctionsResponse' :: Maybe [Text] -> Maybe Text -> Int -> ListLambdaFunctionsResponse
ListLambdaFunctionsResponse'
    { $sel:lambdaFunctions:ListLambdaFunctionsResponse' :: Maybe [Text]
lambdaFunctions =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListLambdaFunctionsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListLambdaFunctionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Lambdafunction ARNs associated with the specified instance.
listLambdaFunctionsResponse_lambdaFunctions :: Lens.Lens' ListLambdaFunctionsResponse (Prelude.Maybe [Prelude.Text])
listLambdaFunctionsResponse_lambdaFunctions :: (Maybe [Text] -> f (Maybe [Text]))
-> ListLambdaFunctionsResponse -> f ListLambdaFunctionsResponse
listLambdaFunctionsResponse_lambdaFunctions = (ListLambdaFunctionsResponse -> Maybe [Text])
-> (ListLambdaFunctionsResponse
    -> Maybe [Text] -> ListLambdaFunctionsResponse)
-> Lens' ListLambdaFunctionsResponse (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLambdaFunctionsResponse' {Maybe [Text]
lambdaFunctions :: Maybe [Text]
$sel:lambdaFunctions:ListLambdaFunctionsResponse' :: ListLambdaFunctionsResponse -> Maybe [Text]
lambdaFunctions} -> Maybe [Text]
lambdaFunctions) (\s :: ListLambdaFunctionsResponse
s@ListLambdaFunctionsResponse' {} Maybe [Text]
a -> ListLambdaFunctionsResponse
s {$sel:lambdaFunctions:ListLambdaFunctionsResponse' :: Maybe [Text]
lambdaFunctions = Maybe [Text]
a} :: ListLambdaFunctionsResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ListLambdaFunctionsResponse -> f ListLambdaFunctionsResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListLambdaFunctionsResponse
-> f ListLambdaFunctionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If there are additional results, this is the token for the next set of
-- results.
listLambdaFunctionsResponse_nextToken :: Lens.Lens' ListLambdaFunctionsResponse (Prelude.Maybe Prelude.Text)
listLambdaFunctionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListLambdaFunctionsResponse -> f ListLambdaFunctionsResponse
listLambdaFunctionsResponse_nextToken = (ListLambdaFunctionsResponse -> Maybe Text)
-> (ListLambdaFunctionsResponse
    -> Maybe Text -> ListLambdaFunctionsResponse)
-> Lens' ListLambdaFunctionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLambdaFunctionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLambdaFunctionsResponse' :: ListLambdaFunctionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLambdaFunctionsResponse
s@ListLambdaFunctionsResponse' {} Maybe Text
a -> ListLambdaFunctionsResponse
s {$sel:nextToken:ListLambdaFunctionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListLambdaFunctionsResponse)

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

instance Prelude.NFData ListLambdaFunctionsResponse