{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CodePipeline.Types.WebhookDefinition
-- 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)
module Amazonka.CodePipeline.Types.WebhookDefinition where

import Amazonka.CodePipeline.Types.WebhookAuthConfiguration
import Amazonka.CodePipeline.Types.WebhookAuthenticationType
import Amazonka.CodePipeline.Types.WebhookFilterRule
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents information about a webhook and its definition.
--
-- /See:/ 'newWebhookDefinition' smart constructor.
data WebhookDefinition = WebhookDefinition'
  { -- | The name of the webhook.
    WebhookDefinition -> Text
name :: Prelude.Text,
    -- | The name of the pipeline you want to connect to the webhook.
    WebhookDefinition -> Text
targetPipeline :: Prelude.Text,
    -- | The name of the action in a pipeline you want to connect to the webhook.
    -- The action must be from the source (first) stage of the pipeline.
    WebhookDefinition -> Text
targetAction :: Prelude.Text,
    -- | A list of rules applied to the body\/payload sent in the POST request to
    -- a webhook URL. All defined rules must pass for the request to be
    -- accepted and the pipeline started.
    WebhookDefinition -> [WebhookFilterRule]
filters :: [WebhookFilterRule],
    -- | Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED.
    --
    -- -   For information about the authentication scheme implemented by
    --     GITHUB_HMAC, see
    --     <https://developer.github.com/webhooks/securing/ Securing your webhooks>
    --     on the GitHub Developer website.
    --
    -- -   IP rejects webhooks trigger requests unless they originate from an
    --     IP address in the IP range whitelisted in the authentication
    --     configuration.
    --
    -- -   UNAUTHENTICATED accepts all webhook trigger requests regardless of
    --     origin.
    WebhookDefinition -> WebhookAuthenticationType
authentication :: WebhookAuthenticationType,
    -- | Properties that configure the authentication applied to incoming webhook
    -- trigger requests. The required properties depend on the authentication
    -- type. For GITHUB_HMAC, only the @SecretToken @property must be set. For
    -- IP, only the @AllowedIPRange @property must be set to a valid CIDR
    -- range. For UNAUTHENTICATED, no properties can be set.
    WebhookDefinition -> WebhookAuthConfiguration
authenticationConfiguration :: WebhookAuthConfiguration
  }
  deriving (WebhookDefinition -> WebhookDefinition -> Bool
(WebhookDefinition -> WebhookDefinition -> Bool)
-> (WebhookDefinition -> WebhookDefinition -> Bool)
-> Eq WebhookDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WebhookDefinition -> WebhookDefinition -> Bool
$c/= :: WebhookDefinition -> WebhookDefinition -> Bool
== :: WebhookDefinition -> WebhookDefinition -> Bool
$c== :: WebhookDefinition -> WebhookDefinition -> Bool
Prelude.Eq, ReadPrec [WebhookDefinition]
ReadPrec WebhookDefinition
Int -> ReadS WebhookDefinition
ReadS [WebhookDefinition]
(Int -> ReadS WebhookDefinition)
-> ReadS [WebhookDefinition]
-> ReadPrec WebhookDefinition
-> ReadPrec [WebhookDefinition]
-> Read WebhookDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WebhookDefinition]
$creadListPrec :: ReadPrec [WebhookDefinition]
readPrec :: ReadPrec WebhookDefinition
$creadPrec :: ReadPrec WebhookDefinition
readList :: ReadS [WebhookDefinition]
$creadList :: ReadS [WebhookDefinition]
readsPrec :: Int -> ReadS WebhookDefinition
$creadsPrec :: Int -> ReadS WebhookDefinition
Prelude.Read, Int -> WebhookDefinition -> ShowS
[WebhookDefinition] -> ShowS
WebhookDefinition -> String
(Int -> WebhookDefinition -> ShowS)
-> (WebhookDefinition -> String)
-> ([WebhookDefinition] -> ShowS)
-> Show WebhookDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WebhookDefinition] -> ShowS
$cshowList :: [WebhookDefinition] -> ShowS
show :: WebhookDefinition -> String
$cshow :: WebhookDefinition -> String
showsPrec :: Int -> WebhookDefinition -> ShowS
$cshowsPrec :: Int -> WebhookDefinition -> ShowS
Prelude.Show, (forall x. WebhookDefinition -> Rep WebhookDefinition x)
-> (forall x. Rep WebhookDefinition x -> WebhookDefinition)
-> Generic WebhookDefinition
forall x. Rep WebhookDefinition x -> WebhookDefinition
forall x. WebhookDefinition -> Rep WebhookDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WebhookDefinition x -> WebhookDefinition
$cfrom :: forall x. WebhookDefinition -> Rep WebhookDefinition x
Prelude.Generic)

-- |
-- Create a value of 'WebhookDefinition' 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:
--
-- 'name', 'webhookDefinition_name' - The name of the webhook.
--
-- 'targetPipeline', 'webhookDefinition_targetPipeline' - The name of the pipeline you want to connect to the webhook.
--
-- 'targetAction', 'webhookDefinition_targetAction' - The name of the action in a pipeline you want to connect to the webhook.
-- The action must be from the source (first) stage of the pipeline.
--
-- 'filters', 'webhookDefinition_filters' - A list of rules applied to the body\/payload sent in the POST request to
-- a webhook URL. All defined rules must pass for the request to be
-- accepted and the pipeline started.
--
-- 'authentication', 'webhookDefinition_authentication' - Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED.
--
-- -   For information about the authentication scheme implemented by
--     GITHUB_HMAC, see
--     <https://developer.github.com/webhooks/securing/ Securing your webhooks>
--     on the GitHub Developer website.
--
-- -   IP rejects webhooks trigger requests unless they originate from an
--     IP address in the IP range whitelisted in the authentication
--     configuration.
--
-- -   UNAUTHENTICATED accepts all webhook trigger requests regardless of
--     origin.
--
-- 'authenticationConfiguration', 'webhookDefinition_authenticationConfiguration' - Properties that configure the authentication applied to incoming webhook
-- trigger requests. The required properties depend on the authentication
-- type. For GITHUB_HMAC, only the @SecretToken @property must be set. For
-- IP, only the @AllowedIPRange @property must be set to a valid CIDR
-- range. For UNAUTHENTICATED, no properties can be set.
newWebhookDefinition ::
  -- | 'name'
  Prelude.Text ->
  -- | 'targetPipeline'
  Prelude.Text ->
  -- | 'targetAction'
  Prelude.Text ->
  -- | 'authentication'
  WebhookAuthenticationType ->
  -- | 'authenticationConfiguration'
  WebhookAuthConfiguration ->
  WebhookDefinition
newWebhookDefinition :: Text
-> Text
-> Text
-> WebhookAuthenticationType
-> WebhookAuthConfiguration
-> WebhookDefinition
newWebhookDefinition
  Text
pName_
  Text
pTargetPipeline_
  Text
pTargetAction_
  WebhookAuthenticationType
pAuthentication_
  WebhookAuthConfiguration
pAuthenticationConfiguration_ =
    WebhookDefinition' :: Text
-> Text
-> Text
-> [WebhookFilterRule]
-> WebhookAuthenticationType
-> WebhookAuthConfiguration
-> WebhookDefinition
WebhookDefinition'
      { $sel:name:WebhookDefinition' :: Text
name = Text
pName_,
        $sel:targetPipeline:WebhookDefinition' :: Text
targetPipeline = Text
pTargetPipeline_,
        $sel:targetAction:WebhookDefinition' :: Text
targetAction = Text
pTargetAction_,
        $sel:filters:WebhookDefinition' :: [WebhookFilterRule]
filters = [WebhookFilterRule]
forall a. Monoid a => a
Prelude.mempty,
        $sel:authentication:WebhookDefinition' :: WebhookAuthenticationType
authentication = WebhookAuthenticationType
pAuthentication_,
        $sel:authenticationConfiguration:WebhookDefinition' :: WebhookAuthConfiguration
authenticationConfiguration =
          WebhookAuthConfiguration
pAuthenticationConfiguration_
      }

-- | The name of the webhook.
webhookDefinition_name :: Lens.Lens' WebhookDefinition Prelude.Text
webhookDefinition_name :: (Text -> f Text) -> WebhookDefinition -> f WebhookDefinition
webhookDefinition_name = (WebhookDefinition -> Text)
-> (WebhookDefinition -> Text -> WebhookDefinition)
-> Lens WebhookDefinition WebhookDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WebhookDefinition' {Text
name :: Text
$sel:name:WebhookDefinition' :: WebhookDefinition -> Text
name} -> Text
name) (\s :: WebhookDefinition
s@WebhookDefinition' {} Text
a -> WebhookDefinition
s {$sel:name:WebhookDefinition' :: Text
name = Text
a} :: WebhookDefinition)

-- | The name of the pipeline you want to connect to the webhook.
webhookDefinition_targetPipeline :: Lens.Lens' WebhookDefinition Prelude.Text
webhookDefinition_targetPipeline :: (Text -> f Text) -> WebhookDefinition -> f WebhookDefinition
webhookDefinition_targetPipeline = (WebhookDefinition -> Text)
-> (WebhookDefinition -> Text -> WebhookDefinition)
-> Lens WebhookDefinition WebhookDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WebhookDefinition' {Text
targetPipeline :: Text
$sel:targetPipeline:WebhookDefinition' :: WebhookDefinition -> Text
targetPipeline} -> Text
targetPipeline) (\s :: WebhookDefinition
s@WebhookDefinition' {} Text
a -> WebhookDefinition
s {$sel:targetPipeline:WebhookDefinition' :: Text
targetPipeline = Text
a} :: WebhookDefinition)

-- | The name of the action in a pipeline you want to connect to the webhook.
-- The action must be from the source (first) stage of the pipeline.
webhookDefinition_targetAction :: Lens.Lens' WebhookDefinition Prelude.Text
webhookDefinition_targetAction :: (Text -> f Text) -> WebhookDefinition -> f WebhookDefinition
webhookDefinition_targetAction = (WebhookDefinition -> Text)
-> (WebhookDefinition -> Text -> WebhookDefinition)
-> Lens WebhookDefinition WebhookDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WebhookDefinition' {Text
targetAction :: Text
$sel:targetAction:WebhookDefinition' :: WebhookDefinition -> Text
targetAction} -> Text
targetAction) (\s :: WebhookDefinition
s@WebhookDefinition' {} Text
a -> WebhookDefinition
s {$sel:targetAction:WebhookDefinition' :: Text
targetAction = Text
a} :: WebhookDefinition)

-- | A list of rules applied to the body\/payload sent in the POST request to
-- a webhook URL. All defined rules must pass for the request to be
-- accepted and the pipeline started.
webhookDefinition_filters :: Lens.Lens' WebhookDefinition [WebhookFilterRule]
webhookDefinition_filters :: ([WebhookFilterRule] -> f [WebhookFilterRule])
-> WebhookDefinition -> f WebhookDefinition
webhookDefinition_filters = (WebhookDefinition -> [WebhookFilterRule])
-> (WebhookDefinition -> [WebhookFilterRule] -> WebhookDefinition)
-> Lens
     WebhookDefinition
     WebhookDefinition
     [WebhookFilterRule]
     [WebhookFilterRule]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WebhookDefinition' {[WebhookFilterRule]
filters :: [WebhookFilterRule]
$sel:filters:WebhookDefinition' :: WebhookDefinition -> [WebhookFilterRule]
filters} -> [WebhookFilterRule]
filters) (\s :: WebhookDefinition
s@WebhookDefinition' {} [WebhookFilterRule]
a -> WebhookDefinition
s {$sel:filters:WebhookDefinition' :: [WebhookFilterRule]
filters = [WebhookFilterRule]
a} :: WebhookDefinition) (([WebhookFilterRule] -> f [WebhookFilterRule])
 -> WebhookDefinition -> f WebhookDefinition)
-> (([WebhookFilterRule] -> f [WebhookFilterRule])
    -> [WebhookFilterRule] -> f [WebhookFilterRule])
-> ([WebhookFilterRule] -> f [WebhookFilterRule])
-> WebhookDefinition
-> f WebhookDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([WebhookFilterRule] -> f [WebhookFilterRule])
-> [WebhookFilterRule] -> f [WebhookFilterRule]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Supported options are GITHUB_HMAC, IP, and UNAUTHENTICATED.
--
-- -   For information about the authentication scheme implemented by
--     GITHUB_HMAC, see
--     <https://developer.github.com/webhooks/securing/ Securing your webhooks>
--     on the GitHub Developer website.
--
-- -   IP rejects webhooks trigger requests unless they originate from an
--     IP address in the IP range whitelisted in the authentication
--     configuration.
--
-- -   UNAUTHENTICATED accepts all webhook trigger requests regardless of
--     origin.
webhookDefinition_authentication :: Lens.Lens' WebhookDefinition WebhookAuthenticationType
webhookDefinition_authentication :: (WebhookAuthenticationType -> f WebhookAuthenticationType)
-> WebhookDefinition -> f WebhookDefinition
webhookDefinition_authentication = (WebhookDefinition -> WebhookAuthenticationType)
-> (WebhookDefinition
    -> WebhookAuthenticationType -> WebhookDefinition)
-> Lens
     WebhookDefinition
     WebhookDefinition
     WebhookAuthenticationType
     WebhookAuthenticationType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WebhookDefinition' {WebhookAuthenticationType
authentication :: WebhookAuthenticationType
$sel:authentication:WebhookDefinition' :: WebhookDefinition -> WebhookAuthenticationType
authentication} -> WebhookAuthenticationType
authentication) (\s :: WebhookDefinition
s@WebhookDefinition' {} WebhookAuthenticationType
a -> WebhookDefinition
s {$sel:authentication:WebhookDefinition' :: WebhookAuthenticationType
authentication = WebhookAuthenticationType
a} :: WebhookDefinition)

-- | Properties that configure the authentication applied to incoming webhook
-- trigger requests. The required properties depend on the authentication
-- type. For GITHUB_HMAC, only the @SecretToken @property must be set. For
-- IP, only the @AllowedIPRange @property must be set to a valid CIDR
-- range. For UNAUTHENTICATED, no properties can be set.
webhookDefinition_authenticationConfiguration :: Lens.Lens' WebhookDefinition WebhookAuthConfiguration
webhookDefinition_authenticationConfiguration :: (WebhookAuthConfiguration -> f WebhookAuthConfiguration)
-> WebhookDefinition -> f WebhookDefinition
webhookDefinition_authenticationConfiguration = (WebhookDefinition -> WebhookAuthConfiguration)
-> (WebhookDefinition
    -> WebhookAuthConfiguration -> WebhookDefinition)
-> Lens
     WebhookDefinition
     WebhookDefinition
     WebhookAuthConfiguration
     WebhookAuthConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WebhookDefinition' {WebhookAuthConfiguration
authenticationConfiguration :: WebhookAuthConfiguration
$sel:authenticationConfiguration:WebhookDefinition' :: WebhookDefinition -> WebhookAuthConfiguration
authenticationConfiguration} -> WebhookAuthConfiguration
authenticationConfiguration) (\s :: WebhookDefinition
s@WebhookDefinition' {} WebhookAuthConfiguration
a -> WebhookDefinition
s {$sel:authenticationConfiguration:WebhookDefinition' :: WebhookAuthConfiguration
authenticationConfiguration = WebhookAuthConfiguration
a} :: WebhookDefinition)

instance Core.FromJSON WebhookDefinition where
  parseJSON :: Value -> Parser WebhookDefinition
parseJSON =
    String
-> (Object -> Parser WebhookDefinition)
-> Value
-> Parser WebhookDefinition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"WebhookDefinition"
      ( \Object
x ->
          Text
-> Text
-> Text
-> [WebhookFilterRule]
-> WebhookAuthenticationType
-> WebhookAuthConfiguration
-> WebhookDefinition
WebhookDefinition'
            (Text
 -> Text
 -> Text
 -> [WebhookFilterRule]
 -> WebhookAuthenticationType
 -> WebhookAuthConfiguration
 -> WebhookDefinition)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> [WebhookFilterRule]
      -> WebhookAuthenticationType
      -> WebhookAuthConfiguration
      -> WebhookDefinition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
            Parser
  (Text
   -> Text
   -> [WebhookFilterRule]
   -> WebhookAuthenticationType
   -> WebhookAuthConfiguration
   -> WebhookDefinition)
-> Parser Text
-> Parser
     (Text
      -> [WebhookFilterRule]
      -> WebhookAuthenticationType
      -> WebhookAuthConfiguration
      -> WebhookDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"targetPipeline")
            Parser
  (Text
   -> [WebhookFilterRule]
   -> WebhookAuthenticationType
   -> WebhookAuthConfiguration
   -> WebhookDefinition)
-> Parser Text
-> Parser
     ([WebhookFilterRule]
      -> WebhookAuthenticationType
      -> WebhookAuthConfiguration
      -> WebhookDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"targetAction")
            Parser
  ([WebhookFilterRule]
   -> WebhookAuthenticationType
   -> WebhookAuthConfiguration
   -> WebhookDefinition)
-> Parser [WebhookFilterRule]
-> Parser
     (WebhookAuthenticationType
      -> WebhookAuthConfiguration -> WebhookDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe [WebhookFilterRule])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"filters" Parser (Maybe [WebhookFilterRule])
-> [WebhookFilterRule] -> Parser [WebhookFilterRule]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [WebhookFilterRule]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (WebhookAuthenticationType
   -> WebhookAuthConfiguration -> WebhookDefinition)
-> Parser WebhookAuthenticationType
-> Parser (WebhookAuthConfiguration -> WebhookDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser WebhookAuthenticationType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"authentication")
            Parser (WebhookAuthConfiguration -> WebhookDefinition)
-> Parser WebhookAuthConfiguration -> Parser WebhookDefinition
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser WebhookAuthConfiguration
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"authenticationConfiguration")
      )

instance Prelude.Hashable WebhookDefinition

instance Prelude.NFData WebhookDefinition

instance Core.ToJSON WebhookDefinition where
  toJSON :: WebhookDefinition -> Value
toJSON WebhookDefinition' {[WebhookFilterRule]
Text
WebhookAuthConfiguration
WebhookAuthenticationType
authenticationConfiguration :: WebhookAuthConfiguration
authentication :: WebhookAuthenticationType
filters :: [WebhookFilterRule]
targetAction :: Text
targetPipeline :: Text
name :: Text
$sel:authenticationConfiguration:WebhookDefinition' :: WebhookDefinition -> WebhookAuthConfiguration
$sel:authentication:WebhookDefinition' :: WebhookDefinition -> WebhookAuthenticationType
$sel:filters:WebhookDefinition' :: WebhookDefinition -> [WebhookFilterRule]
$sel:targetAction:WebhookDefinition' :: WebhookDefinition -> Text
$sel:targetPipeline:WebhookDefinition' :: WebhookDefinition -> Text
$sel:name:WebhookDefinition' :: WebhookDefinition -> 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
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"targetPipeline" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
targetPipeline),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"targetAction" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
targetAction),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"filters" Text -> [WebhookFilterRule] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [WebhookFilterRule]
filters),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"authentication" Text -> WebhookAuthenticationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= WebhookAuthenticationType
authentication),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"authenticationConfiguration"
                  Text -> WebhookAuthConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= WebhookAuthConfiguration
authenticationConfiguration
              )
          ]
      )