{-# 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.DeleteFunctionConcurrency
-- 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)
--
-- Removes a concurrent execution limit from a function.
module Amazonka.Lambda.DeleteFunctionConcurrency
  ( -- * Creating a Request
    DeleteFunctionConcurrency (..),
    newDeleteFunctionConcurrency,

    -- * Request Lenses
    deleteFunctionConcurrency_functionName,

    -- * Destructuring the Response
    DeleteFunctionConcurrencyResponse (..),
    newDeleteFunctionConcurrencyResponse,
  )
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:/ 'newDeleteFunctionConcurrency' smart constructor.
data DeleteFunctionConcurrency = DeleteFunctionConcurrency'
  { -- | The name of the Lambda function.
    --
    -- __Name formats__
    --
    -- -   __Function name__ - @my-function@.
    --
    -- -   __Function ARN__ -
    --     @arn:aws:lambda:us-west-2:123456789012:function:my-function@.
    --
    -- -   __Partial ARN__ - @123456789012:function:my-function@.
    --
    -- The length constraint applies only to the full ARN. If you specify only
    -- the function name, it is limited to 64 characters in length.
    DeleteFunctionConcurrency -> Text
functionName :: Prelude.Text
  }
  deriving (DeleteFunctionConcurrency -> DeleteFunctionConcurrency -> Bool
(DeleteFunctionConcurrency -> DeleteFunctionConcurrency -> Bool)
-> (DeleteFunctionConcurrency -> DeleteFunctionConcurrency -> Bool)
-> Eq DeleteFunctionConcurrency
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFunctionConcurrency -> DeleteFunctionConcurrency -> Bool
$c/= :: DeleteFunctionConcurrency -> DeleteFunctionConcurrency -> Bool
== :: DeleteFunctionConcurrency -> DeleteFunctionConcurrency -> Bool
$c== :: DeleteFunctionConcurrency -> DeleteFunctionConcurrency -> Bool
Prelude.Eq, ReadPrec [DeleteFunctionConcurrency]
ReadPrec DeleteFunctionConcurrency
Int -> ReadS DeleteFunctionConcurrency
ReadS [DeleteFunctionConcurrency]
(Int -> ReadS DeleteFunctionConcurrency)
-> ReadS [DeleteFunctionConcurrency]
-> ReadPrec DeleteFunctionConcurrency
-> ReadPrec [DeleteFunctionConcurrency]
-> Read DeleteFunctionConcurrency
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFunctionConcurrency]
$creadListPrec :: ReadPrec [DeleteFunctionConcurrency]
readPrec :: ReadPrec DeleteFunctionConcurrency
$creadPrec :: ReadPrec DeleteFunctionConcurrency
readList :: ReadS [DeleteFunctionConcurrency]
$creadList :: ReadS [DeleteFunctionConcurrency]
readsPrec :: Int -> ReadS DeleteFunctionConcurrency
$creadsPrec :: Int -> ReadS DeleteFunctionConcurrency
Prelude.Read, Int -> DeleteFunctionConcurrency -> ShowS
[DeleteFunctionConcurrency] -> ShowS
DeleteFunctionConcurrency -> String
(Int -> DeleteFunctionConcurrency -> ShowS)
-> (DeleteFunctionConcurrency -> String)
-> ([DeleteFunctionConcurrency] -> ShowS)
-> Show DeleteFunctionConcurrency
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFunctionConcurrency] -> ShowS
$cshowList :: [DeleteFunctionConcurrency] -> ShowS
show :: DeleteFunctionConcurrency -> String
$cshow :: DeleteFunctionConcurrency -> String
showsPrec :: Int -> DeleteFunctionConcurrency -> ShowS
$cshowsPrec :: Int -> DeleteFunctionConcurrency -> ShowS
Prelude.Show, (forall x.
 DeleteFunctionConcurrency -> Rep DeleteFunctionConcurrency x)
-> (forall x.
    Rep DeleteFunctionConcurrency x -> DeleteFunctionConcurrency)
-> Generic DeleteFunctionConcurrency
forall x.
Rep DeleteFunctionConcurrency x -> DeleteFunctionConcurrency
forall x.
DeleteFunctionConcurrency -> Rep DeleteFunctionConcurrency x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteFunctionConcurrency x -> DeleteFunctionConcurrency
$cfrom :: forall x.
DeleteFunctionConcurrency -> Rep DeleteFunctionConcurrency x
Prelude.Generic)

-- |
-- Create a value of 'DeleteFunctionConcurrency' 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:
--
-- 'functionName', 'deleteFunctionConcurrency_functionName' - The name of the Lambda function.
--
-- __Name formats__
--
-- -   __Function name__ - @my-function@.
--
-- -   __Function ARN__ -
--     @arn:aws:lambda:us-west-2:123456789012:function:my-function@.
--
-- -   __Partial ARN__ - @123456789012:function:my-function@.
--
-- The length constraint applies only to the full ARN. If you specify only
-- the function name, it is limited to 64 characters in length.
newDeleteFunctionConcurrency ::
  -- | 'functionName'
  Prelude.Text ->
  DeleteFunctionConcurrency
newDeleteFunctionConcurrency :: Text -> DeleteFunctionConcurrency
newDeleteFunctionConcurrency Text
pFunctionName_ =
  DeleteFunctionConcurrency' :: Text -> DeleteFunctionConcurrency
DeleteFunctionConcurrency'
    { $sel:functionName:DeleteFunctionConcurrency' :: Text
functionName =
        Text
pFunctionName_
    }

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

instance Core.AWSRequest DeleteFunctionConcurrency where
  type
    AWSResponse DeleteFunctionConcurrency =
      DeleteFunctionConcurrencyResponse
  request :: DeleteFunctionConcurrency -> Request DeleteFunctionConcurrency
request = Service
-> DeleteFunctionConcurrency -> Request DeleteFunctionConcurrency
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteFunctionConcurrency
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteFunctionConcurrency)))
response =
    AWSResponse DeleteFunctionConcurrency
-> Logger
-> Service
-> Proxy DeleteFunctionConcurrency
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteFunctionConcurrency)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      AWSResponse DeleteFunctionConcurrency
DeleteFunctionConcurrencyResponse
DeleteFunctionConcurrencyResponse'

instance Prelude.Hashable DeleteFunctionConcurrency

instance Prelude.NFData DeleteFunctionConcurrency

instance Core.ToHeaders DeleteFunctionConcurrency where
  toHeaders :: DeleteFunctionConcurrency -> [Header]
toHeaders = [Header] -> DeleteFunctionConcurrency -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath DeleteFunctionConcurrency where
  toPath :: DeleteFunctionConcurrency -> ByteString
toPath DeleteFunctionConcurrency' {Text
functionName :: Text
$sel:functionName:DeleteFunctionConcurrency' :: DeleteFunctionConcurrency -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2017-10-31/functions/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
functionName,
        ByteString
"/concurrency"
      ]

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

-- | /See:/ 'newDeleteFunctionConcurrencyResponse' smart constructor.
data DeleteFunctionConcurrencyResponse = DeleteFunctionConcurrencyResponse'
  {
  }
  deriving (DeleteFunctionConcurrencyResponse
-> DeleteFunctionConcurrencyResponse -> Bool
(DeleteFunctionConcurrencyResponse
 -> DeleteFunctionConcurrencyResponse -> Bool)
-> (DeleteFunctionConcurrencyResponse
    -> DeleteFunctionConcurrencyResponse -> Bool)
-> Eq DeleteFunctionConcurrencyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFunctionConcurrencyResponse
-> DeleteFunctionConcurrencyResponse -> Bool
$c/= :: DeleteFunctionConcurrencyResponse
-> DeleteFunctionConcurrencyResponse -> Bool
== :: DeleteFunctionConcurrencyResponse
-> DeleteFunctionConcurrencyResponse -> Bool
$c== :: DeleteFunctionConcurrencyResponse
-> DeleteFunctionConcurrencyResponse -> Bool
Prelude.Eq, ReadPrec [DeleteFunctionConcurrencyResponse]
ReadPrec DeleteFunctionConcurrencyResponse
Int -> ReadS DeleteFunctionConcurrencyResponse
ReadS [DeleteFunctionConcurrencyResponse]
(Int -> ReadS DeleteFunctionConcurrencyResponse)
-> ReadS [DeleteFunctionConcurrencyResponse]
-> ReadPrec DeleteFunctionConcurrencyResponse
-> ReadPrec [DeleteFunctionConcurrencyResponse]
-> Read DeleteFunctionConcurrencyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFunctionConcurrencyResponse]
$creadListPrec :: ReadPrec [DeleteFunctionConcurrencyResponse]
readPrec :: ReadPrec DeleteFunctionConcurrencyResponse
$creadPrec :: ReadPrec DeleteFunctionConcurrencyResponse
readList :: ReadS [DeleteFunctionConcurrencyResponse]
$creadList :: ReadS [DeleteFunctionConcurrencyResponse]
readsPrec :: Int -> ReadS DeleteFunctionConcurrencyResponse
$creadsPrec :: Int -> ReadS DeleteFunctionConcurrencyResponse
Prelude.Read, Int -> DeleteFunctionConcurrencyResponse -> ShowS
[DeleteFunctionConcurrencyResponse] -> ShowS
DeleteFunctionConcurrencyResponse -> String
(Int -> DeleteFunctionConcurrencyResponse -> ShowS)
-> (DeleteFunctionConcurrencyResponse -> String)
-> ([DeleteFunctionConcurrencyResponse] -> ShowS)
-> Show DeleteFunctionConcurrencyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFunctionConcurrencyResponse] -> ShowS
$cshowList :: [DeleteFunctionConcurrencyResponse] -> ShowS
show :: DeleteFunctionConcurrencyResponse -> String
$cshow :: DeleteFunctionConcurrencyResponse -> String
showsPrec :: Int -> DeleteFunctionConcurrencyResponse -> ShowS
$cshowsPrec :: Int -> DeleteFunctionConcurrencyResponse -> ShowS
Prelude.Show, (forall x.
 DeleteFunctionConcurrencyResponse
 -> Rep DeleteFunctionConcurrencyResponse x)
-> (forall x.
    Rep DeleteFunctionConcurrencyResponse x
    -> DeleteFunctionConcurrencyResponse)
-> Generic DeleteFunctionConcurrencyResponse
forall x.
Rep DeleteFunctionConcurrencyResponse x
-> DeleteFunctionConcurrencyResponse
forall x.
DeleteFunctionConcurrencyResponse
-> Rep DeleteFunctionConcurrencyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteFunctionConcurrencyResponse x
-> DeleteFunctionConcurrencyResponse
$cfrom :: forall x.
DeleteFunctionConcurrencyResponse
-> Rep DeleteFunctionConcurrencyResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteFunctionConcurrencyResponse' 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.
newDeleteFunctionConcurrencyResponse ::
  DeleteFunctionConcurrencyResponse
newDeleteFunctionConcurrencyResponse :: DeleteFunctionConcurrencyResponse
newDeleteFunctionConcurrencyResponse =
  DeleteFunctionConcurrencyResponse
DeleteFunctionConcurrencyResponse'

instance
  Prelude.NFData
    DeleteFunctionConcurrencyResponse