{-# 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.PutFunctionCodeSigningConfig
-- 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)
--
-- Update the code signing configuration for the function. Changes to the
-- code signing configuration take effect the next time a user tries to
-- deploy a code package to the function.
module Amazonka.Lambda.PutFunctionCodeSigningConfig
  ( -- * Creating a Request
    PutFunctionCodeSigningConfig (..),
    newPutFunctionCodeSigningConfig,

    -- * Request Lenses
    putFunctionCodeSigningConfig_codeSigningConfigArn,
    putFunctionCodeSigningConfig_functionName,

    -- * Destructuring the Response
    PutFunctionCodeSigningConfigResponse (..),
    newPutFunctionCodeSigningConfigResponse,

    -- * Response Lenses
    putFunctionCodeSigningConfigResponse_httpStatus,
    putFunctionCodeSigningConfigResponse_codeSigningConfigArn,
    putFunctionCodeSigningConfigResponse_functionName,
  )
where

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

-- | /See:/ 'newPutFunctionCodeSigningConfig' smart constructor.
data PutFunctionCodeSigningConfig = PutFunctionCodeSigningConfig'
  { -- | The The Amazon Resource Name (ARN) of the code signing configuration.
    PutFunctionCodeSigningConfig -> Text
codeSigningConfigArn :: Prelude.Text,
    -- | The name of the Lambda function.
    --
    -- __Name formats__
    --
    -- -   __Function name__ - @MyFunction@.
    --
    -- -   __Function ARN__ -
    --     @arn:aws:lambda:us-west-2:123456789012:function:MyFunction@.
    --
    -- -   __Partial ARN__ - @123456789012:function:MyFunction@.
    --
    -- The length constraint applies only to the full ARN. If you specify only
    -- the function name, it is limited to 64 characters in length.
    PutFunctionCodeSigningConfig -> Text
functionName :: Prelude.Text
  }
  deriving (PutFunctionCodeSigningConfig
-> PutFunctionCodeSigningConfig -> Bool
(PutFunctionCodeSigningConfig
 -> PutFunctionCodeSigningConfig -> Bool)
-> (PutFunctionCodeSigningConfig
    -> PutFunctionCodeSigningConfig -> Bool)
-> Eq PutFunctionCodeSigningConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutFunctionCodeSigningConfig
-> PutFunctionCodeSigningConfig -> Bool
$c/= :: PutFunctionCodeSigningConfig
-> PutFunctionCodeSigningConfig -> Bool
== :: PutFunctionCodeSigningConfig
-> PutFunctionCodeSigningConfig -> Bool
$c== :: PutFunctionCodeSigningConfig
-> PutFunctionCodeSigningConfig -> Bool
Prelude.Eq, ReadPrec [PutFunctionCodeSigningConfig]
ReadPrec PutFunctionCodeSigningConfig
Int -> ReadS PutFunctionCodeSigningConfig
ReadS [PutFunctionCodeSigningConfig]
(Int -> ReadS PutFunctionCodeSigningConfig)
-> ReadS [PutFunctionCodeSigningConfig]
-> ReadPrec PutFunctionCodeSigningConfig
-> ReadPrec [PutFunctionCodeSigningConfig]
-> Read PutFunctionCodeSigningConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutFunctionCodeSigningConfig]
$creadListPrec :: ReadPrec [PutFunctionCodeSigningConfig]
readPrec :: ReadPrec PutFunctionCodeSigningConfig
$creadPrec :: ReadPrec PutFunctionCodeSigningConfig
readList :: ReadS [PutFunctionCodeSigningConfig]
$creadList :: ReadS [PutFunctionCodeSigningConfig]
readsPrec :: Int -> ReadS PutFunctionCodeSigningConfig
$creadsPrec :: Int -> ReadS PutFunctionCodeSigningConfig
Prelude.Read, Int -> PutFunctionCodeSigningConfig -> ShowS
[PutFunctionCodeSigningConfig] -> ShowS
PutFunctionCodeSigningConfig -> String
(Int -> PutFunctionCodeSigningConfig -> ShowS)
-> (PutFunctionCodeSigningConfig -> String)
-> ([PutFunctionCodeSigningConfig] -> ShowS)
-> Show PutFunctionCodeSigningConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutFunctionCodeSigningConfig] -> ShowS
$cshowList :: [PutFunctionCodeSigningConfig] -> ShowS
show :: PutFunctionCodeSigningConfig -> String
$cshow :: PutFunctionCodeSigningConfig -> String
showsPrec :: Int -> PutFunctionCodeSigningConfig -> ShowS
$cshowsPrec :: Int -> PutFunctionCodeSigningConfig -> ShowS
Prelude.Show, (forall x.
 PutFunctionCodeSigningConfig -> Rep PutFunctionCodeSigningConfig x)
-> (forall x.
    Rep PutFunctionCodeSigningConfig x -> PutFunctionCodeSigningConfig)
-> Generic PutFunctionCodeSigningConfig
forall x.
Rep PutFunctionCodeSigningConfig x -> PutFunctionCodeSigningConfig
forall x.
PutFunctionCodeSigningConfig -> Rep PutFunctionCodeSigningConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutFunctionCodeSigningConfig x -> PutFunctionCodeSigningConfig
$cfrom :: forall x.
PutFunctionCodeSigningConfig -> Rep PutFunctionCodeSigningConfig x
Prelude.Generic)

-- |
-- Create a value of 'PutFunctionCodeSigningConfig' 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:
--
-- 'codeSigningConfigArn', 'putFunctionCodeSigningConfig_codeSigningConfigArn' - The The Amazon Resource Name (ARN) of the code signing configuration.
--
-- 'functionName', 'putFunctionCodeSigningConfig_functionName' - The name of the Lambda function.
--
-- __Name formats__
--
-- -   __Function name__ - @MyFunction@.
--
-- -   __Function ARN__ -
--     @arn:aws:lambda:us-west-2:123456789012:function:MyFunction@.
--
-- -   __Partial ARN__ - @123456789012:function:MyFunction@.
--
-- The length constraint applies only to the full ARN. If you specify only
-- the function name, it is limited to 64 characters in length.
newPutFunctionCodeSigningConfig ::
  -- | 'codeSigningConfigArn'
  Prelude.Text ->
  -- | 'functionName'
  Prelude.Text ->
  PutFunctionCodeSigningConfig
newPutFunctionCodeSigningConfig :: Text -> Text -> PutFunctionCodeSigningConfig
newPutFunctionCodeSigningConfig
  Text
pCodeSigningConfigArn_
  Text
pFunctionName_ =
    PutFunctionCodeSigningConfig' :: Text -> Text -> PutFunctionCodeSigningConfig
PutFunctionCodeSigningConfig'
      { $sel:codeSigningConfigArn:PutFunctionCodeSigningConfig' :: Text
codeSigningConfigArn =
          Text
pCodeSigningConfigArn_,
        $sel:functionName:PutFunctionCodeSigningConfig' :: Text
functionName = Text
pFunctionName_
      }

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

-- | The name of the Lambda function.
--
-- __Name formats__
--
-- -   __Function name__ - @MyFunction@.
--
-- -   __Function ARN__ -
--     @arn:aws:lambda:us-west-2:123456789012:function:MyFunction@.
--
-- -   __Partial ARN__ - @123456789012:function:MyFunction@.
--
-- The length constraint applies only to the full ARN. If you specify only
-- the function name, it is limited to 64 characters in length.
putFunctionCodeSigningConfig_functionName :: Lens.Lens' PutFunctionCodeSigningConfig Prelude.Text
putFunctionCodeSigningConfig_functionName :: (Text -> f Text)
-> PutFunctionCodeSigningConfig -> f PutFunctionCodeSigningConfig
putFunctionCodeSigningConfig_functionName = (PutFunctionCodeSigningConfig -> Text)
-> (PutFunctionCodeSigningConfig
    -> Text -> PutFunctionCodeSigningConfig)
-> Lens
     PutFunctionCodeSigningConfig PutFunctionCodeSigningConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFunctionCodeSigningConfig' {Text
functionName :: Text
$sel:functionName:PutFunctionCodeSigningConfig' :: PutFunctionCodeSigningConfig -> Text
functionName} -> Text
functionName) (\s :: PutFunctionCodeSigningConfig
s@PutFunctionCodeSigningConfig' {} Text
a -> PutFunctionCodeSigningConfig
s {$sel:functionName:PutFunctionCodeSigningConfig' :: Text
functionName = Text
a} :: PutFunctionCodeSigningConfig)

instance Core.AWSRequest PutFunctionCodeSigningConfig where
  type
    AWSResponse PutFunctionCodeSigningConfig =
      PutFunctionCodeSigningConfigResponse
  request :: PutFunctionCodeSigningConfig
-> Request PutFunctionCodeSigningConfig
request = Service
-> PutFunctionCodeSigningConfig
-> Request PutFunctionCodeSigningConfig
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy PutFunctionCodeSigningConfig
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutFunctionCodeSigningConfig)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse PutFunctionCodeSigningConfig))
-> Logger
-> Service
-> Proxy PutFunctionCodeSigningConfig
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutFunctionCodeSigningConfig)))
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 ->
          Int -> Text -> Text -> PutFunctionCodeSigningConfigResponse
PutFunctionCodeSigningConfigResponse'
            (Int -> Text -> Text -> PutFunctionCodeSigningConfigResponse)
-> Either String Int
-> Either
     String (Text -> Text -> PutFunctionCodeSigningConfigResponse)
forall (f :: * -> *) a b. Functor 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))
            Either
  String (Text -> Text -> PutFunctionCodeSigningConfigResponse)
-> Either String Text
-> Either String (Text -> PutFunctionCodeSigningConfigResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CodeSigningConfigArn")
            Either String (Text -> PutFunctionCodeSigningConfigResponse)
-> Either String Text
-> Either String PutFunctionCodeSigningConfigResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"FunctionName")
      )

instance
  Prelude.Hashable
    PutFunctionCodeSigningConfig

instance Prelude.NFData PutFunctionCodeSigningConfig

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

instance Core.ToJSON PutFunctionCodeSigningConfig where
  toJSON :: PutFunctionCodeSigningConfig -> Value
toJSON PutFunctionCodeSigningConfig' {Text
functionName :: Text
codeSigningConfigArn :: Text
$sel:functionName:PutFunctionCodeSigningConfig' :: PutFunctionCodeSigningConfig -> Text
$sel:codeSigningConfigArn:PutFunctionCodeSigningConfig' :: PutFunctionCodeSigningConfig -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"CodeSigningConfigArn"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
codeSigningConfigArn
              )
          ]
      )

instance Core.ToPath PutFunctionCodeSigningConfig where
  toPath :: PutFunctionCodeSigningConfig -> ByteString
toPath PutFunctionCodeSigningConfig' {Text
functionName :: Text
codeSigningConfigArn :: Text
$sel:functionName:PutFunctionCodeSigningConfig' :: PutFunctionCodeSigningConfig -> Text
$sel:codeSigningConfigArn:PutFunctionCodeSigningConfig' :: PutFunctionCodeSigningConfig -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2020-06-30/functions/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
functionName,
        ByteString
"/code-signing-config"
      ]

instance Core.ToQuery PutFunctionCodeSigningConfig where
  toQuery :: PutFunctionCodeSigningConfig -> QueryString
toQuery = QueryString -> PutFunctionCodeSigningConfig -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newPutFunctionCodeSigningConfigResponse' smart constructor.
data PutFunctionCodeSigningConfigResponse = PutFunctionCodeSigningConfigResponse'
  { -- | The response's http status code.
    PutFunctionCodeSigningConfigResponse -> Int
httpStatus :: Prelude.Int,
    -- | The The Amazon Resource Name (ARN) of the code signing configuration.
    PutFunctionCodeSigningConfigResponse -> Text
codeSigningConfigArn :: Prelude.Text,
    -- | The name of the Lambda function.
    --
    -- __Name formats__
    --
    -- -   __Function name__ - @MyFunction@.
    --
    -- -   __Function ARN__ -
    --     @arn:aws:lambda:us-west-2:123456789012:function:MyFunction@.
    --
    -- -   __Partial ARN__ - @123456789012:function:MyFunction@.
    --
    -- The length constraint applies only to the full ARN. If you specify only
    -- the function name, it is limited to 64 characters in length.
    PutFunctionCodeSigningConfigResponse -> Text
functionName :: Prelude.Text
  }
  deriving (PutFunctionCodeSigningConfigResponse
-> PutFunctionCodeSigningConfigResponse -> Bool
(PutFunctionCodeSigningConfigResponse
 -> PutFunctionCodeSigningConfigResponse -> Bool)
-> (PutFunctionCodeSigningConfigResponse
    -> PutFunctionCodeSigningConfigResponse -> Bool)
-> Eq PutFunctionCodeSigningConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutFunctionCodeSigningConfigResponse
-> PutFunctionCodeSigningConfigResponse -> Bool
$c/= :: PutFunctionCodeSigningConfigResponse
-> PutFunctionCodeSigningConfigResponse -> Bool
== :: PutFunctionCodeSigningConfigResponse
-> PutFunctionCodeSigningConfigResponse -> Bool
$c== :: PutFunctionCodeSigningConfigResponse
-> PutFunctionCodeSigningConfigResponse -> Bool
Prelude.Eq, ReadPrec [PutFunctionCodeSigningConfigResponse]
ReadPrec PutFunctionCodeSigningConfigResponse
Int -> ReadS PutFunctionCodeSigningConfigResponse
ReadS [PutFunctionCodeSigningConfigResponse]
(Int -> ReadS PutFunctionCodeSigningConfigResponse)
-> ReadS [PutFunctionCodeSigningConfigResponse]
-> ReadPrec PutFunctionCodeSigningConfigResponse
-> ReadPrec [PutFunctionCodeSigningConfigResponse]
-> Read PutFunctionCodeSigningConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutFunctionCodeSigningConfigResponse]
$creadListPrec :: ReadPrec [PutFunctionCodeSigningConfigResponse]
readPrec :: ReadPrec PutFunctionCodeSigningConfigResponse
$creadPrec :: ReadPrec PutFunctionCodeSigningConfigResponse
readList :: ReadS [PutFunctionCodeSigningConfigResponse]
$creadList :: ReadS [PutFunctionCodeSigningConfigResponse]
readsPrec :: Int -> ReadS PutFunctionCodeSigningConfigResponse
$creadsPrec :: Int -> ReadS PutFunctionCodeSigningConfigResponse
Prelude.Read, Int -> PutFunctionCodeSigningConfigResponse -> ShowS
[PutFunctionCodeSigningConfigResponse] -> ShowS
PutFunctionCodeSigningConfigResponse -> String
(Int -> PutFunctionCodeSigningConfigResponse -> ShowS)
-> (PutFunctionCodeSigningConfigResponse -> String)
-> ([PutFunctionCodeSigningConfigResponse] -> ShowS)
-> Show PutFunctionCodeSigningConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutFunctionCodeSigningConfigResponse] -> ShowS
$cshowList :: [PutFunctionCodeSigningConfigResponse] -> ShowS
show :: PutFunctionCodeSigningConfigResponse -> String
$cshow :: PutFunctionCodeSigningConfigResponse -> String
showsPrec :: Int -> PutFunctionCodeSigningConfigResponse -> ShowS
$cshowsPrec :: Int -> PutFunctionCodeSigningConfigResponse -> ShowS
Prelude.Show, (forall x.
 PutFunctionCodeSigningConfigResponse
 -> Rep PutFunctionCodeSigningConfigResponse x)
-> (forall x.
    Rep PutFunctionCodeSigningConfigResponse x
    -> PutFunctionCodeSigningConfigResponse)
-> Generic PutFunctionCodeSigningConfigResponse
forall x.
Rep PutFunctionCodeSigningConfigResponse x
-> PutFunctionCodeSigningConfigResponse
forall x.
PutFunctionCodeSigningConfigResponse
-> Rep PutFunctionCodeSigningConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutFunctionCodeSigningConfigResponse x
-> PutFunctionCodeSigningConfigResponse
$cfrom :: forall x.
PutFunctionCodeSigningConfigResponse
-> Rep PutFunctionCodeSigningConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutFunctionCodeSigningConfigResponse' 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:
--
-- 'httpStatus', 'putFunctionCodeSigningConfigResponse_httpStatus' - The response's http status code.
--
-- 'codeSigningConfigArn', 'putFunctionCodeSigningConfigResponse_codeSigningConfigArn' - The The Amazon Resource Name (ARN) of the code signing configuration.
--
-- 'functionName', 'putFunctionCodeSigningConfigResponse_functionName' - The name of the Lambda function.
--
-- __Name formats__
--
-- -   __Function name__ - @MyFunction@.
--
-- -   __Function ARN__ -
--     @arn:aws:lambda:us-west-2:123456789012:function:MyFunction@.
--
-- -   __Partial ARN__ - @123456789012:function:MyFunction@.
--
-- The length constraint applies only to the full ARN. If you specify only
-- the function name, it is limited to 64 characters in length.
newPutFunctionCodeSigningConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'codeSigningConfigArn'
  Prelude.Text ->
  -- | 'functionName'
  Prelude.Text ->
  PutFunctionCodeSigningConfigResponse
newPutFunctionCodeSigningConfigResponse :: Int -> Text -> Text -> PutFunctionCodeSigningConfigResponse
newPutFunctionCodeSigningConfigResponse
  Int
pHttpStatus_
  Text
pCodeSigningConfigArn_
  Text
pFunctionName_ =
    PutFunctionCodeSigningConfigResponse' :: Int -> Text -> Text -> PutFunctionCodeSigningConfigResponse
PutFunctionCodeSigningConfigResponse'
      { $sel:httpStatus:PutFunctionCodeSigningConfigResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:codeSigningConfigArn:PutFunctionCodeSigningConfigResponse' :: Text
codeSigningConfigArn =
          Text
pCodeSigningConfigArn_,
        $sel:functionName:PutFunctionCodeSigningConfigResponse' :: Text
functionName = Text
pFunctionName_
      }

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

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

-- | The name of the Lambda function.
--
-- __Name formats__
--
-- -   __Function name__ - @MyFunction@.
--
-- -   __Function ARN__ -
--     @arn:aws:lambda:us-west-2:123456789012:function:MyFunction@.
--
-- -   __Partial ARN__ - @123456789012:function:MyFunction@.
--
-- The length constraint applies only to the full ARN. If you specify only
-- the function name, it is limited to 64 characters in length.
putFunctionCodeSigningConfigResponse_functionName :: Lens.Lens' PutFunctionCodeSigningConfigResponse Prelude.Text
putFunctionCodeSigningConfigResponse_functionName :: (Text -> f Text)
-> PutFunctionCodeSigningConfigResponse
-> f PutFunctionCodeSigningConfigResponse
putFunctionCodeSigningConfigResponse_functionName = (PutFunctionCodeSigningConfigResponse -> Text)
-> (PutFunctionCodeSigningConfigResponse
    -> Text -> PutFunctionCodeSigningConfigResponse)
-> Lens
     PutFunctionCodeSigningConfigResponse
     PutFunctionCodeSigningConfigResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFunctionCodeSigningConfigResponse' {Text
functionName :: Text
$sel:functionName:PutFunctionCodeSigningConfigResponse' :: PutFunctionCodeSigningConfigResponse -> Text
functionName} -> Text
functionName) (\s :: PutFunctionCodeSigningConfigResponse
s@PutFunctionCodeSigningConfigResponse' {} Text
a -> PutFunctionCodeSigningConfigResponse
s {$sel:functionName:PutFunctionCodeSigningConfigResponse' :: Text
functionName = Text
a} :: PutFunctionCodeSigningConfigResponse)

instance
  Prelude.NFData
    PutFunctionCodeSigningConfigResponse