<commit_before>{-# LANGUAGE FlexibleInstances      #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE LambdaCase             #-}
{-# LANGUAGE MultiParamTypeClasses  #-}
{-# LANGUAGE OverloadedStrings      #-}
{-# LANGUAGE TemplateHaskell        #-}

-- Module      : Network.PagerDuty.Integration
-- Copyright   : (c) 2013-2014 <NAME> <<EMAIL>>
-- License     : This Source Code Form is subject to the terms of
--               the Mozilla Public License, v. 2.0.
--               A copy of the MPL can be found in the LICENSE file or
--               you can obtain it at http://mozilla.org/MPL/2.0/.
-- Maintainer  : <NAME> <<EMAIL>>
-- Stability   : experimental
-- Portability : non-portable (GHC extensions)

-- | The PagerDuty event integration API is how you would add PagerDuty's
-- advanced alerting functionality to any system that can make an HTTP API
-- call. You can now add phone, SMS and email alerting to your monitoring
-- tools, ticketing systems and custom software.
--
-- The API was designed to allow you to easily integrate a
-- monitoring system with a Service in PagerDuty. Monitoring systems
-- generally send out events when problems are detected and when these
-- problems have been resolved (fixed). Some more advanced systems also
-- understand the concept of acknowledgements: problems can be acknowledged
-- by an engineer to signal he or she is working on fixing the issue.
--
-- Since monitoring systems emit events, the API is based around accepting
-- events. Incoming events (sent via the API) are routed to a PagerDuty
-- service and processed. They may result in a new incident being created,
-- or an existing incident being acknowledged or resolved.
--
-- The same event-based API can also be used to integrate a PagerDuty
-- service with ticketing systems and various other software tools.
--
-- /See:/ <http://developer.pagerduty.com/documentation/integration/events>
module Network.PagerDuty.Integration
    (
    -- * Sending events
      submit
    , submitWith

    -- ** Trigger
    , Trigger
    , trigger
    , client
    , clientUrl

    -- ** Acknowledge
    , Acknowledge
    , acknowledge

    -- ** Resolve
    , Resolve
    , resolve

    -- * Event fields
    , HasServiceKey  (..)
    , HasIncidentKey (..)
    , HasDescription (..)
    , HasDetails     (..)

    -- * Types
    , Event          (..)
    , _Trigger
    , _Acknowledge
    , _Resolve

    , Response
    , rsStatus
    , rsMessage
    , rsIncidentKey

    -- * Re-exported types
    , module Network.PagerDuty.Types
    ) where

import           Control.Lens
import           Control.Monad.IO.Class
import           Data.Aeson
import           Data.Default.Class
import qualified Data.HashMap.Strict              as Map
import           Data.Text                        (Text)
import           Network.HTTP.Client              (Manager)
import qualified Network.HTTP.Client              as Client
import           Network.PagerDuty.Internal.IO
import           Network.PagerDuty.Internal.TH
import           Network.PagerDuty.Internal.Types<commit_msg>Adding miscellaneous type exports<commit_after>{-# LANGUAGE FlexibleInstances      #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE LambdaCase             #-}
{-# LANGUAGE MultiParamTypeClasses  #-}
{-# LANGUAGE OverloadedStrings      #-}
{-# LANGUAGE TemplateHaskell        #-}

-- Module      : Network.PagerDuty.Integration
-- Copyright   : (c) 2013-2014 <NAME> <<EMAIL>>
-- License     : This Source Code Form is subject to the terms of
--               the Mozilla Public License, v. 2.0.
--               A copy of the MPL can be found in the LICENSE file or
--               you can obtain it at http://mozilla.org/MPL/2.0/.
-- Maintainer  : <NAME> <<EMAIL>>
-- Stability   : experimental
-- Portability : non-portable (GHC extensions)

-- | The PagerDuty event integration API is how you would add PagerDuty's
-- advanced alerting functionality to any system that can make an HTTP API
-- call. You can now add phone, SMS and email alerting to your monitoring
-- tools, ticketing systems and custom software.
--
-- The API was designed to allow you to easily integrate a
-- monitoring system with a Service in PagerDuty. Monitoring systems
-- generally send out events when problems are detected and when these
-- problems have been resolved (fixed). Some more advanced systems also
-- understand the concept of acknowledgements: problems can be acknowledged
-- by an engineer to signal he or she is working on fixing the issue.
--
-- Since monitoring systems emit events, the API is based around accepting
-- events. Incoming events (sent via the API) are routed to a PagerDuty
-- service and processed. They may result in a new incident being created,
-- or an existing incident being acknowledged or resolved.
--
-- The same event-based API can also be used to integrate a PagerDuty
-- service with ticketing systems and various other software tools.
--
-- /See:/ <http://developer.pagerduty.com/documentation/integration/events>
module Network.PagerDuty.Integration
    (
    -- * Sending events
      submit
    , submitWith

    -- ** Trigger
    , Trigger
    , trigger
    , client
    , clientUrl

    -- ** Acknowledge
    , Acknowledge
    , acknowledge

    -- ** Resolve
    , Resolve
    , resolve

    -- * Fields
    , HasServiceKey  (..)
    , HasIncidentKey (..)
    , HasDescription (..)
    , HasDetails     (..)

    -- * Types
    , Event          (..)
    , _Trigger
    , _Acknowledge
    , _Resolve

    , Response
    , rsStatus
    , rsMessage
    , rsIncidentKey

    , Generic

    -- * Re-exported types
    , module Network.PagerDuty.Types
    ) where

import           Control.Lens
import           Control.Monad.IO.Class
import           Data.Aeson
import           Data.Default.Class
import qualified Data.HashMap.Strict              as Map
import           Data.Text                        (Text)
import           Network.HTTP.Client              (Manager)
import qualified Network.HTTP.Client              as Client
import           Network.PagerDuty.Internal.IO
import           Network.PagerDuty.Internal.TH
import           Network.PagerDuty.Internal.Types
{'fraction_non_alphanumeric': 0.08803101276045873, 'fraction_numerical': 0.003876595057341302, 'mean_word_length': 2.262381454162276, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5984483', 'n_tokens_mistral': 1728, 'n_tokens_neox': 1655, 'n_words': 610}