{-# 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.ListFunctionDefinitionVersions
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the versions of a Lambda function definition.
--
-- This operation returns paginated results.
module Amazonka.Greengrass.ListFunctionDefinitionVersions
  ( -- * Creating a Request
    ListFunctionDefinitionVersions (..),
    newListFunctionDefinitionVersions,

    -- * Request Lenses
    listFunctionDefinitionVersions_maxResults,
    listFunctionDefinitionVersions_nextToken,
    listFunctionDefinitionVersions_functionDefinitionId,

    -- * Destructuring the Response
    ListFunctionDefinitionVersionsResponse (..),
    newListFunctionDefinitionVersionsResponse,

    -- * Response Lenses
    listFunctionDefinitionVersionsResponse_nextToken,
    listFunctionDefinitionVersionsResponse_versions,
    listFunctionDefinitionVersionsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Greengrass.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListFunctionDefinitionVersions' smart constructor.
data ListFunctionDefinitionVersions = ListFunctionDefinitionVersions'
  { -- | The maximum number of results to be returned per request.
    ListFunctionDefinitionVersions -> Maybe Text
maxResults :: Prelude.Maybe Prelude.Text,
    -- | The token for the next set of results, or \'\'null\'\' if there are no
    -- additional results.
    ListFunctionDefinitionVersions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Lambda function definition.
    ListFunctionDefinitionVersions -> Text
functionDefinitionId :: Prelude.Text
  }
  deriving (ListFunctionDefinitionVersions
-> ListFunctionDefinitionVersions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFunctionDefinitionVersions
-> ListFunctionDefinitionVersions -> Bool
$c/= :: ListFunctionDefinitionVersions
-> ListFunctionDefinitionVersions -> Bool
== :: ListFunctionDefinitionVersions
-> ListFunctionDefinitionVersions -> Bool
$c== :: ListFunctionDefinitionVersions
-> ListFunctionDefinitionVersions -> Bool
Prelude.Eq, ReadPrec [ListFunctionDefinitionVersions]
ReadPrec ListFunctionDefinitionVersions
Int -> ReadS ListFunctionDefinitionVersions
ReadS [ListFunctionDefinitionVersions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFunctionDefinitionVersions]
$creadListPrec :: ReadPrec [ListFunctionDefinitionVersions]
readPrec :: ReadPrec ListFunctionDefinitionVersions
$creadPrec :: ReadPrec ListFunctionDefinitionVersions
readList :: ReadS [ListFunctionDefinitionVersions]
$creadList :: ReadS [ListFunctionDefinitionVersions]
readsPrec :: Int -> ReadS ListFunctionDefinitionVersions
$creadsPrec :: Int -> ReadS ListFunctionDefinitionVersions
Prelude.Read, Int -> ListFunctionDefinitionVersions -> ShowS
[ListFunctionDefinitionVersions] -> ShowS
ListFunctionDefinitionVersions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFunctionDefinitionVersions] -> ShowS
$cshowList :: [ListFunctionDefinitionVersions] -> ShowS
show :: ListFunctionDefinitionVersions -> String
$cshow :: ListFunctionDefinitionVersions -> String
showsPrec :: Int -> ListFunctionDefinitionVersions -> ShowS
$cshowsPrec :: Int -> ListFunctionDefinitionVersions -> ShowS
Prelude.Show, forall x.
Rep ListFunctionDefinitionVersions x
-> ListFunctionDefinitionVersions
forall x.
ListFunctionDefinitionVersions
-> Rep ListFunctionDefinitionVersions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListFunctionDefinitionVersions x
-> ListFunctionDefinitionVersions
$cfrom :: forall x.
ListFunctionDefinitionVersions
-> Rep ListFunctionDefinitionVersions x
Prelude.Generic)

-- |
-- Create a value of 'ListFunctionDefinitionVersions' 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:
--
-- 'maxResults', 'listFunctionDefinitionVersions_maxResults' - The maximum number of results to be returned per request.
--
-- 'nextToken', 'listFunctionDefinitionVersions_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'functionDefinitionId', 'listFunctionDefinitionVersions_functionDefinitionId' - The ID of the Lambda function definition.
newListFunctionDefinitionVersions ::
  -- | 'functionDefinitionId'
  Prelude.Text ->
  ListFunctionDefinitionVersions
newListFunctionDefinitionVersions :: Text -> ListFunctionDefinitionVersions
newListFunctionDefinitionVersions
  Text
pFunctionDefinitionId_ =
    ListFunctionDefinitionVersions'
      { $sel:maxResults:ListFunctionDefinitionVersions' :: Maybe Text
maxResults =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListFunctionDefinitionVersions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:functionDefinitionId:ListFunctionDefinitionVersions' :: Text
functionDefinitionId =
          Text
pFunctionDefinitionId_
      }

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

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

-- | The ID of the Lambda function definition.
listFunctionDefinitionVersions_functionDefinitionId :: Lens.Lens' ListFunctionDefinitionVersions Prelude.Text
listFunctionDefinitionVersions_functionDefinitionId :: Lens' ListFunctionDefinitionVersions Text
listFunctionDefinitionVersions_functionDefinitionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFunctionDefinitionVersions' {Text
functionDefinitionId :: Text
$sel:functionDefinitionId:ListFunctionDefinitionVersions' :: ListFunctionDefinitionVersions -> Text
functionDefinitionId} -> Text
functionDefinitionId) (\s :: ListFunctionDefinitionVersions
s@ListFunctionDefinitionVersions' {} Text
a -> ListFunctionDefinitionVersions
s {$sel:functionDefinitionId:ListFunctionDefinitionVersions' :: Text
functionDefinitionId = Text
a} :: ListFunctionDefinitionVersions)

instance Core.AWSPager ListFunctionDefinitionVersions where
  page :: ListFunctionDefinitionVersions
-> AWSResponse ListFunctionDefinitionVersions
-> Maybe ListFunctionDefinitionVersions
page ListFunctionDefinitionVersions
rq AWSResponse ListFunctionDefinitionVersions
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListFunctionDefinitionVersions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListFunctionDefinitionVersionsResponse (Maybe Text)
listFunctionDefinitionVersionsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListFunctionDefinitionVersions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListFunctionDefinitionVersionsResponse (Maybe [VersionInformation])
listFunctionDefinitionVersionsResponse_versions
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListFunctionDefinitionVersions
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListFunctionDefinitionVersions (Maybe Text)
listFunctionDefinitionVersions_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListFunctionDefinitionVersions
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListFunctionDefinitionVersionsResponse (Maybe Text)
listFunctionDefinitionVersionsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance
  Prelude.Hashable
    ListFunctionDefinitionVersions
  where
  hashWithSalt :: Int -> ListFunctionDefinitionVersions -> Int
hashWithSalt
    Int
_salt
    ListFunctionDefinitionVersions' {Maybe Text
Text
functionDefinitionId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Text
$sel:functionDefinitionId:ListFunctionDefinitionVersions' :: ListFunctionDefinitionVersions -> Text
$sel:nextToken:ListFunctionDefinitionVersions' :: ListFunctionDefinitionVersions -> Maybe Text
$sel:maxResults:ListFunctionDefinitionVersions' :: ListFunctionDefinitionVersions -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
functionDefinitionId

instance
  Prelude.NFData
    ListFunctionDefinitionVersions
  where
  rnf :: ListFunctionDefinitionVersions -> ()
rnf ListFunctionDefinitionVersions' {Maybe Text
Text
functionDefinitionId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Text
$sel:functionDefinitionId:ListFunctionDefinitionVersions' :: ListFunctionDefinitionVersions -> Text
$sel:nextToken:ListFunctionDefinitionVersions' :: ListFunctionDefinitionVersions -> Maybe Text
$sel:maxResults:ListFunctionDefinitionVersions' :: ListFunctionDefinitionVersions -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
functionDefinitionId

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

instance Data.ToPath ListFunctionDefinitionVersions where
  toPath :: ListFunctionDefinitionVersions -> ByteString
toPath ListFunctionDefinitionVersions' {Maybe Text
Text
functionDefinitionId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Text
$sel:functionDefinitionId:ListFunctionDefinitionVersions' :: ListFunctionDefinitionVersions -> Text
$sel:nextToken:ListFunctionDefinitionVersions' :: ListFunctionDefinitionVersions -> Maybe Text
$sel:maxResults:ListFunctionDefinitionVersions' :: ListFunctionDefinitionVersions -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/greengrass/definition/functions/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
functionDefinitionId,
        ByteString
"/versions"
      ]

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

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

-- |
-- Create a value of 'ListFunctionDefinitionVersionsResponse' 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', 'listFunctionDefinitionVersionsResponse_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'versions', 'listFunctionDefinitionVersionsResponse_versions' - Information about a version.
--
-- 'httpStatus', 'listFunctionDefinitionVersionsResponse_httpStatus' - The response's http status code.
newListFunctionDefinitionVersionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListFunctionDefinitionVersionsResponse
newListFunctionDefinitionVersionsResponse :: Int -> ListFunctionDefinitionVersionsResponse
newListFunctionDefinitionVersionsResponse
  Int
pHttpStatus_ =
    ListFunctionDefinitionVersionsResponse'
      { $sel:nextToken:ListFunctionDefinitionVersionsResponse' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:versions:ListFunctionDefinitionVersionsResponse' :: Maybe [VersionInformation]
versions = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListFunctionDefinitionVersionsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

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

-- | Information about a version.
listFunctionDefinitionVersionsResponse_versions :: Lens.Lens' ListFunctionDefinitionVersionsResponse (Prelude.Maybe [VersionInformation])
listFunctionDefinitionVersionsResponse_versions :: Lens'
  ListFunctionDefinitionVersionsResponse (Maybe [VersionInformation])
listFunctionDefinitionVersionsResponse_versions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFunctionDefinitionVersionsResponse' {Maybe [VersionInformation]
versions :: Maybe [VersionInformation]
$sel:versions:ListFunctionDefinitionVersionsResponse' :: ListFunctionDefinitionVersionsResponse
-> Maybe [VersionInformation]
versions} -> Maybe [VersionInformation]
versions) (\s :: ListFunctionDefinitionVersionsResponse
s@ListFunctionDefinitionVersionsResponse' {} Maybe [VersionInformation]
a -> ListFunctionDefinitionVersionsResponse
s {$sel:versions:ListFunctionDefinitionVersionsResponse' :: Maybe [VersionInformation]
versions = Maybe [VersionInformation]
a} :: ListFunctionDefinitionVersionsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListFunctionDefinitionVersionsResponse
  where
  rnf :: ListFunctionDefinitionVersionsResponse -> ()
rnf ListFunctionDefinitionVersionsResponse' {Int
Maybe [VersionInformation]
Maybe Text
httpStatus :: Int
versions :: Maybe [VersionInformation]
nextToken :: Maybe Text
$sel:httpStatus:ListFunctionDefinitionVersionsResponse' :: ListFunctionDefinitionVersionsResponse -> Int
$sel:versions:ListFunctionDefinitionVersionsResponse' :: ListFunctionDefinitionVersionsResponse
-> Maybe [VersionInformation]
$sel:nextToken:ListFunctionDefinitionVersionsResponse' :: ListFunctionDefinitionVersionsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [VersionInformation]
versions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus