{-# 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.UpdateFunctionEventInvokeConfig
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates the configuration for asynchronous invocation for a function,
-- version, or alias.
--
-- To configure options for asynchronous invocation, use
-- PutFunctionEventInvokeConfig.
module Amazonka.Lambda.UpdateFunctionEventInvokeConfig
  ( -- * Creating a Request
    UpdateFunctionEventInvokeConfig (..),
    newUpdateFunctionEventInvokeConfig,

    -- * Request Lenses
    updateFunctionEventInvokeConfig_destinationConfig,
    updateFunctionEventInvokeConfig_maximumEventAgeInSeconds,
    updateFunctionEventInvokeConfig_maximumRetryAttempts,
    updateFunctionEventInvokeConfig_qualifier,
    updateFunctionEventInvokeConfig_functionName,

    -- * Destructuring the Response
    FunctionEventInvokeConfig (..),
    newFunctionEventInvokeConfig,

    -- * Response Lenses
    functionEventInvokeConfig_destinationConfig,
    functionEventInvokeConfig_functionArn,
    functionEventInvokeConfig_lastModified,
    functionEventInvokeConfig_maximumEventAgeInSeconds,
    functionEventInvokeConfig_maximumRetryAttempts,
  )
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:/ 'newUpdateFunctionEventInvokeConfig' smart constructor.
data UpdateFunctionEventInvokeConfig = UpdateFunctionEventInvokeConfig'
  { -- | A destination for events after they have been sent to a function for
    -- processing.
    --
    -- __Destinations__
    --
    -- -   __Function__ - The Amazon Resource Name (ARN) of a Lambda function.
    --
    -- -   __Queue__ - The ARN of an SQS queue.
    --
    -- -   __Topic__ - The ARN of an SNS topic.
    --
    -- -   __Event Bus__ - The ARN of an Amazon EventBridge event bus.
    UpdateFunctionEventInvokeConfig -> Maybe DestinationConfig
destinationConfig :: Prelude.Maybe DestinationConfig,
    -- | The maximum age of a request that Lambda sends to a function for
    -- processing.
    UpdateFunctionEventInvokeConfig -> Maybe Natural
maximumEventAgeInSeconds :: Prelude.Maybe Prelude.Natural,
    -- | The maximum number of times to retry when the function returns an error.
    UpdateFunctionEventInvokeConfig -> Maybe Natural
maximumRetryAttempts :: Prelude.Maybe Prelude.Natural,
    -- | A version number or alias name.
    UpdateFunctionEventInvokeConfig -> Maybe Text
qualifier :: Prelude.Maybe Prelude.Text,
    -- | The name of the Lambda function, version, or alias.
    --
    -- __Name formats__
    --
    -- -   __Function name__ - @my-function@ (name-only), @my-function:v1@
    --     (with alias).
    --
    -- -   __Function ARN__ -
    --     @arn:aws:lambda:us-west-2:123456789012:function:my-function@.
    --
    -- -   __Partial ARN__ - @123456789012:function:my-function@.
    --
    -- You can append a version number or alias to any of the formats. The
    -- length constraint applies only to the full ARN. If you specify only the
    -- function name, it is limited to 64 characters in length.
    UpdateFunctionEventInvokeConfig -> Text
functionName :: Prelude.Text
  }
  deriving (UpdateFunctionEventInvokeConfig
-> UpdateFunctionEventInvokeConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFunctionEventInvokeConfig
-> UpdateFunctionEventInvokeConfig -> Bool
$c/= :: UpdateFunctionEventInvokeConfig
-> UpdateFunctionEventInvokeConfig -> Bool
== :: UpdateFunctionEventInvokeConfig
-> UpdateFunctionEventInvokeConfig -> Bool
$c== :: UpdateFunctionEventInvokeConfig
-> UpdateFunctionEventInvokeConfig -> Bool
Prelude.Eq, ReadPrec [UpdateFunctionEventInvokeConfig]
ReadPrec UpdateFunctionEventInvokeConfig
Int -> ReadS UpdateFunctionEventInvokeConfig
ReadS [UpdateFunctionEventInvokeConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFunctionEventInvokeConfig]
$creadListPrec :: ReadPrec [UpdateFunctionEventInvokeConfig]
readPrec :: ReadPrec UpdateFunctionEventInvokeConfig
$creadPrec :: ReadPrec UpdateFunctionEventInvokeConfig
readList :: ReadS [UpdateFunctionEventInvokeConfig]
$creadList :: ReadS [UpdateFunctionEventInvokeConfig]
readsPrec :: Int -> ReadS UpdateFunctionEventInvokeConfig
$creadsPrec :: Int -> ReadS UpdateFunctionEventInvokeConfig
Prelude.Read, Int -> UpdateFunctionEventInvokeConfig -> ShowS
[UpdateFunctionEventInvokeConfig] -> ShowS
UpdateFunctionEventInvokeConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFunctionEventInvokeConfig] -> ShowS
$cshowList :: [UpdateFunctionEventInvokeConfig] -> ShowS
show :: UpdateFunctionEventInvokeConfig -> String
$cshow :: UpdateFunctionEventInvokeConfig -> String
showsPrec :: Int -> UpdateFunctionEventInvokeConfig -> ShowS
$cshowsPrec :: Int -> UpdateFunctionEventInvokeConfig -> ShowS
Prelude.Show, forall x.
Rep UpdateFunctionEventInvokeConfig x
-> UpdateFunctionEventInvokeConfig
forall x.
UpdateFunctionEventInvokeConfig
-> Rep UpdateFunctionEventInvokeConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFunctionEventInvokeConfig x
-> UpdateFunctionEventInvokeConfig
$cfrom :: forall x.
UpdateFunctionEventInvokeConfig
-> Rep UpdateFunctionEventInvokeConfig x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFunctionEventInvokeConfig' 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:
--
-- 'destinationConfig', 'updateFunctionEventInvokeConfig_destinationConfig' - A destination for events after they have been sent to a function for
-- processing.
--
-- __Destinations__
--
-- -   __Function__ - The Amazon Resource Name (ARN) of a Lambda function.
--
-- -   __Queue__ - The ARN of an SQS queue.
--
-- -   __Topic__ - The ARN of an SNS topic.
--
-- -   __Event Bus__ - The ARN of an Amazon EventBridge event bus.
--
-- 'maximumEventAgeInSeconds', 'updateFunctionEventInvokeConfig_maximumEventAgeInSeconds' - The maximum age of a request that Lambda sends to a function for
-- processing.
--
-- 'maximumRetryAttempts', 'updateFunctionEventInvokeConfig_maximumRetryAttempts' - The maximum number of times to retry when the function returns an error.
--
-- 'qualifier', 'updateFunctionEventInvokeConfig_qualifier' - A version number or alias name.
--
-- 'functionName', 'updateFunctionEventInvokeConfig_functionName' - The name of the Lambda function, version, or alias.
--
-- __Name formats__
--
-- -   __Function name__ - @my-function@ (name-only), @my-function:v1@
--     (with alias).
--
-- -   __Function ARN__ -
--     @arn:aws:lambda:us-west-2:123456789012:function:my-function@.
--
-- -   __Partial ARN__ - @123456789012:function:my-function@.
--
-- You can append a version number or alias to any of the formats. The
-- length constraint applies only to the full ARN. If you specify only the
-- function name, it is limited to 64 characters in length.
newUpdateFunctionEventInvokeConfig ::
  -- | 'functionName'
  Prelude.Text ->
  UpdateFunctionEventInvokeConfig
newUpdateFunctionEventInvokeConfig :: Text -> UpdateFunctionEventInvokeConfig
newUpdateFunctionEventInvokeConfig Text
pFunctionName_ =
  UpdateFunctionEventInvokeConfig'
    { $sel:destinationConfig:UpdateFunctionEventInvokeConfig' :: Maybe DestinationConfig
destinationConfig =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maximumEventAgeInSeconds:UpdateFunctionEventInvokeConfig' :: Maybe Natural
maximumEventAgeInSeconds = forall a. Maybe a
Prelude.Nothing,
      $sel:maximumRetryAttempts:UpdateFunctionEventInvokeConfig' :: Maybe Natural
maximumRetryAttempts = forall a. Maybe a
Prelude.Nothing,
      $sel:qualifier:UpdateFunctionEventInvokeConfig' :: Maybe Text
qualifier = forall a. Maybe a
Prelude.Nothing,
      $sel:functionName:UpdateFunctionEventInvokeConfig' :: Text
functionName = Text
pFunctionName_
    }

-- | A destination for events after they have been sent to a function for
-- processing.
--
-- __Destinations__
--
-- -   __Function__ - The Amazon Resource Name (ARN) of a Lambda function.
--
-- -   __Queue__ - The ARN of an SQS queue.
--
-- -   __Topic__ - The ARN of an SNS topic.
--
-- -   __Event Bus__ - The ARN of an Amazon EventBridge event bus.
updateFunctionEventInvokeConfig_destinationConfig :: Lens.Lens' UpdateFunctionEventInvokeConfig (Prelude.Maybe DestinationConfig)
updateFunctionEventInvokeConfig_destinationConfig :: Lens' UpdateFunctionEventInvokeConfig (Maybe DestinationConfig)
updateFunctionEventInvokeConfig_destinationConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionEventInvokeConfig' {Maybe DestinationConfig
destinationConfig :: Maybe DestinationConfig
$sel:destinationConfig:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe DestinationConfig
destinationConfig} -> Maybe DestinationConfig
destinationConfig) (\s :: UpdateFunctionEventInvokeConfig
s@UpdateFunctionEventInvokeConfig' {} Maybe DestinationConfig
a -> UpdateFunctionEventInvokeConfig
s {$sel:destinationConfig:UpdateFunctionEventInvokeConfig' :: Maybe DestinationConfig
destinationConfig = Maybe DestinationConfig
a} :: UpdateFunctionEventInvokeConfig)

-- | The maximum age of a request that Lambda sends to a function for
-- processing.
updateFunctionEventInvokeConfig_maximumEventAgeInSeconds :: Lens.Lens' UpdateFunctionEventInvokeConfig (Prelude.Maybe Prelude.Natural)
updateFunctionEventInvokeConfig_maximumEventAgeInSeconds :: Lens' UpdateFunctionEventInvokeConfig (Maybe Natural)
updateFunctionEventInvokeConfig_maximumEventAgeInSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionEventInvokeConfig' {Maybe Natural
maximumEventAgeInSeconds :: Maybe Natural
$sel:maximumEventAgeInSeconds:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Natural
maximumEventAgeInSeconds} -> Maybe Natural
maximumEventAgeInSeconds) (\s :: UpdateFunctionEventInvokeConfig
s@UpdateFunctionEventInvokeConfig' {} Maybe Natural
a -> UpdateFunctionEventInvokeConfig
s {$sel:maximumEventAgeInSeconds:UpdateFunctionEventInvokeConfig' :: Maybe Natural
maximumEventAgeInSeconds = Maybe Natural
a} :: UpdateFunctionEventInvokeConfig)

-- | The maximum number of times to retry when the function returns an error.
updateFunctionEventInvokeConfig_maximumRetryAttempts :: Lens.Lens' UpdateFunctionEventInvokeConfig (Prelude.Maybe Prelude.Natural)
updateFunctionEventInvokeConfig_maximumRetryAttempts :: Lens' UpdateFunctionEventInvokeConfig (Maybe Natural)
updateFunctionEventInvokeConfig_maximumRetryAttempts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionEventInvokeConfig' {Maybe Natural
maximumRetryAttempts :: Maybe Natural
$sel:maximumRetryAttempts:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Natural
maximumRetryAttempts} -> Maybe Natural
maximumRetryAttempts) (\s :: UpdateFunctionEventInvokeConfig
s@UpdateFunctionEventInvokeConfig' {} Maybe Natural
a -> UpdateFunctionEventInvokeConfig
s {$sel:maximumRetryAttempts:UpdateFunctionEventInvokeConfig' :: Maybe Natural
maximumRetryAttempts = Maybe Natural
a} :: UpdateFunctionEventInvokeConfig)

-- | A version number or alias name.
updateFunctionEventInvokeConfig_qualifier :: Lens.Lens' UpdateFunctionEventInvokeConfig (Prelude.Maybe Prelude.Text)
updateFunctionEventInvokeConfig_qualifier :: Lens' UpdateFunctionEventInvokeConfig (Maybe Text)
updateFunctionEventInvokeConfig_qualifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionEventInvokeConfig' {Maybe Text
qualifier :: Maybe Text
$sel:qualifier:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Text
qualifier} -> Maybe Text
qualifier) (\s :: UpdateFunctionEventInvokeConfig
s@UpdateFunctionEventInvokeConfig' {} Maybe Text
a -> UpdateFunctionEventInvokeConfig
s {$sel:qualifier:UpdateFunctionEventInvokeConfig' :: Maybe Text
qualifier = Maybe Text
a} :: UpdateFunctionEventInvokeConfig)

-- | The name of the Lambda function, version, or alias.
--
-- __Name formats__
--
-- -   __Function name__ - @my-function@ (name-only), @my-function:v1@
--     (with alias).
--
-- -   __Function ARN__ -
--     @arn:aws:lambda:us-west-2:123456789012:function:my-function@.
--
-- -   __Partial ARN__ - @123456789012:function:my-function@.
--
-- You can append a version number or alias to any of the formats. The
-- length constraint applies only to the full ARN. If you specify only the
-- function name, it is limited to 64 characters in length.
updateFunctionEventInvokeConfig_functionName :: Lens.Lens' UpdateFunctionEventInvokeConfig Prelude.Text
updateFunctionEventInvokeConfig_functionName :: Lens' UpdateFunctionEventInvokeConfig Text
updateFunctionEventInvokeConfig_functionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionEventInvokeConfig' {Text
functionName :: Text
$sel:functionName:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Text
functionName} -> Text
functionName) (\s :: UpdateFunctionEventInvokeConfig
s@UpdateFunctionEventInvokeConfig' {} Text
a -> UpdateFunctionEventInvokeConfig
s {$sel:functionName:UpdateFunctionEventInvokeConfig' :: Text
functionName = Text
a} :: UpdateFunctionEventInvokeConfig)

instance
  Core.AWSRequest
    UpdateFunctionEventInvokeConfig
  where
  type
    AWSResponse UpdateFunctionEventInvokeConfig =
      FunctionEventInvokeConfig
  request :: (Service -> Service)
-> UpdateFunctionEventInvokeConfig
-> Request UpdateFunctionEventInvokeConfig
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateFunctionEventInvokeConfig
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateFunctionEventInvokeConfig)))
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 -> forall a. FromJSON a => Object -> Either String a
Data.eitherParseJSON Object
x)

instance
  Prelude.Hashable
    UpdateFunctionEventInvokeConfig
  where
  hashWithSalt :: Int -> UpdateFunctionEventInvokeConfig -> Int
hashWithSalt
    Int
_salt
    UpdateFunctionEventInvokeConfig' {Maybe Natural
Maybe Text
Maybe DestinationConfig
Text
functionName :: Text
qualifier :: Maybe Text
maximumRetryAttempts :: Maybe Natural
maximumEventAgeInSeconds :: Maybe Natural
destinationConfig :: Maybe DestinationConfig
$sel:functionName:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Text
$sel:qualifier:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Text
$sel:maximumRetryAttempts:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Natural
$sel:maximumEventAgeInSeconds:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Natural
$sel:destinationConfig:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe DestinationConfig
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DestinationConfig
destinationConfig
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maximumEventAgeInSeconds
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maximumRetryAttempts
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
qualifier
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
functionName

instance
  Prelude.NFData
    UpdateFunctionEventInvokeConfig
  where
  rnf :: UpdateFunctionEventInvokeConfig -> ()
rnf UpdateFunctionEventInvokeConfig' {Maybe Natural
Maybe Text
Maybe DestinationConfig
Text
functionName :: Text
qualifier :: Maybe Text
maximumRetryAttempts :: Maybe Natural
maximumEventAgeInSeconds :: Maybe Natural
destinationConfig :: Maybe DestinationConfig
$sel:functionName:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Text
$sel:qualifier:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Text
$sel:maximumRetryAttempts:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Natural
$sel:maximumEventAgeInSeconds:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Natural
$sel:destinationConfig:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe DestinationConfig
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe DestinationConfig
destinationConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maximumEventAgeInSeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maximumRetryAttempts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
qualifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
functionName

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

instance Data.ToJSON UpdateFunctionEventInvokeConfig where
  toJSON :: UpdateFunctionEventInvokeConfig -> Value
toJSON UpdateFunctionEventInvokeConfig' {Maybe Natural
Maybe Text
Maybe DestinationConfig
Text
functionName :: Text
qualifier :: Maybe Text
maximumRetryAttempts :: Maybe Natural
maximumEventAgeInSeconds :: Maybe Natural
destinationConfig :: Maybe DestinationConfig
$sel:functionName:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Text
$sel:qualifier:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Text
$sel:maximumRetryAttempts:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Natural
$sel:maximumEventAgeInSeconds:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Natural
$sel:destinationConfig:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe DestinationConfig
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"DestinationConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DestinationConfig
destinationConfig,
            (Key
"MaximumEventAgeInSeconds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maximumEventAgeInSeconds,
            (Key
"MaximumRetryAttempts" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maximumRetryAttempts
          ]
      )

instance Data.ToPath UpdateFunctionEventInvokeConfig where
  toPath :: UpdateFunctionEventInvokeConfig -> ByteString
toPath UpdateFunctionEventInvokeConfig' {Maybe Natural
Maybe Text
Maybe DestinationConfig
Text
functionName :: Text
qualifier :: Maybe Text
maximumRetryAttempts :: Maybe Natural
maximumEventAgeInSeconds :: Maybe Natural
destinationConfig :: Maybe DestinationConfig
$sel:functionName:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Text
$sel:qualifier:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Text
$sel:maximumRetryAttempts:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Natural
$sel:maximumEventAgeInSeconds:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Natural
$sel:destinationConfig:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe DestinationConfig
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2019-09-25/functions/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
functionName,
        ByteString
"/event-invoke-config"
      ]

instance Data.ToQuery UpdateFunctionEventInvokeConfig where
  toQuery :: UpdateFunctionEventInvokeConfig -> QueryString
toQuery UpdateFunctionEventInvokeConfig' {Maybe Natural
Maybe Text
Maybe DestinationConfig
Text
functionName :: Text
qualifier :: Maybe Text
maximumRetryAttempts :: Maybe Natural
maximumEventAgeInSeconds :: Maybe Natural
destinationConfig :: Maybe DestinationConfig
$sel:functionName:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Text
$sel:qualifier:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Text
$sel:maximumRetryAttempts:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Natural
$sel:maximumEventAgeInSeconds:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe Natural
$sel:destinationConfig:UpdateFunctionEventInvokeConfig' :: UpdateFunctionEventInvokeConfig -> Maybe DestinationConfig
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"Qualifier" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
qualifier]