{-# 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.GetFunctionDefinitionVersion
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves information about a Lambda function definition version,
-- including which Lambda functions are included in the version and their
-- configurations.
module Amazonka.Greengrass.GetFunctionDefinitionVersion
  ( -- * Creating a Request
    GetFunctionDefinitionVersion (..),
    newGetFunctionDefinitionVersion,

    -- * Request Lenses
    getFunctionDefinitionVersion_nextToken,
    getFunctionDefinitionVersion_functionDefinitionId,
    getFunctionDefinitionVersion_functionDefinitionVersionId,

    -- * Destructuring the Response
    GetFunctionDefinitionVersionResponse (..),
    newGetFunctionDefinitionVersionResponse,

    -- * Response Lenses
    getFunctionDefinitionVersionResponse_arn,
    getFunctionDefinitionVersionResponse_creationTimestamp,
    getFunctionDefinitionVersionResponse_definition,
    getFunctionDefinitionVersionResponse_id,
    getFunctionDefinitionVersionResponse_nextToken,
    getFunctionDefinitionVersionResponse_version,
    getFunctionDefinitionVersionResponse_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:/ 'newGetFunctionDefinitionVersion' smart constructor.
data GetFunctionDefinitionVersion = GetFunctionDefinitionVersion'
  { -- | The token for the next set of results, or \'\'null\'\' if there are no
    -- additional results.
    GetFunctionDefinitionVersion -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Lambda function definition.
    GetFunctionDefinitionVersion -> Text
functionDefinitionId :: Prelude.Text,
    -- | The ID of the function definition version. This value maps to the
    -- \'\'Version\'\' property of the corresponding \'\'VersionInformation\'\'
    -- object, which is returned by \'\'ListFunctionDefinitionVersions\'\'
    -- requests. If the version is the last one that was associated with a
    -- function definition, the value also maps to the \'\'LatestVersion\'\'
    -- property of the corresponding \'\'DefinitionInformation\'\' object.
    GetFunctionDefinitionVersion -> Text
functionDefinitionVersionId :: Prelude.Text
  }
  deriving (GetFunctionDefinitionVersion
-> GetFunctionDefinitionVersion -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFunctionDefinitionVersion
-> GetFunctionDefinitionVersion -> Bool
$c/= :: GetFunctionDefinitionVersion
-> GetFunctionDefinitionVersion -> Bool
== :: GetFunctionDefinitionVersion
-> GetFunctionDefinitionVersion -> Bool
$c== :: GetFunctionDefinitionVersion
-> GetFunctionDefinitionVersion -> Bool
Prelude.Eq, ReadPrec [GetFunctionDefinitionVersion]
ReadPrec GetFunctionDefinitionVersion
Int -> ReadS GetFunctionDefinitionVersion
ReadS [GetFunctionDefinitionVersion]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFunctionDefinitionVersion]
$creadListPrec :: ReadPrec [GetFunctionDefinitionVersion]
readPrec :: ReadPrec GetFunctionDefinitionVersion
$creadPrec :: ReadPrec GetFunctionDefinitionVersion
readList :: ReadS [GetFunctionDefinitionVersion]
$creadList :: ReadS [GetFunctionDefinitionVersion]
readsPrec :: Int -> ReadS GetFunctionDefinitionVersion
$creadsPrec :: Int -> ReadS GetFunctionDefinitionVersion
Prelude.Read, Int -> GetFunctionDefinitionVersion -> ShowS
[GetFunctionDefinitionVersion] -> ShowS
GetFunctionDefinitionVersion -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFunctionDefinitionVersion] -> ShowS
$cshowList :: [GetFunctionDefinitionVersion] -> ShowS
show :: GetFunctionDefinitionVersion -> String
$cshow :: GetFunctionDefinitionVersion -> String
showsPrec :: Int -> GetFunctionDefinitionVersion -> ShowS
$cshowsPrec :: Int -> GetFunctionDefinitionVersion -> ShowS
Prelude.Show, forall x.
Rep GetFunctionDefinitionVersion x -> GetFunctionDefinitionVersion
forall x.
GetFunctionDefinitionVersion -> Rep GetFunctionDefinitionVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetFunctionDefinitionVersion x -> GetFunctionDefinitionVersion
$cfrom :: forall x.
GetFunctionDefinitionVersion -> Rep GetFunctionDefinitionVersion x
Prelude.Generic)

-- |
-- Create a value of 'GetFunctionDefinitionVersion' 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', 'getFunctionDefinitionVersion_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'functionDefinitionId', 'getFunctionDefinitionVersion_functionDefinitionId' - The ID of the Lambda function definition.
--
-- 'functionDefinitionVersionId', 'getFunctionDefinitionVersion_functionDefinitionVersionId' - The ID of the function definition version. This value maps to the
-- \'\'Version\'\' property of the corresponding \'\'VersionInformation\'\'
-- object, which is returned by \'\'ListFunctionDefinitionVersions\'\'
-- requests. If the version is the last one that was associated with a
-- function definition, the value also maps to the \'\'LatestVersion\'\'
-- property of the corresponding \'\'DefinitionInformation\'\' object.
newGetFunctionDefinitionVersion ::
  -- | 'functionDefinitionId'
  Prelude.Text ->
  -- | 'functionDefinitionVersionId'
  Prelude.Text ->
  GetFunctionDefinitionVersion
newGetFunctionDefinitionVersion :: Text -> Text -> GetFunctionDefinitionVersion
newGetFunctionDefinitionVersion
  Text
pFunctionDefinitionId_
  Text
pFunctionDefinitionVersionId_ =
    GetFunctionDefinitionVersion'
      { $sel:nextToken:GetFunctionDefinitionVersion' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:functionDefinitionId:GetFunctionDefinitionVersion' :: Text
functionDefinitionId = Text
pFunctionDefinitionId_,
        $sel:functionDefinitionVersionId:GetFunctionDefinitionVersion' :: Text
functionDefinitionVersionId =
          Text
pFunctionDefinitionVersionId_
      }

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

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

-- | The ID of the function definition version. This value maps to the
-- \'\'Version\'\' property of the corresponding \'\'VersionInformation\'\'
-- object, which is returned by \'\'ListFunctionDefinitionVersions\'\'
-- requests. If the version is the last one that was associated with a
-- function definition, the value also maps to the \'\'LatestVersion\'\'
-- property of the corresponding \'\'DefinitionInformation\'\' object.
getFunctionDefinitionVersion_functionDefinitionVersionId :: Lens.Lens' GetFunctionDefinitionVersion Prelude.Text
getFunctionDefinitionVersion_functionDefinitionVersionId :: Lens' GetFunctionDefinitionVersion Text
getFunctionDefinitionVersion_functionDefinitionVersionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionDefinitionVersion' {Text
functionDefinitionVersionId :: Text
$sel:functionDefinitionVersionId:GetFunctionDefinitionVersion' :: GetFunctionDefinitionVersion -> Text
functionDefinitionVersionId} -> Text
functionDefinitionVersionId) (\s :: GetFunctionDefinitionVersion
s@GetFunctionDefinitionVersion' {} Text
a -> GetFunctionDefinitionVersion
s {$sel:functionDefinitionVersionId:GetFunctionDefinitionVersion' :: Text
functionDefinitionVersionId = Text
a} :: GetFunctionDefinitionVersion)

instance Core.AWSRequest GetFunctionDefinitionVersion where
  type
    AWSResponse GetFunctionDefinitionVersion =
      GetFunctionDefinitionVersionResponse
  request :: (Service -> Service)
-> GetFunctionDefinitionVersion
-> Request GetFunctionDefinitionVersion
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 GetFunctionDefinitionVersion
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetFunctionDefinitionVersion)))
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 Text
-> Maybe FunctionDefinitionVersion
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> GetFunctionDefinitionVersionResponse
GetFunctionDefinitionVersionResponse'
            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
"Arn")
            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
"CreationTimestamp")
            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
"Definition")
            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
"Id")
            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
"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
"Version")
            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
    GetFunctionDefinitionVersion
  where
  hashWithSalt :: Int -> GetFunctionDefinitionVersion -> Int
hashWithSalt Int
_salt GetFunctionDefinitionVersion' {Maybe Text
Text
functionDefinitionVersionId :: Text
functionDefinitionId :: Text
nextToken :: Maybe Text
$sel:functionDefinitionVersionId:GetFunctionDefinitionVersion' :: GetFunctionDefinitionVersion -> Text
$sel:functionDefinitionId:GetFunctionDefinitionVersion' :: GetFunctionDefinitionVersion -> Text
$sel:nextToken:GetFunctionDefinitionVersion' :: GetFunctionDefinitionVersion -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
functionDefinitionId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
functionDefinitionVersionId

instance Prelude.NFData GetFunctionDefinitionVersion where
  rnf :: GetFunctionDefinitionVersion -> ()
rnf GetFunctionDefinitionVersion' {Maybe Text
Text
functionDefinitionVersionId :: Text
functionDefinitionId :: Text
nextToken :: Maybe Text
$sel:functionDefinitionVersionId:GetFunctionDefinitionVersion' :: GetFunctionDefinitionVersion -> Text
$sel:functionDefinitionId:GetFunctionDefinitionVersion' :: GetFunctionDefinitionVersion -> Text
$sel:nextToken:GetFunctionDefinitionVersion' :: GetFunctionDefinitionVersion -> 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 Text
functionDefinitionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
functionDefinitionVersionId

instance Data.ToHeaders GetFunctionDefinitionVersion where
  toHeaders :: GetFunctionDefinitionVersion -> 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 GetFunctionDefinitionVersion where
  toPath :: GetFunctionDefinitionVersion -> ByteString
toPath GetFunctionDefinitionVersion' {Maybe Text
Text
functionDefinitionVersionId :: Text
functionDefinitionId :: Text
nextToken :: Maybe Text
$sel:functionDefinitionVersionId:GetFunctionDefinitionVersion' :: GetFunctionDefinitionVersion -> Text
$sel:functionDefinitionId:GetFunctionDefinitionVersion' :: GetFunctionDefinitionVersion -> Text
$sel:nextToken:GetFunctionDefinitionVersion' :: GetFunctionDefinitionVersion -> 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/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
functionDefinitionVersionId
      ]

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

-- | /See:/ 'newGetFunctionDefinitionVersionResponse' smart constructor.
data GetFunctionDefinitionVersionResponse = GetFunctionDefinitionVersionResponse'
  { -- | The ARN of the function definition version.
    GetFunctionDefinitionVersionResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the function definition
    -- version was created.
    GetFunctionDefinitionVersionResponse -> Maybe Text
creationTimestamp :: Prelude.Maybe Prelude.Text,
    -- | Information on the definition.
    GetFunctionDefinitionVersionResponse
-> Maybe FunctionDefinitionVersion
definition :: Prelude.Maybe FunctionDefinitionVersion,
    -- | The ID of the function definition version.
    GetFunctionDefinitionVersionResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The token for the next set of results, or \'\'null\'\' if there are no
    -- additional results.
    GetFunctionDefinitionVersionResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The version of the function definition version.
    GetFunctionDefinitionVersionResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetFunctionDefinitionVersionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetFunctionDefinitionVersionResponse
-> GetFunctionDefinitionVersionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFunctionDefinitionVersionResponse
-> GetFunctionDefinitionVersionResponse -> Bool
$c/= :: GetFunctionDefinitionVersionResponse
-> GetFunctionDefinitionVersionResponse -> Bool
== :: GetFunctionDefinitionVersionResponse
-> GetFunctionDefinitionVersionResponse -> Bool
$c== :: GetFunctionDefinitionVersionResponse
-> GetFunctionDefinitionVersionResponse -> Bool
Prelude.Eq, ReadPrec [GetFunctionDefinitionVersionResponse]
ReadPrec GetFunctionDefinitionVersionResponse
Int -> ReadS GetFunctionDefinitionVersionResponse
ReadS [GetFunctionDefinitionVersionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFunctionDefinitionVersionResponse]
$creadListPrec :: ReadPrec [GetFunctionDefinitionVersionResponse]
readPrec :: ReadPrec GetFunctionDefinitionVersionResponse
$creadPrec :: ReadPrec GetFunctionDefinitionVersionResponse
readList :: ReadS [GetFunctionDefinitionVersionResponse]
$creadList :: ReadS [GetFunctionDefinitionVersionResponse]
readsPrec :: Int -> ReadS GetFunctionDefinitionVersionResponse
$creadsPrec :: Int -> ReadS GetFunctionDefinitionVersionResponse
Prelude.Read, Int -> GetFunctionDefinitionVersionResponse -> ShowS
[GetFunctionDefinitionVersionResponse] -> ShowS
GetFunctionDefinitionVersionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFunctionDefinitionVersionResponse] -> ShowS
$cshowList :: [GetFunctionDefinitionVersionResponse] -> ShowS
show :: GetFunctionDefinitionVersionResponse -> String
$cshow :: GetFunctionDefinitionVersionResponse -> String
showsPrec :: Int -> GetFunctionDefinitionVersionResponse -> ShowS
$cshowsPrec :: Int -> GetFunctionDefinitionVersionResponse -> ShowS
Prelude.Show, forall x.
Rep GetFunctionDefinitionVersionResponse x
-> GetFunctionDefinitionVersionResponse
forall x.
GetFunctionDefinitionVersionResponse
-> Rep GetFunctionDefinitionVersionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetFunctionDefinitionVersionResponse x
-> GetFunctionDefinitionVersionResponse
$cfrom :: forall x.
GetFunctionDefinitionVersionResponse
-> Rep GetFunctionDefinitionVersionResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetFunctionDefinitionVersionResponse' 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:
--
-- 'arn', 'getFunctionDefinitionVersionResponse_arn' - The ARN of the function definition version.
--
-- 'creationTimestamp', 'getFunctionDefinitionVersionResponse_creationTimestamp' - The time, in milliseconds since the epoch, when the function definition
-- version was created.
--
-- 'definition', 'getFunctionDefinitionVersionResponse_definition' - Information on the definition.
--
-- 'id', 'getFunctionDefinitionVersionResponse_id' - The ID of the function definition version.
--
-- 'nextToken', 'getFunctionDefinitionVersionResponse_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'version', 'getFunctionDefinitionVersionResponse_version' - The version of the function definition version.
--
-- 'httpStatus', 'getFunctionDefinitionVersionResponse_httpStatus' - The response's http status code.
newGetFunctionDefinitionVersionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetFunctionDefinitionVersionResponse
newGetFunctionDefinitionVersionResponse :: Int -> GetFunctionDefinitionVersionResponse
newGetFunctionDefinitionVersionResponse Int
pHttpStatus_ =
  GetFunctionDefinitionVersionResponse'
    { $sel:arn:GetFunctionDefinitionVersionResponse' :: Maybe Text
arn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:GetFunctionDefinitionVersionResponse' :: Maybe Text
creationTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:definition:GetFunctionDefinitionVersionResponse' :: Maybe FunctionDefinitionVersion
definition = forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetFunctionDefinitionVersionResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetFunctionDefinitionVersionResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:version:GetFunctionDefinitionVersionResponse' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetFunctionDefinitionVersionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the function definition version.
getFunctionDefinitionVersionResponse_arn :: Lens.Lens' GetFunctionDefinitionVersionResponse (Prelude.Maybe Prelude.Text)
getFunctionDefinitionVersionResponse_arn :: Lens' GetFunctionDefinitionVersionResponse (Maybe Text)
getFunctionDefinitionVersionResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionDefinitionVersionResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:GetFunctionDefinitionVersionResponse' :: GetFunctionDefinitionVersionResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: GetFunctionDefinitionVersionResponse
s@GetFunctionDefinitionVersionResponse' {} Maybe Text
a -> GetFunctionDefinitionVersionResponse
s {$sel:arn:GetFunctionDefinitionVersionResponse' :: Maybe Text
arn = Maybe Text
a} :: GetFunctionDefinitionVersionResponse)

-- | The time, in milliseconds since the epoch, when the function definition
-- version was created.
getFunctionDefinitionVersionResponse_creationTimestamp :: Lens.Lens' GetFunctionDefinitionVersionResponse (Prelude.Maybe Prelude.Text)
getFunctionDefinitionVersionResponse_creationTimestamp :: Lens' GetFunctionDefinitionVersionResponse (Maybe Text)
getFunctionDefinitionVersionResponse_creationTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionDefinitionVersionResponse' {Maybe Text
creationTimestamp :: Maybe Text
$sel:creationTimestamp:GetFunctionDefinitionVersionResponse' :: GetFunctionDefinitionVersionResponse -> Maybe Text
creationTimestamp} -> Maybe Text
creationTimestamp) (\s :: GetFunctionDefinitionVersionResponse
s@GetFunctionDefinitionVersionResponse' {} Maybe Text
a -> GetFunctionDefinitionVersionResponse
s {$sel:creationTimestamp:GetFunctionDefinitionVersionResponse' :: Maybe Text
creationTimestamp = Maybe Text
a} :: GetFunctionDefinitionVersionResponse)

-- | Information on the definition.
getFunctionDefinitionVersionResponse_definition :: Lens.Lens' GetFunctionDefinitionVersionResponse (Prelude.Maybe FunctionDefinitionVersion)
getFunctionDefinitionVersionResponse_definition :: Lens'
  GetFunctionDefinitionVersionResponse
  (Maybe FunctionDefinitionVersion)
getFunctionDefinitionVersionResponse_definition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionDefinitionVersionResponse' {Maybe FunctionDefinitionVersion
definition :: Maybe FunctionDefinitionVersion
$sel:definition:GetFunctionDefinitionVersionResponse' :: GetFunctionDefinitionVersionResponse
-> Maybe FunctionDefinitionVersion
definition} -> Maybe FunctionDefinitionVersion
definition) (\s :: GetFunctionDefinitionVersionResponse
s@GetFunctionDefinitionVersionResponse' {} Maybe FunctionDefinitionVersion
a -> GetFunctionDefinitionVersionResponse
s {$sel:definition:GetFunctionDefinitionVersionResponse' :: Maybe FunctionDefinitionVersion
definition = Maybe FunctionDefinitionVersion
a} :: GetFunctionDefinitionVersionResponse)

-- | The ID of the function definition version.
getFunctionDefinitionVersionResponse_id :: Lens.Lens' GetFunctionDefinitionVersionResponse (Prelude.Maybe Prelude.Text)
getFunctionDefinitionVersionResponse_id :: Lens' GetFunctionDefinitionVersionResponse (Maybe Text)
getFunctionDefinitionVersionResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionDefinitionVersionResponse' {Maybe Text
id :: Maybe Text
$sel:id:GetFunctionDefinitionVersionResponse' :: GetFunctionDefinitionVersionResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: GetFunctionDefinitionVersionResponse
s@GetFunctionDefinitionVersionResponse' {} Maybe Text
a -> GetFunctionDefinitionVersionResponse
s {$sel:id:GetFunctionDefinitionVersionResponse' :: Maybe Text
id = Maybe Text
a} :: GetFunctionDefinitionVersionResponse)

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

-- | The version of the function definition version.
getFunctionDefinitionVersionResponse_version :: Lens.Lens' GetFunctionDefinitionVersionResponse (Prelude.Maybe Prelude.Text)
getFunctionDefinitionVersionResponse_version :: Lens' GetFunctionDefinitionVersionResponse (Maybe Text)
getFunctionDefinitionVersionResponse_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionDefinitionVersionResponse' {Maybe Text
version :: Maybe Text
$sel:version:GetFunctionDefinitionVersionResponse' :: GetFunctionDefinitionVersionResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: GetFunctionDefinitionVersionResponse
s@GetFunctionDefinitionVersionResponse' {} Maybe Text
a -> GetFunctionDefinitionVersionResponse
s {$sel:version:GetFunctionDefinitionVersionResponse' :: Maybe Text
version = Maybe Text
a} :: GetFunctionDefinitionVersionResponse)

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

instance
  Prelude.NFData
    GetFunctionDefinitionVersionResponse
  where
  rnf :: GetFunctionDefinitionVersionResponse -> ()
rnf GetFunctionDefinitionVersionResponse' {Int
Maybe Text
Maybe FunctionDefinitionVersion
httpStatus :: Int
version :: Maybe Text
nextToken :: Maybe Text
id :: Maybe Text
definition :: Maybe FunctionDefinitionVersion
creationTimestamp :: Maybe Text
arn :: Maybe Text
$sel:httpStatus:GetFunctionDefinitionVersionResponse' :: GetFunctionDefinitionVersionResponse -> Int
$sel:version:GetFunctionDefinitionVersionResponse' :: GetFunctionDefinitionVersionResponse -> Maybe Text
$sel:nextToken:GetFunctionDefinitionVersionResponse' :: GetFunctionDefinitionVersionResponse -> Maybe Text
$sel:id:GetFunctionDefinitionVersionResponse' :: GetFunctionDefinitionVersionResponse -> Maybe Text
$sel:definition:GetFunctionDefinitionVersionResponse' :: GetFunctionDefinitionVersionResponse
-> Maybe FunctionDefinitionVersion
$sel:creationTimestamp:GetFunctionDefinitionVersionResponse' :: GetFunctionDefinitionVersionResponse -> Maybe Text
$sel:arn:GetFunctionDefinitionVersionResponse' :: GetFunctionDefinitionVersionResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
creationTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FunctionDefinitionVersion
definition
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      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 Maybe Text
version
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus