{-# 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.Lambda.ListFunctionsByCodeSigningConfig
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- List the functions that use the specified code signing configuration.
-- You can use this method prior to deleting a code signing configuration,
-- to verify that no functions are using it.
--
-- This operation returns paginated results.
module Amazonka.Lambda.ListFunctionsByCodeSigningConfig
  ( -- * Creating a Request
    ListFunctionsByCodeSigningConfig (..),
    newListFunctionsByCodeSigningConfig,

    -- * Request Lenses
    listFunctionsByCodeSigningConfig_marker,
    listFunctionsByCodeSigningConfig_maxItems,
    listFunctionsByCodeSigningConfig_codeSigningConfigArn,

    -- * Destructuring the Response
    ListFunctionsByCodeSigningConfigResponse (..),
    newListFunctionsByCodeSigningConfigResponse,

    -- * Response Lenses
    listFunctionsByCodeSigningConfigResponse_functionArns,
    listFunctionsByCodeSigningConfigResponse_nextMarker,
    listFunctionsByCodeSigningConfigResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListFunctionsByCodeSigningConfig' smart constructor.
data ListFunctionsByCodeSigningConfig = ListFunctionsByCodeSigningConfig'
  { -- | Specify the pagination token that\'s returned by a previous request to
    -- retrieve the next page of results.
    ListFunctionsByCodeSigningConfig -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Maximum number of items to return.
    ListFunctionsByCodeSigningConfig -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
    -- | The The Amazon Resource Name (ARN) of the code signing configuration.
    ListFunctionsByCodeSigningConfig -> Text
codeSigningConfigArn :: Prelude.Text
  }
  deriving (ListFunctionsByCodeSigningConfig
-> ListFunctionsByCodeSigningConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFunctionsByCodeSigningConfig
-> ListFunctionsByCodeSigningConfig -> Bool
$c/= :: ListFunctionsByCodeSigningConfig
-> ListFunctionsByCodeSigningConfig -> Bool
== :: ListFunctionsByCodeSigningConfig
-> ListFunctionsByCodeSigningConfig -> Bool
$c== :: ListFunctionsByCodeSigningConfig
-> ListFunctionsByCodeSigningConfig -> Bool
Prelude.Eq, ReadPrec [ListFunctionsByCodeSigningConfig]
ReadPrec ListFunctionsByCodeSigningConfig
Int -> ReadS ListFunctionsByCodeSigningConfig
ReadS [ListFunctionsByCodeSigningConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFunctionsByCodeSigningConfig]
$creadListPrec :: ReadPrec [ListFunctionsByCodeSigningConfig]
readPrec :: ReadPrec ListFunctionsByCodeSigningConfig
$creadPrec :: ReadPrec ListFunctionsByCodeSigningConfig
readList :: ReadS [ListFunctionsByCodeSigningConfig]
$creadList :: ReadS [ListFunctionsByCodeSigningConfig]
readsPrec :: Int -> ReadS ListFunctionsByCodeSigningConfig
$creadsPrec :: Int -> ReadS ListFunctionsByCodeSigningConfig
Prelude.Read, Int -> ListFunctionsByCodeSigningConfig -> ShowS
[ListFunctionsByCodeSigningConfig] -> ShowS
ListFunctionsByCodeSigningConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFunctionsByCodeSigningConfig] -> ShowS
$cshowList :: [ListFunctionsByCodeSigningConfig] -> ShowS
show :: ListFunctionsByCodeSigningConfig -> String
$cshow :: ListFunctionsByCodeSigningConfig -> String
showsPrec :: Int -> ListFunctionsByCodeSigningConfig -> ShowS
$cshowsPrec :: Int -> ListFunctionsByCodeSigningConfig -> ShowS
Prelude.Show, forall x.
Rep ListFunctionsByCodeSigningConfig x
-> ListFunctionsByCodeSigningConfig
forall x.
ListFunctionsByCodeSigningConfig
-> Rep ListFunctionsByCodeSigningConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListFunctionsByCodeSigningConfig x
-> ListFunctionsByCodeSigningConfig
$cfrom :: forall x.
ListFunctionsByCodeSigningConfig
-> Rep ListFunctionsByCodeSigningConfig x
Prelude.Generic)

-- |
-- Create a value of 'ListFunctionsByCodeSigningConfig' 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:
--
-- 'marker', 'listFunctionsByCodeSigningConfig_marker' - Specify the pagination token that\'s returned by a previous request to
-- retrieve the next page of results.
--
-- 'maxItems', 'listFunctionsByCodeSigningConfig_maxItems' - Maximum number of items to return.
--
-- 'codeSigningConfigArn', 'listFunctionsByCodeSigningConfig_codeSigningConfigArn' - The The Amazon Resource Name (ARN) of the code signing configuration.
newListFunctionsByCodeSigningConfig ::
  -- | 'codeSigningConfigArn'
  Prelude.Text ->
  ListFunctionsByCodeSigningConfig
newListFunctionsByCodeSigningConfig :: Text -> ListFunctionsByCodeSigningConfig
newListFunctionsByCodeSigningConfig
  Text
pCodeSigningConfigArn_ =
    ListFunctionsByCodeSigningConfig'
      { $sel:marker:ListFunctionsByCodeSigningConfig' :: Maybe Text
marker =
          forall a. Maybe a
Prelude.Nothing,
        $sel:maxItems:ListFunctionsByCodeSigningConfig' :: Maybe Natural
maxItems = forall a. Maybe a
Prelude.Nothing,
        $sel:codeSigningConfigArn:ListFunctionsByCodeSigningConfig' :: Text
codeSigningConfigArn =
          Text
pCodeSigningConfigArn_
      }

-- | Specify the pagination token that\'s returned by a previous request to
-- retrieve the next page of results.
listFunctionsByCodeSigningConfig_marker :: Lens.Lens' ListFunctionsByCodeSigningConfig (Prelude.Maybe Prelude.Text)
listFunctionsByCodeSigningConfig_marker :: Lens' ListFunctionsByCodeSigningConfig (Maybe Text)
listFunctionsByCodeSigningConfig_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFunctionsByCodeSigningConfig' {Maybe Text
marker :: Maybe Text
$sel:marker:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListFunctionsByCodeSigningConfig
s@ListFunctionsByCodeSigningConfig' {} Maybe Text
a -> ListFunctionsByCodeSigningConfig
s {$sel:marker:ListFunctionsByCodeSigningConfig' :: Maybe Text
marker = Maybe Text
a} :: ListFunctionsByCodeSigningConfig)

-- | Maximum number of items to return.
listFunctionsByCodeSigningConfig_maxItems :: Lens.Lens' ListFunctionsByCodeSigningConfig (Prelude.Maybe Prelude.Natural)
listFunctionsByCodeSigningConfig_maxItems :: Lens' ListFunctionsByCodeSigningConfig (Maybe Natural)
listFunctionsByCodeSigningConfig_maxItems = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFunctionsByCodeSigningConfig' {Maybe Natural
maxItems :: Maybe Natural
$sel:maxItems:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Maybe Natural
maxItems} -> Maybe Natural
maxItems) (\s :: ListFunctionsByCodeSigningConfig
s@ListFunctionsByCodeSigningConfig' {} Maybe Natural
a -> ListFunctionsByCodeSigningConfig
s {$sel:maxItems:ListFunctionsByCodeSigningConfig' :: Maybe Natural
maxItems = Maybe Natural
a} :: ListFunctionsByCodeSigningConfig)

-- | The The Amazon Resource Name (ARN) of the code signing configuration.
listFunctionsByCodeSigningConfig_codeSigningConfigArn :: Lens.Lens' ListFunctionsByCodeSigningConfig Prelude.Text
listFunctionsByCodeSigningConfig_codeSigningConfigArn :: Lens' ListFunctionsByCodeSigningConfig Text
listFunctionsByCodeSigningConfig_codeSigningConfigArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFunctionsByCodeSigningConfig' {Text
codeSigningConfigArn :: Text
$sel:codeSigningConfigArn:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Text
codeSigningConfigArn} -> Text
codeSigningConfigArn) (\s :: ListFunctionsByCodeSigningConfig
s@ListFunctionsByCodeSigningConfig' {} Text
a -> ListFunctionsByCodeSigningConfig
s {$sel:codeSigningConfigArn:ListFunctionsByCodeSigningConfig' :: Text
codeSigningConfigArn = Text
a} :: ListFunctionsByCodeSigningConfig)

instance
  Core.AWSPager
    ListFunctionsByCodeSigningConfig
  where
  page :: ListFunctionsByCodeSigningConfig
-> AWSResponse ListFunctionsByCodeSigningConfig
-> Maybe ListFunctionsByCodeSigningConfig
page ListFunctionsByCodeSigningConfig
rq AWSResponse ListFunctionsByCodeSigningConfig
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListFunctionsByCodeSigningConfig
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListFunctionsByCodeSigningConfigResponse (Maybe Text)
listFunctionsByCodeSigningConfigResponse_nextMarker
            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 ListFunctionsByCodeSigningConfig
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListFunctionsByCodeSigningConfigResponse (Maybe [Text])
listFunctionsByCodeSigningConfigResponse_functionArns
            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.$ ListFunctionsByCodeSigningConfig
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListFunctionsByCodeSigningConfig (Maybe Text)
listFunctionsByCodeSigningConfig_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListFunctionsByCodeSigningConfig
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListFunctionsByCodeSigningConfigResponse (Maybe Text)
listFunctionsByCodeSigningConfigResponse_nextMarker
          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
    ListFunctionsByCodeSigningConfig
  where
  type
    AWSResponse ListFunctionsByCodeSigningConfig =
      ListFunctionsByCodeSigningConfigResponse
  request :: (Service -> Service)
-> ListFunctionsByCodeSigningConfig
-> Request ListFunctionsByCodeSigningConfig
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 ListFunctionsByCodeSigningConfig
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListFunctionsByCodeSigningConfig)))
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 -> Int -> ListFunctionsByCodeSigningConfigResponse
ListFunctionsByCodeSigningConfigResponse'
            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
"FunctionArns" 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.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextMarker")
            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
    ListFunctionsByCodeSigningConfig
  where
  hashWithSalt :: Int -> ListFunctionsByCodeSigningConfig -> Int
hashWithSalt
    Int
_salt
    ListFunctionsByCodeSigningConfig' {Maybe Natural
Maybe Text
Text
codeSigningConfigArn :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:codeSigningConfigArn:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Text
$sel:maxItems:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Maybe Natural
$sel:marker:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxItems
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
codeSigningConfigArn

instance
  Prelude.NFData
    ListFunctionsByCodeSigningConfig
  where
  rnf :: ListFunctionsByCodeSigningConfig -> ()
rnf ListFunctionsByCodeSigningConfig' {Maybe Natural
Maybe Text
Text
codeSigningConfigArn :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:codeSigningConfigArn:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Text
$sel:maxItems:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Maybe Natural
$sel:marker:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxItems
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
codeSigningConfigArn

instance
  Data.ToHeaders
    ListFunctionsByCodeSigningConfig
  where
  toHeaders :: ListFunctionsByCodeSigningConfig -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath ListFunctionsByCodeSigningConfig where
  toPath :: ListFunctionsByCodeSigningConfig -> ByteString
toPath ListFunctionsByCodeSigningConfig' {Maybe Natural
Maybe Text
Text
codeSigningConfigArn :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:codeSigningConfigArn:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Text
$sel:maxItems:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Maybe Natural
$sel:marker:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2020-04-22/code-signing-configs/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
codeSigningConfigArn,
        ByteString
"/functions"
      ]

instance
  Data.ToQuery
    ListFunctionsByCodeSigningConfig
  where
  toQuery :: ListFunctionsByCodeSigningConfig -> QueryString
toQuery ListFunctionsByCodeSigningConfig' {Maybe Natural
Maybe Text
Text
codeSigningConfigArn :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:codeSigningConfigArn:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Text
$sel:maxItems:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Maybe Natural
$sel:marker:ListFunctionsByCodeSigningConfig' :: ListFunctionsByCodeSigningConfig -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
        ByteString
"MaxItems" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxItems
      ]

-- | /See:/ 'newListFunctionsByCodeSigningConfigResponse' smart constructor.
data ListFunctionsByCodeSigningConfigResponse = ListFunctionsByCodeSigningConfigResponse'
  { -- | The function ARNs.
    ListFunctionsByCodeSigningConfigResponse -> Maybe [Text]
functionArns :: Prelude.Maybe [Prelude.Text],
    -- | The pagination token that\'s included if more results are available.
    ListFunctionsByCodeSigningConfigResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListFunctionsByCodeSigningConfigResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListFunctionsByCodeSigningConfigResponse
-> ListFunctionsByCodeSigningConfigResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFunctionsByCodeSigningConfigResponse
-> ListFunctionsByCodeSigningConfigResponse -> Bool
$c/= :: ListFunctionsByCodeSigningConfigResponse
-> ListFunctionsByCodeSigningConfigResponse -> Bool
== :: ListFunctionsByCodeSigningConfigResponse
-> ListFunctionsByCodeSigningConfigResponse -> Bool
$c== :: ListFunctionsByCodeSigningConfigResponse
-> ListFunctionsByCodeSigningConfigResponse -> Bool
Prelude.Eq, ReadPrec [ListFunctionsByCodeSigningConfigResponse]
ReadPrec ListFunctionsByCodeSigningConfigResponse
Int -> ReadS ListFunctionsByCodeSigningConfigResponse
ReadS [ListFunctionsByCodeSigningConfigResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFunctionsByCodeSigningConfigResponse]
$creadListPrec :: ReadPrec [ListFunctionsByCodeSigningConfigResponse]
readPrec :: ReadPrec ListFunctionsByCodeSigningConfigResponse
$creadPrec :: ReadPrec ListFunctionsByCodeSigningConfigResponse
readList :: ReadS [ListFunctionsByCodeSigningConfigResponse]
$creadList :: ReadS [ListFunctionsByCodeSigningConfigResponse]
readsPrec :: Int -> ReadS ListFunctionsByCodeSigningConfigResponse
$creadsPrec :: Int -> ReadS ListFunctionsByCodeSigningConfigResponse
Prelude.Read, Int -> ListFunctionsByCodeSigningConfigResponse -> ShowS
[ListFunctionsByCodeSigningConfigResponse] -> ShowS
ListFunctionsByCodeSigningConfigResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFunctionsByCodeSigningConfigResponse] -> ShowS
$cshowList :: [ListFunctionsByCodeSigningConfigResponse] -> ShowS
show :: ListFunctionsByCodeSigningConfigResponse -> String
$cshow :: ListFunctionsByCodeSigningConfigResponse -> String
showsPrec :: Int -> ListFunctionsByCodeSigningConfigResponse -> ShowS
$cshowsPrec :: Int -> ListFunctionsByCodeSigningConfigResponse -> ShowS
Prelude.Show, forall x.
Rep ListFunctionsByCodeSigningConfigResponse x
-> ListFunctionsByCodeSigningConfigResponse
forall x.
ListFunctionsByCodeSigningConfigResponse
-> Rep ListFunctionsByCodeSigningConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListFunctionsByCodeSigningConfigResponse x
-> ListFunctionsByCodeSigningConfigResponse
$cfrom :: forall x.
ListFunctionsByCodeSigningConfigResponse
-> Rep ListFunctionsByCodeSigningConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListFunctionsByCodeSigningConfigResponse' 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:
--
-- 'functionArns', 'listFunctionsByCodeSigningConfigResponse_functionArns' - The function ARNs.
--
-- 'nextMarker', 'listFunctionsByCodeSigningConfigResponse_nextMarker' - The pagination token that\'s included if more results are available.
--
-- 'httpStatus', 'listFunctionsByCodeSigningConfigResponse_httpStatus' - The response's http status code.
newListFunctionsByCodeSigningConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListFunctionsByCodeSigningConfigResponse
newListFunctionsByCodeSigningConfigResponse :: Int -> ListFunctionsByCodeSigningConfigResponse
newListFunctionsByCodeSigningConfigResponse
  Int
pHttpStatus_ =
    ListFunctionsByCodeSigningConfigResponse'
      { $sel:functionArns:ListFunctionsByCodeSigningConfigResponse' :: Maybe [Text]
functionArns =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextMarker:ListFunctionsByCodeSigningConfigResponse' :: Maybe Text
nextMarker = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListFunctionsByCodeSigningConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The function ARNs.
listFunctionsByCodeSigningConfigResponse_functionArns :: Lens.Lens' ListFunctionsByCodeSigningConfigResponse (Prelude.Maybe [Prelude.Text])
listFunctionsByCodeSigningConfigResponse_functionArns :: Lens' ListFunctionsByCodeSigningConfigResponse (Maybe [Text])
listFunctionsByCodeSigningConfigResponse_functionArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFunctionsByCodeSigningConfigResponse' {Maybe [Text]
functionArns :: Maybe [Text]
$sel:functionArns:ListFunctionsByCodeSigningConfigResponse' :: ListFunctionsByCodeSigningConfigResponse -> Maybe [Text]
functionArns} -> Maybe [Text]
functionArns) (\s :: ListFunctionsByCodeSigningConfigResponse
s@ListFunctionsByCodeSigningConfigResponse' {} Maybe [Text]
a -> ListFunctionsByCodeSigningConfigResponse
s {$sel:functionArns:ListFunctionsByCodeSigningConfigResponse' :: Maybe [Text]
functionArns = Maybe [Text]
a} :: ListFunctionsByCodeSigningConfigResponse) 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 pagination token that\'s included if more results are available.
listFunctionsByCodeSigningConfigResponse_nextMarker :: Lens.Lens' ListFunctionsByCodeSigningConfigResponse (Prelude.Maybe Prelude.Text)
listFunctionsByCodeSigningConfigResponse_nextMarker :: Lens' ListFunctionsByCodeSigningConfigResponse (Maybe Text)
listFunctionsByCodeSigningConfigResponse_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFunctionsByCodeSigningConfigResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListFunctionsByCodeSigningConfigResponse' :: ListFunctionsByCodeSigningConfigResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListFunctionsByCodeSigningConfigResponse
s@ListFunctionsByCodeSigningConfigResponse' {} Maybe Text
a -> ListFunctionsByCodeSigningConfigResponse
s {$sel:nextMarker:ListFunctionsByCodeSigningConfigResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListFunctionsByCodeSigningConfigResponse)

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

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