{-# LANGUAGE Trustworthy #-}
{-|
Module      : Github.Data.Webhooks.Events
Copyright   : (c) Cuedo Control Engineering 2017-2022
License     : MIT
Maintainer  : Kyle Van Berendonck <foss@cuedo.com.au>

This module contains types that represent GitHub webhook's events.
-}
module GitHub.Data.Webhooks.Events
    ( EventHasSender(..)
    , EventHasMaybeSender(..)
    , EventHasRepo(..)
      --

    , CheckSuiteEventAction(..)
    , CheckSuiteEvent(..)
      --

    , CheckRunEventAction(..)
    , CheckRunEvent(..)
      --

    , CommitCommentEvent(..)
    , CommitCommentEventAction(..)
      --

    , CreateEvent(..)
      --

    , DeleteEvent(..)
      --

    , DeploymentEvent(..)
      --

    , DeploymentStatusEvent(..)
      -- Deprecated events

    , DownloadEvent(..)
    , FollowEvent(..)
    , ForkEvent(..)
    , ForkApplyEvent(..)
    , GistEvent(..)
      --

    , GollumEvent(..)
      --

    , InstallationEvent(..)
    , InstallationEventAction(..)
      --

    , InstallationRepositoriesEvent(..)
    , InstallationRepoEventAction(..)
      --

    , IssueCommentEvent(..)
    , IssueCommentEventAction(..)
      --

    , IssuesEvent(..)
    , IssuesEventAction(..)
      --

    , LabelEvent(..)
    , LabelEventAction(..)
      --

    , MarketplacePurchaseEvent(..)
    , MarketplacePurchaseEventAction(..)
      --

    , MemberEvent(..)
    , MemberEventAction(..)
      --

    , MembershipEvent(..)
    , MembershipEventAction(..)
      --

    , MilestoneEvent(..)
    , MilestoneEventAction(..)
      --

    , OrganizationEvent(..)
    , OrganizationEventAction(..)
      --

    , OrgBlockEvent(..)
    , OrgBlockEventAction(..)
      --

    , PageBuildEvent(..)
      --

    , ProjectCardEvent(..)
    , ProjectCardEventAction(..)
      --

    , ProjectColumnEvent(..)
    , ProjectColumnEventAction(..)
      --

    , ProjectEvent(..)
    , ProjectEventAction(..)
      --

    , PublicEvent(..)
      --

    , PullRequestEvent(..)
    , PullRequestEventAction(..)
      --

    , PullRequestReviewEvent(..)
    , PullRequestReviewEventAction(..)
      --

    , PullRequestReviewCommentEvent(..)
    , PullRequestReviewCommentEventAction(..)
      --

    , PushEvent(..)
      --

    , ReleaseEvent(..)
    , ReleaseEventAction(..)
      --

    , RepositoryEvent(..)
    , RepositoryEventAction(..)
      --

    , StatusEvent(..)
    , StatusEventState(..)
      --

    , TeamEvent(..)
    , TeamEventAction(..)
      --

    , TeamAddEvent(..)
      --

    , WatchEvent(..)
    , WatchEventAction(..)
    ) where

import           Data.Aeson               (FromJSON(..), withObject, withText, (.:), (.:?), (.!=))
import           Control.Applicative      ((<*>), pure)
import           Control.DeepSeq          (NFData(..))
import           Control.DeepSeq.Generics (genericRnf)
import           Data.Data                (Data, Typeable)
import           Data.Functor             ((<$>))
import           Data.Monoid              (mempty)
import           Data.Time                (UTCTime)
import           Data.Time.LocalTime      (zonedTimeToUTC)
import           Data.Text                (Text)
import           Data.Vector              (Vector)
import           GHC.Generics             (Generic)

import           GitHub.Data.Webhooks.Payload

-- | Represents an event that contains its sender information.

class EventHasSender eventKind where
    -- | Provides the sender context of a Webhook event.

    senderOfEvent :: eventKind -> HookUser

-- | Represents an event that may contain its sender information.

class EventHasMaybeSender eventKind where
    -- | Provides the sender context of a Webhook event.

    maybeSenderOfEvent :: eventKind -> Maybe HookUser

-- | Represents an event that contains its repository information.

class EventHasRepo eventKind where
    -- | Provides the repository context of a Webhook event.

    repoForEvent :: eventKind -> HookRepository

-- | Represents the "action" field in the

-- 'CheckSuiteEvent' payload.

data CheckSuiteEventAction
    -- | Decodes from "completed"

    = CheckSuiteEventActionCompleted
    -- | Decodes from "requested"

    | CheckSuiteEventActionRequested
    -- | Decodes from "rerequested"

    | CheckSuiteEventActionRerequested
    -- | The result of decoding an unknown check suite event action type

    | CheckSuiteEventActionOther !Text
    deriving (CheckSuiteEventAction -> CheckSuiteEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CheckSuiteEventAction -> CheckSuiteEventAction -> Bool
$c/= :: CheckSuiteEventAction -> CheckSuiteEventAction -> Bool
== :: CheckSuiteEventAction -> CheckSuiteEventAction -> Bool
$c== :: CheckSuiteEventAction -> CheckSuiteEventAction -> Bool
Eq, Eq CheckSuiteEventAction
CheckSuiteEventAction -> CheckSuiteEventAction -> Bool
CheckSuiteEventAction -> CheckSuiteEventAction -> Ordering
CheckSuiteEventAction
-> CheckSuiteEventAction -> CheckSuiteEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: CheckSuiteEventAction
-> CheckSuiteEventAction -> CheckSuiteEventAction
$cmin :: CheckSuiteEventAction
-> CheckSuiteEventAction -> CheckSuiteEventAction
max :: CheckSuiteEventAction
-> CheckSuiteEventAction -> CheckSuiteEventAction
$cmax :: CheckSuiteEventAction
-> CheckSuiteEventAction -> CheckSuiteEventAction
>= :: CheckSuiteEventAction -> CheckSuiteEventAction -> Bool
$c>= :: CheckSuiteEventAction -> CheckSuiteEventAction -> Bool
> :: CheckSuiteEventAction -> CheckSuiteEventAction -> Bool
$c> :: CheckSuiteEventAction -> CheckSuiteEventAction -> Bool
<= :: CheckSuiteEventAction -> CheckSuiteEventAction -> Bool
$c<= :: CheckSuiteEventAction -> CheckSuiteEventAction -> Bool
< :: CheckSuiteEventAction -> CheckSuiteEventAction -> Bool
$c< :: CheckSuiteEventAction -> CheckSuiteEventAction -> Bool
compare :: CheckSuiteEventAction -> CheckSuiteEventAction -> Ordering
$ccompare :: CheckSuiteEventAction -> CheckSuiteEventAction -> Ordering
Ord, Int -> CheckSuiteEventAction -> ShowS
[CheckSuiteEventAction] -> ShowS
CheckSuiteEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CheckSuiteEventAction] -> ShowS
$cshowList :: [CheckSuiteEventAction] -> ShowS
show :: CheckSuiteEventAction -> String
$cshow :: CheckSuiteEventAction -> String
showsPrec :: Int -> CheckSuiteEventAction -> ShowS
$cshowsPrec :: Int -> CheckSuiteEventAction -> ShowS
Show, forall x. Rep CheckSuiteEventAction x -> CheckSuiteEventAction
forall x. CheckSuiteEventAction -> Rep CheckSuiteEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CheckSuiteEventAction x -> CheckSuiteEventAction
$cfrom :: forall x. CheckSuiteEventAction -> Rep CheckSuiteEventAction x
Generic, Typeable, Typeable CheckSuiteEventAction
CheckSuiteEventAction -> DataType
CheckSuiteEventAction -> Constr
(forall b. Data b => b -> b)
-> CheckSuiteEventAction -> CheckSuiteEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> CheckSuiteEventAction -> u
forall u.
(forall d. Data d => d -> u) -> CheckSuiteEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CheckSuiteEventAction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CheckSuiteEventAction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEventAction -> m CheckSuiteEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEventAction -> m CheckSuiteEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CheckSuiteEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CheckSuiteEventAction
-> c CheckSuiteEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CheckSuiteEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CheckSuiteEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEventAction -> m CheckSuiteEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEventAction -> m CheckSuiteEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEventAction -> m CheckSuiteEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEventAction -> m CheckSuiteEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEventAction -> m CheckSuiteEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEventAction -> m CheckSuiteEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> CheckSuiteEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> CheckSuiteEventAction -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> CheckSuiteEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> CheckSuiteEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CheckSuiteEventAction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CheckSuiteEventAction -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CheckSuiteEventAction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CheckSuiteEventAction -> r
gmapT :: (forall b. Data b => b -> b)
-> CheckSuiteEventAction -> CheckSuiteEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> CheckSuiteEventAction -> CheckSuiteEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CheckSuiteEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CheckSuiteEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CheckSuiteEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CheckSuiteEventAction)
dataTypeOf :: CheckSuiteEventAction -> DataType
$cdataTypeOf :: CheckSuiteEventAction -> DataType
toConstr :: CheckSuiteEventAction -> Constr
$ctoConstr :: CheckSuiteEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CheckSuiteEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CheckSuiteEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CheckSuiteEventAction
-> c CheckSuiteEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CheckSuiteEventAction
-> c CheckSuiteEventAction
Data)

instance NFData CheckSuiteEventAction where rnf :: CheckSuiteEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON CheckSuiteEventAction where
  parseJSON :: Value -> Parser CheckSuiteEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Check suite event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
      case Text
t of
          Text
"completed"          -> forall (f :: * -> *) a. Applicative f => a -> f a
pure CheckSuiteEventAction
CheckSuiteEventActionCompleted
          Text
"requested"          -> forall (f :: * -> *) a. Applicative f => a -> f a
pure CheckSuiteEventAction
CheckSuiteEventActionRequested
          Text
"rerequested"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure CheckSuiteEventAction
CheckSuiteEventActionRerequested
          Text
_                    -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> CheckSuiteEventAction
CheckSuiteEventActionOther Text
t)

-- | Triggered when a check suite is completed, requested, or rerequested.

-- See <https://developer.github.com/v3/activity/events/types/#checksuiteevent>.

data CheckSuiteEvent = CheckSuiteEvent
    { CheckSuiteEvent -> CheckSuiteEventAction
evCheckSuiteAction              :: !CheckSuiteEventAction
    , CheckSuiteEvent -> HookCheckSuite
evCheckSuiteCheckSuite          :: !HookCheckSuite
    , CheckSuiteEvent -> HookRepository
evCheckSuiteRepository          :: !HookRepository
    , CheckSuiteEvent -> Maybe HookOrganization
evCheckSuiteOrganization        :: !(Maybe HookOrganization)
    , CheckSuiteEvent -> HookUser
evCheckSuiteSender              :: !HookUser
    , CheckSuiteEvent -> Maybe HookChecksInstallation
evCheckSuiteInstallation        :: !(Maybe HookChecksInstallation)
    }
    deriving (CheckSuiteEvent -> CheckSuiteEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CheckSuiteEvent -> CheckSuiteEvent -> Bool
$c/= :: CheckSuiteEvent -> CheckSuiteEvent -> Bool
== :: CheckSuiteEvent -> CheckSuiteEvent -> Bool
$c== :: CheckSuiteEvent -> CheckSuiteEvent -> Bool
Eq, Int -> CheckSuiteEvent -> ShowS
[CheckSuiteEvent] -> ShowS
CheckSuiteEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CheckSuiteEvent] -> ShowS
$cshowList :: [CheckSuiteEvent] -> ShowS
show :: CheckSuiteEvent -> String
$cshow :: CheckSuiteEvent -> String
showsPrec :: Int -> CheckSuiteEvent -> ShowS
$cshowsPrec :: Int -> CheckSuiteEvent -> ShowS
Show, Typeable, Typeable CheckSuiteEvent
CheckSuiteEvent -> DataType
CheckSuiteEvent -> Constr
(forall b. Data b => b -> b) -> CheckSuiteEvent -> CheckSuiteEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> CheckSuiteEvent -> u
forall u. (forall d. Data d => d -> u) -> CheckSuiteEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CheckSuiteEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CheckSuiteEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEvent -> m CheckSuiteEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEvent -> m CheckSuiteEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CheckSuiteEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> CheckSuiteEvent -> c CheckSuiteEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CheckSuiteEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CheckSuiteEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEvent -> m CheckSuiteEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEvent -> m CheckSuiteEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEvent -> m CheckSuiteEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEvent -> m CheckSuiteEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEvent -> m CheckSuiteEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CheckSuiteEvent -> m CheckSuiteEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> CheckSuiteEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> CheckSuiteEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> CheckSuiteEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> CheckSuiteEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CheckSuiteEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CheckSuiteEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CheckSuiteEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CheckSuiteEvent -> r
gmapT :: (forall b. Data b => b -> b) -> CheckSuiteEvent -> CheckSuiteEvent
$cgmapT :: (forall b. Data b => b -> b) -> CheckSuiteEvent -> CheckSuiteEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CheckSuiteEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CheckSuiteEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CheckSuiteEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CheckSuiteEvent)
dataTypeOf :: CheckSuiteEvent -> DataType
$cdataTypeOf :: CheckSuiteEvent -> DataType
toConstr :: CheckSuiteEvent -> Constr
$ctoConstr :: CheckSuiteEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CheckSuiteEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CheckSuiteEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> CheckSuiteEvent -> c CheckSuiteEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> CheckSuiteEvent -> c CheckSuiteEvent
Data, forall x. Rep CheckSuiteEvent x -> CheckSuiteEvent
forall x. CheckSuiteEvent -> Rep CheckSuiteEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CheckSuiteEvent x -> CheckSuiteEvent
$cfrom :: forall x. CheckSuiteEvent -> Rep CheckSuiteEvent x
Generic)

instance EventHasSender CheckSuiteEvent where senderOfEvent :: CheckSuiteEvent -> HookUser
senderOfEvent = CheckSuiteEvent -> HookUser
evCheckSuiteSender
instance EventHasRepo CheckSuiteEvent where repoForEvent :: CheckSuiteEvent -> HookRepository
repoForEvent = CheckSuiteEvent -> HookRepository
evCheckSuiteRepository
instance NFData CheckSuiteEvent where rnf :: CheckSuiteEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

-- | Represents the "action" field in the

-- 'CheckRunEvent' payload.

data CheckRunEventAction
    -- | Decodes from "created"

    = CheckRunEventActionCreated
    -- | Decodes from "completed"

    | CheckRunEventActionCompleted
    -- | Decodes from "rerequested"

    | CheckRunEventActionRerequested
    -- | Decodes from "requested_action"

    | CheckRunEventActionRequestedAction
    -- | The result of decoding an unknown check run event action type

    | CheckRunEventActionOther !Text
    deriving (CheckRunEventAction -> CheckRunEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CheckRunEventAction -> CheckRunEventAction -> Bool
$c/= :: CheckRunEventAction -> CheckRunEventAction -> Bool
== :: CheckRunEventAction -> CheckRunEventAction -> Bool
$c== :: CheckRunEventAction -> CheckRunEventAction -> Bool
Eq, Eq CheckRunEventAction
CheckRunEventAction -> CheckRunEventAction -> Bool
CheckRunEventAction -> CheckRunEventAction -> Ordering
CheckRunEventAction -> CheckRunEventAction -> CheckRunEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: CheckRunEventAction -> CheckRunEventAction -> CheckRunEventAction
$cmin :: CheckRunEventAction -> CheckRunEventAction -> CheckRunEventAction
max :: CheckRunEventAction -> CheckRunEventAction -> CheckRunEventAction
$cmax :: CheckRunEventAction -> CheckRunEventAction -> CheckRunEventAction
>= :: CheckRunEventAction -> CheckRunEventAction -> Bool
$c>= :: CheckRunEventAction -> CheckRunEventAction -> Bool
> :: CheckRunEventAction -> CheckRunEventAction -> Bool
$c> :: CheckRunEventAction -> CheckRunEventAction -> Bool
<= :: CheckRunEventAction -> CheckRunEventAction -> Bool
$c<= :: CheckRunEventAction -> CheckRunEventAction -> Bool
< :: CheckRunEventAction -> CheckRunEventAction -> Bool
$c< :: CheckRunEventAction -> CheckRunEventAction -> Bool
compare :: CheckRunEventAction -> CheckRunEventAction -> Ordering
$ccompare :: CheckRunEventAction -> CheckRunEventAction -> Ordering
Ord, Int -> CheckRunEventAction -> ShowS
[CheckRunEventAction] -> ShowS
CheckRunEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CheckRunEventAction] -> ShowS
$cshowList :: [CheckRunEventAction] -> ShowS
show :: CheckRunEventAction -> String
$cshow :: CheckRunEventAction -> String
showsPrec :: Int -> CheckRunEventAction -> ShowS
$cshowsPrec :: Int -> CheckRunEventAction -> ShowS
Show, forall x. Rep CheckRunEventAction x -> CheckRunEventAction
forall x. CheckRunEventAction -> Rep CheckRunEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CheckRunEventAction x -> CheckRunEventAction
$cfrom :: forall x. CheckRunEventAction -> Rep CheckRunEventAction x
Generic, Typeable, Typeable CheckRunEventAction
CheckRunEventAction -> DataType
CheckRunEventAction -> Constr
(forall b. Data b => b -> b)
-> CheckRunEventAction -> CheckRunEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> CheckRunEventAction -> u
forall u.
(forall d. Data d => d -> u) -> CheckRunEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CheckRunEventAction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CheckRunEventAction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CheckRunEventAction -> m CheckRunEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckRunEventAction -> m CheckRunEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CheckRunEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CheckRunEventAction
-> c CheckRunEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CheckRunEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CheckRunEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckRunEventAction -> m CheckRunEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckRunEventAction -> m CheckRunEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckRunEventAction -> m CheckRunEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CheckRunEventAction -> m CheckRunEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CheckRunEventAction -> m CheckRunEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CheckRunEventAction -> m CheckRunEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> CheckRunEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> CheckRunEventAction -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> CheckRunEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> CheckRunEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CheckRunEventAction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CheckRunEventAction -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CheckRunEventAction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CheckRunEventAction -> r
gmapT :: (forall b. Data b => b -> b)
-> CheckRunEventAction -> CheckRunEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> CheckRunEventAction -> CheckRunEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CheckRunEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CheckRunEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CheckRunEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CheckRunEventAction)
dataTypeOf :: CheckRunEventAction -> DataType
$cdataTypeOf :: CheckRunEventAction -> DataType
toConstr :: CheckRunEventAction -> Constr
$ctoConstr :: CheckRunEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CheckRunEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CheckRunEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CheckRunEventAction
-> c CheckRunEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CheckRunEventAction
-> c CheckRunEventAction
Data)

instance NFData CheckRunEventAction where rnf :: CheckRunEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON CheckRunEventAction where
  parseJSON :: Value -> Parser CheckRunEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Check run event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
      case Text
t of
          Text
"created"            -> forall (f :: * -> *) a. Applicative f => a -> f a
pure CheckRunEventAction
CheckRunEventActionCreated
          Text
"completed"          -> forall (f :: * -> *) a. Applicative f => a -> f a
pure CheckRunEventAction
CheckRunEventActionCompleted
          Text
"rerequested"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure CheckRunEventAction
CheckRunEventActionRerequested
          Text
"requested_action"   -> forall (f :: * -> *) a. Applicative f => a -> f a
pure CheckRunEventAction
CheckRunEventActionRequestedAction
          Text
_                    -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> CheckRunEventAction
CheckRunEventActionOther Text
t)

-- | Triggered when a check run is created, rerequested, completed, or has a requested_action.

-- See <https://developer.github.com/v3/activity/events/types/#checkrunevent>.

data CheckRunEvent = CheckRunEvent
    { CheckRunEvent -> CheckRunEventAction
evCheckRunAction              :: !CheckRunEventAction
    , CheckRunEvent -> HookCheckRun
evCheckRunCheckRun            :: !HookCheckRun
    , CheckRunEvent -> Maybe HookCheckRunRequestedAction
evCheckRunRequestedAction     :: !(Maybe HookCheckRunRequestedAction)
    , CheckRunEvent -> HookRepository
evCheckRunRepository          :: !HookRepository
    , CheckRunEvent -> Maybe HookOrganization
evCheckRunOrganization        :: !(Maybe HookOrganization)
    , CheckRunEvent -> HookUser
evCheckRunSender              :: !HookUser
    , CheckRunEvent -> Maybe HookChecksInstallation
evCheckRunInstallation        :: !(Maybe HookChecksInstallation)
    }
    deriving (CheckRunEvent -> CheckRunEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CheckRunEvent -> CheckRunEvent -> Bool
$c/= :: CheckRunEvent -> CheckRunEvent -> Bool
== :: CheckRunEvent -> CheckRunEvent -> Bool
$c== :: CheckRunEvent -> CheckRunEvent -> Bool
Eq, Int -> CheckRunEvent -> ShowS
[CheckRunEvent] -> ShowS
CheckRunEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CheckRunEvent] -> ShowS
$cshowList :: [CheckRunEvent] -> ShowS
show :: CheckRunEvent -> String
$cshow :: CheckRunEvent -> String
showsPrec :: Int -> CheckRunEvent -> ShowS
$cshowsPrec :: Int -> CheckRunEvent -> ShowS
Show, Typeable, Typeable CheckRunEvent
CheckRunEvent -> DataType
CheckRunEvent -> Constr
(forall b. Data b => b -> b) -> CheckRunEvent -> CheckRunEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> CheckRunEvent -> u
forall u. (forall d. Data d => d -> u) -> CheckRunEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CheckRunEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CheckRunEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> CheckRunEvent -> m CheckRunEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CheckRunEvent -> m CheckRunEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CheckRunEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> CheckRunEvent -> c CheckRunEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CheckRunEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CheckRunEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CheckRunEvent -> m CheckRunEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CheckRunEvent -> m CheckRunEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CheckRunEvent -> m CheckRunEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CheckRunEvent -> m CheckRunEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> CheckRunEvent -> m CheckRunEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> CheckRunEvent -> m CheckRunEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> CheckRunEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> CheckRunEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> CheckRunEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> CheckRunEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CheckRunEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CheckRunEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CheckRunEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CheckRunEvent -> r
gmapT :: (forall b. Data b => b -> b) -> CheckRunEvent -> CheckRunEvent
$cgmapT :: (forall b. Data b => b -> b) -> CheckRunEvent -> CheckRunEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CheckRunEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CheckRunEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CheckRunEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CheckRunEvent)
dataTypeOf :: CheckRunEvent -> DataType
$cdataTypeOf :: CheckRunEvent -> DataType
toConstr :: CheckRunEvent -> Constr
$ctoConstr :: CheckRunEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CheckRunEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CheckRunEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> CheckRunEvent -> c CheckRunEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> CheckRunEvent -> c CheckRunEvent
Data, forall x. Rep CheckRunEvent x -> CheckRunEvent
forall x. CheckRunEvent -> Rep CheckRunEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CheckRunEvent x -> CheckRunEvent
$cfrom :: forall x. CheckRunEvent -> Rep CheckRunEvent x
Generic)

instance EventHasSender CheckRunEvent where senderOfEvent :: CheckRunEvent -> HookUser
senderOfEvent = CheckRunEvent -> HookUser
evCheckRunSender
instance EventHasRepo CheckRunEvent where repoForEvent :: CheckRunEvent -> HookRepository
repoForEvent = CheckRunEvent -> HookRepository
evCheckRunRepository
instance NFData CheckRunEvent where rnf :: CheckRunEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

-- | Represents the "action" field in the

-- 'CommitCommentEvent' payload.

data CommitCommentEventAction
    -- | Decodes from "created"

    = CommitCommentActionCreated
    -- | The result of decoding an unknown commit comment event action type

    | CommitCommentActionOther !Text
    deriving (CommitCommentEventAction -> CommitCommentEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CommitCommentEventAction -> CommitCommentEventAction -> Bool
$c/= :: CommitCommentEventAction -> CommitCommentEventAction -> Bool
== :: CommitCommentEventAction -> CommitCommentEventAction -> Bool
$c== :: CommitCommentEventAction -> CommitCommentEventAction -> Bool
Eq, Eq CommitCommentEventAction
CommitCommentEventAction -> CommitCommentEventAction -> Bool
CommitCommentEventAction -> CommitCommentEventAction -> Ordering
CommitCommentEventAction
-> CommitCommentEventAction -> CommitCommentEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: CommitCommentEventAction
-> CommitCommentEventAction -> CommitCommentEventAction
$cmin :: CommitCommentEventAction
-> CommitCommentEventAction -> CommitCommentEventAction
max :: CommitCommentEventAction
-> CommitCommentEventAction -> CommitCommentEventAction
$cmax :: CommitCommentEventAction
-> CommitCommentEventAction -> CommitCommentEventAction
>= :: CommitCommentEventAction -> CommitCommentEventAction -> Bool
$c>= :: CommitCommentEventAction -> CommitCommentEventAction -> Bool
> :: CommitCommentEventAction -> CommitCommentEventAction -> Bool
$c> :: CommitCommentEventAction -> CommitCommentEventAction -> Bool
<= :: CommitCommentEventAction -> CommitCommentEventAction -> Bool
$c<= :: CommitCommentEventAction -> CommitCommentEventAction -> Bool
< :: CommitCommentEventAction -> CommitCommentEventAction -> Bool
$c< :: CommitCommentEventAction -> CommitCommentEventAction -> Bool
compare :: CommitCommentEventAction -> CommitCommentEventAction -> Ordering
$ccompare :: CommitCommentEventAction -> CommitCommentEventAction -> Ordering
Ord, Int -> CommitCommentEventAction -> ShowS
[CommitCommentEventAction] -> ShowS
CommitCommentEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CommitCommentEventAction] -> ShowS
$cshowList :: [CommitCommentEventAction] -> ShowS
show :: CommitCommentEventAction -> String
$cshow :: CommitCommentEventAction -> String
showsPrec :: Int -> CommitCommentEventAction -> ShowS
$cshowsPrec :: Int -> CommitCommentEventAction -> ShowS
Show, forall x.
Rep CommitCommentEventAction x -> CommitCommentEventAction
forall x.
CommitCommentEventAction -> Rep CommitCommentEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CommitCommentEventAction x -> CommitCommentEventAction
$cfrom :: forall x.
CommitCommentEventAction -> Rep CommitCommentEventAction x
Generic, Typeable, Typeable CommitCommentEventAction
CommitCommentEventAction -> DataType
CommitCommentEventAction -> Constr
(forall b. Data b => b -> b)
-> CommitCommentEventAction -> CommitCommentEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int
-> (forall d. Data d => d -> u) -> CommitCommentEventAction -> u
forall u.
(forall d. Data d => d -> u) -> CommitCommentEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> CommitCommentEventAction
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> CommitCommentEventAction
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CommitCommentEventAction -> m CommitCommentEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CommitCommentEventAction -> m CommitCommentEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CommitCommentEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CommitCommentEventAction
-> c CommitCommentEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CommitCommentEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CommitCommentEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CommitCommentEventAction -> m CommitCommentEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CommitCommentEventAction -> m CommitCommentEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CommitCommentEventAction -> m CommitCommentEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CommitCommentEventAction -> m CommitCommentEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CommitCommentEventAction -> m CommitCommentEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CommitCommentEventAction -> m CommitCommentEventAction
gmapQi :: forall u.
Int
-> (forall d. Data d => d -> u) -> CommitCommentEventAction -> u
$cgmapQi :: forall u.
Int
-> (forall d. Data d => d -> u) -> CommitCommentEventAction -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> CommitCommentEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> CommitCommentEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> CommitCommentEventAction
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> CommitCommentEventAction
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> CommitCommentEventAction
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> CommitCommentEventAction
-> r
gmapT :: (forall b. Data b => b -> b)
-> CommitCommentEventAction -> CommitCommentEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> CommitCommentEventAction -> CommitCommentEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CommitCommentEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CommitCommentEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CommitCommentEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CommitCommentEventAction)
dataTypeOf :: CommitCommentEventAction -> DataType
$cdataTypeOf :: CommitCommentEventAction -> DataType
toConstr :: CommitCommentEventAction -> Constr
$ctoConstr :: CommitCommentEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CommitCommentEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CommitCommentEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CommitCommentEventAction
-> c CommitCommentEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CommitCommentEventAction
-> c CommitCommentEventAction
Data)

instance NFData CommitCommentEventAction where rnf :: CommitCommentEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON CommitCommentEventAction where
  parseJSON :: Value -> Parser CommitCommentEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Commit comment event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
      case Text
t of
          Text
"created"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure CommitCommentEventAction
CommitCommentActionCreated
          Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> CommitCommentEventAction
CommitCommentActionOther Text
t)

-- | Triggered when a commit comment is created.

-- See <https://developer.github.com/v3/activity/events/types/#commitcommentevent>.

data CommitCommentEvent = CommitCommentEvent
    { CommitCommentEvent -> CommitCommentEventAction
evCommitCommentAction     :: !CommitCommentEventAction
    , CommitCommentEvent -> HookCommitComment
evCommitCommentPayload    :: !HookCommitComment
    , CommitCommentEvent -> HookRepository
evCommitCommentRepo       :: !HookRepository
    , CommitCommentEvent -> HookUser
evCommitCommentSender     :: !HookUser
    }
    deriving (CommitCommentEvent -> CommitCommentEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CommitCommentEvent -> CommitCommentEvent -> Bool
$c/= :: CommitCommentEvent -> CommitCommentEvent -> Bool
== :: CommitCommentEvent -> CommitCommentEvent -> Bool
$c== :: CommitCommentEvent -> CommitCommentEvent -> Bool
Eq, Int -> CommitCommentEvent -> ShowS
[CommitCommentEvent] -> ShowS
CommitCommentEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CommitCommentEvent] -> ShowS
$cshowList :: [CommitCommentEvent] -> ShowS
show :: CommitCommentEvent -> String
$cshow :: CommitCommentEvent -> String
showsPrec :: Int -> CommitCommentEvent -> ShowS
$cshowsPrec :: Int -> CommitCommentEvent -> ShowS
Show, Typeable, Typeable CommitCommentEvent
CommitCommentEvent -> DataType
CommitCommentEvent -> Constr
(forall b. Data b => b -> b)
-> CommitCommentEvent -> CommitCommentEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> CommitCommentEvent -> u
forall u. (forall d. Data d => d -> u) -> CommitCommentEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CommitCommentEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CommitCommentEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CommitCommentEvent -> m CommitCommentEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CommitCommentEvent -> m CommitCommentEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CommitCommentEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CommitCommentEvent
-> c CommitCommentEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CommitCommentEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CommitCommentEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CommitCommentEvent -> m CommitCommentEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CommitCommentEvent -> m CommitCommentEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CommitCommentEvent -> m CommitCommentEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CommitCommentEvent -> m CommitCommentEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CommitCommentEvent -> m CommitCommentEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CommitCommentEvent -> m CommitCommentEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> CommitCommentEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> CommitCommentEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> CommitCommentEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> CommitCommentEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CommitCommentEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CommitCommentEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CommitCommentEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CommitCommentEvent -> r
gmapT :: (forall b. Data b => b -> b)
-> CommitCommentEvent -> CommitCommentEvent
$cgmapT :: (forall b. Data b => b -> b)
-> CommitCommentEvent -> CommitCommentEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CommitCommentEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CommitCommentEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CommitCommentEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CommitCommentEvent)
dataTypeOf :: CommitCommentEvent -> DataType
$cdataTypeOf :: CommitCommentEvent -> DataType
toConstr :: CommitCommentEvent -> Constr
$ctoConstr :: CommitCommentEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CommitCommentEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CommitCommentEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CommitCommentEvent
-> c CommitCommentEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CommitCommentEvent
-> c CommitCommentEvent
Data, forall x. Rep CommitCommentEvent x -> CommitCommentEvent
forall x. CommitCommentEvent -> Rep CommitCommentEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CommitCommentEvent x -> CommitCommentEvent
$cfrom :: forall x. CommitCommentEvent -> Rep CommitCommentEvent x
Generic)

instance EventHasSender CommitCommentEvent where senderOfEvent :: CommitCommentEvent -> HookUser
senderOfEvent = CommitCommentEvent -> HookUser
evCommitCommentSender
instance EventHasRepo CommitCommentEvent where repoForEvent :: CommitCommentEvent -> HookRepository
repoForEvent = CommitCommentEvent -> HookRepository
evCommitCommentRepo
instance NFData CommitCommentEvent where rnf :: CommitCommentEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


-- | Represents a created repository, branch, or tag.

-- Note: webhooks will not receive this event for created repositories.

-- Additionally, webhooks will not receive this event for tags if more than three tags are pushed at once.

-- See <https://developer.github.com/v3/activity/events/types/#createevent>.

data CreateEvent = CreateEvent
    { CreateEvent -> Text
evCreateRef               :: !Text
    , CreateEvent -> Text
evCreateRefType           :: !Text
    , CreateEvent -> Text
evCreateMasterBranch      :: !Text
    , CreateEvent -> Text
evCreateDescription       :: !Text
    , CreateEvent -> OwnerType
evCreatePusherType        :: !OwnerType
    , CreateEvent -> HookRepository
evCreateRepo              :: !HookRepository
    , CreateEvent -> HookUser
evCreateSender            :: !HookUser
    }
    deriving (CreateEvent -> CreateEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEvent -> CreateEvent -> Bool
$c/= :: CreateEvent -> CreateEvent -> Bool
== :: CreateEvent -> CreateEvent -> Bool
$c== :: CreateEvent -> CreateEvent -> Bool
Eq, Int -> CreateEvent -> ShowS
[CreateEvent] -> ShowS
CreateEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEvent] -> ShowS
$cshowList :: [CreateEvent] -> ShowS
show :: CreateEvent -> String
$cshow :: CreateEvent -> String
showsPrec :: Int -> CreateEvent -> ShowS
$cshowsPrec :: Int -> CreateEvent -> ShowS
Show, Typeable, Typeable CreateEvent
CreateEvent -> DataType
CreateEvent -> Constr
(forall b. Data b => b -> b) -> CreateEvent -> CreateEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> CreateEvent -> u
forall u. (forall d. Data d => d -> u) -> CreateEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CreateEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CreateEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> CreateEvent -> m CreateEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CreateEvent -> m CreateEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CreateEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> CreateEvent -> c CreateEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CreateEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CreateEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CreateEvent -> m CreateEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CreateEvent -> m CreateEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CreateEvent -> m CreateEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CreateEvent -> m CreateEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> CreateEvent -> m CreateEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> CreateEvent -> m CreateEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> CreateEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> CreateEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> CreateEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> CreateEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CreateEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CreateEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CreateEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CreateEvent -> r
gmapT :: (forall b. Data b => b -> b) -> CreateEvent -> CreateEvent
$cgmapT :: (forall b. Data b => b -> b) -> CreateEvent -> CreateEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CreateEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CreateEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CreateEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CreateEvent)
dataTypeOf :: CreateEvent -> DataType
$cdataTypeOf :: CreateEvent -> DataType
toConstr :: CreateEvent -> Constr
$ctoConstr :: CreateEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CreateEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CreateEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> CreateEvent -> c CreateEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> CreateEvent -> c CreateEvent
Data, forall x. Rep CreateEvent x -> CreateEvent
forall x. CreateEvent -> Rep CreateEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateEvent x -> CreateEvent
$cfrom :: forall x. CreateEvent -> Rep CreateEvent x
Generic)

instance EventHasSender CreateEvent where senderOfEvent :: CreateEvent -> HookUser
senderOfEvent = CreateEvent -> HookUser
evCreateSender
instance EventHasRepo CreateEvent where repoForEvent :: CreateEvent -> HookRepository
repoForEvent = CreateEvent -> HookRepository
evCreateRepo
instance NFData CreateEvent where rnf :: CreateEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


-- | Represents a deleted branch or tag.

-- Note: webhooks will not receive this event for tags if more than three tags are deleted at once.

-- See <https://developer.github.com/v3/activity/events/types/#deleteevent>.

data DeleteEvent = DeleteEvent
    { DeleteEvent -> Text
evDeleteRef               :: !Text
    , DeleteEvent -> Text
evDeleteRefType           :: !Text
    , DeleteEvent -> OwnerType
evDeletePusherType        :: !OwnerType
    , DeleteEvent -> HookRepository
evDeleteRepo              :: !HookRepository
    , DeleteEvent -> HookUser
evDeleteSender            :: !HookUser
    }
    deriving (DeleteEvent -> DeleteEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteEvent -> DeleteEvent -> Bool
$c/= :: DeleteEvent -> DeleteEvent -> Bool
== :: DeleteEvent -> DeleteEvent -> Bool
$c== :: DeleteEvent -> DeleteEvent -> Bool
Eq, Int -> DeleteEvent -> ShowS
[DeleteEvent] -> ShowS
DeleteEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteEvent] -> ShowS
$cshowList :: [DeleteEvent] -> ShowS
show :: DeleteEvent -> String
$cshow :: DeleteEvent -> String
showsPrec :: Int -> DeleteEvent -> ShowS
$cshowsPrec :: Int -> DeleteEvent -> ShowS
Show, Typeable, Typeable DeleteEvent
DeleteEvent -> DataType
DeleteEvent -> Constr
(forall b. Data b => b -> b) -> DeleteEvent -> DeleteEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> DeleteEvent -> u
forall u. (forall d. Data d => d -> u) -> DeleteEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeleteEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeleteEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DeleteEvent -> m DeleteEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DeleteEvent -> m DeleteEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeleteEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DeleteEvent -> c DeleteEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeleteEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeleteEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DeleteEvent -> m DeleteEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DeleteEvent -> m DeleteEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DeleteEvent -> m DeleteEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DeleteEvent -> m DeleteEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DeleteEvent -> m DeleteEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DeleteEvent -> m DeleteEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DeleteEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DeleteEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> DeleteEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> DeleteEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeleteEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeleteEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeleteEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeleteEvent -> r
gmapT :: (forall b. Data b => b -> b) -> DeleteEvent -> DeleteEvent
$cgmapT :: (forall b. Data b => b -> b) -> DeleteEvent -> DeleteEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeleteEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeleteEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeleteEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeleteEvent)
dataTypeOf :: DeleteEvent -> DataType
$cdataTypeOf :: DeleteEvent -> DataType
toConstr :: DeleteEvent -> Constr
$ctoConstr :: DeleteEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeleteEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeleteEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DeleteEvent -> c DeleteEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DeleteEvent -> c DeleteEvent
Data, forall x. Rep DeleteEvent x -> DeleteEvent
forall x. DeleteEvent -> Rep DeleteEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteEvent x -> DeleteEvent
$cfrom :: forall x. DeleteEvent -> Rep DeleteEvent x
Generic)

instance EventHasSender DeleteEvent where senderOfEvent :: DeleteEvent -> HookUser
senderOfEvent = DeleteEvent -> HookUser
evDeleteSender
instance EventHasRepo DeleteEvent where repoForEvent :: DeleteEvent -> HookRepository
repoForEvent = DeleteEvent -> HookRepository
evDeleteRepo
instance NFData DeleteEvent where rnf :: DeleteEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


-- | Represents a deployment.

-- Events of this type are not visible in timelines. These events are only used to trigger hooks.

-- See <https://developer.github.com/v3/activity/events/types/#deploymentevent>.

data DeploymentEvent = DeploymentEvent
    { DeploymentEvent -> HookDeployment
evDeploymentInfo          :: !HookDeployment
    , DeploymentEvent -> HookRepository
evDeploymentRepo          :: !HookRepository
    , DeploymentEvent -> HookUser
evDeploymentSender        :: !HookUser
    }
    deriving (DeploymentEvent -> DeploymentEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeploymentEvent -> DeploymentEvent -> Bool
$c/= :: DeploymentEvent -> DeploymentEvent -> Bool
== :: DeploymentEvent -> DeploymentEvent -> Bool
$c== :: DeploymentEvent -> DeploymentEvent -> Bool
Eq, Int -> DeploymentEvent -> ShowS
[DeploymentEvent] -> ShowS
DeploymentEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeploymentEvent] -> ShowS
$cshowList :: [DeploymentEvent] -> ShowS
show :: DeploymentEvent -> String
$cshow :: DeploymentEvent -> String
showsPrec :: Int -> DeploymentEvent -> ShowS
$cshowsPrec :: Int -> DeploymentEvent -> ShowS
Show, Typeable, Typeable DeploymentEvent
DeploymentEvent -> DataType
DeploymentEvent -> Constr
(forall b. Data b => b -> b) -> DeploymentEvent -> DeploymentEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> DeploymentEvent -> u
forall u. (forall d. Data d => d -> u) -> DeploymentEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DeploymentEvent -> m DeploymentEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentEvent -> m DeploymentEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DeploymentEvent -> c DeploymentEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeploymentEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentEvent -> m DeploymentEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentEvent -> m DeploymentEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentEvent -> m DeploymentEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentEvent -> m DeploymentEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DeploymentEvent -> m DeploymentEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DeploymentEvent -> m DeploymentEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> DeploymentEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> DeploymentEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> DeploymentEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> DeploymentEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentEvent -> r
gmapT :: (forall b. Data b => b -> b) -> DeploymentEvent -> DeploymentEvent
$cgmapT :: (forall b. Data b => b -> b) -> DeploymentEvent -> DeploymentEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeploymentEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeploymentEvent)
dataTypeOf :: DeploymentEvent -> DataType
$cdataTypeOf :: DeploymentEvent -> DataType
toConstr :: DeploymentEvent -> Constr
$ctoConstr :: DeploymentEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DeploymentEvent -> c DeploymentEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DeploymentEvent -> c DeploymentEvent
Data, forall x. Rep DeploymentEvent x -> DeploymentEvent
forall x. DeploymentEvent -> Rep DeploymentEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeploymentEvent x -> DeploymentEvent
$cfrom :: forall x. DeploymentEvent -> Rep DeploymentEvent x
Generic)

instance EventHasSender DeploymentEvent where senderOfEvent :: DeploymentEvent -> HookUser
senderOfEvent = DeploymentEvent -> HookUser
evDeploymentSender
instance EventHasRepo DeploymentEvent where repoForEvent :: DeploymentEvent -> HookRepository
repoForEvent = DeploymentEvent -> HookRepository
evDeploymentRepo
instance NFData DeploymentEvent where rnf :: DeploymentEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


-- | Represents a deployment status.

-- Events of this type are not visible in timelines. These events are only used to trigger hooks.

-- See <https://developer.github.com/v3/activity/events/types/#deploymentstatusevent>.

data DeploymentStatusEvent = DeploymentStatusEvent
    { DeploymentStatusEvent -> HookDeploymentStatus
evDeplStatusInfo          :: !HookDeploymentStatus
    , DeploymentStatusEvent -> HookDeployment
evDeplStatusDeployment    :: !HookDeployment
    , DeploymentStatusEvent -> HookRepository
evDeplStatusRepo          :: !HookRepository
    , DeploymentStatusEvent -> HookUser
evDeplStatusSender        :: !HookUser
    }
    deriving (DeploymentStatusEvent -> DeploymentStatusEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeploymentStatusEvent -> DeploymentStatusEvent -> Bool
$c/= :: DeploymentStatusEvent -> DeploymentStatusEvent -> Bool
== :: DeploymentStatusEvent -> DeploymentStatusEvent -> Bool
$c== :: DeploymentStatusEvent -> DeploymentStatusEvent -> Bool
Eq, Int -> DeploymentStatusEvent -> ShowS
[DeploymentStatusEvent] -> ShowS
DeploymentStatusEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeploymentStatusEvent] -> ShowS
$cshowList :: [DeploymentStatusEvent] -> ShowS
show :: DeploymentStatusEvent -> String
$cshow :: DeploymentStatusEvent -> String
showsPrec :: Int -> DeploymentStatusEvent -> ShowS
$cshowsPrec :: Int -> DeploymentStatusEvent -> ShowS
Show, Typeable, Typeable DeploymentStatusEvent
DeploymentStatusEvent -> DataType
DeploymentStatusEvent -> Constr
(forall b. Data b => b -> b)
-> DeploymentStatusEvent -> DeploymentStatusEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> DeploymentStatusEvent -> u
forall u.
(forall d. Data d => d -> u) -> DeploymentStatusEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatusEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatusEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DeploymentStatusEvent -> m DeploymentStatusEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentStatusEvent -> m DeploymentStatusEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentStatusEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> DeploymentStatusEvent
-> c DeploymentStatusEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeploymentStatusEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentStatusEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentStatusEvent -> m DeploymentStatusEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentStatusEvent -> m DeploymentStatusEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentStatusEvent -> m DeploymentStatusEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentStatusEvent -> m DeploymentStatusEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DeploymentStatusEvent -> m DeploymentStatusEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DeploymentStatusEvent -> m DeploymentStatusEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> DeploymentStatusEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> DeploymentStatusEvent -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> DeploymentStatusEvent -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> DeploymentStatusEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatusEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatusEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatusEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatusEvent -> r
gmapT :: (forall b. Data b => b -> b)
-> DeploymentStatusEvent -> DeploymentStatusEvent
$cgmapT :: (forall b. Data b => b -> b)
-> DeploymentStatusEvent -> DeploymentStatusEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentStatusEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentStatusEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeploymentStatusEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeploymentStatusEvent)
dataTypeOf :: DeploymentStatusEvent -> DataType
$cdataTypeOf :: DeploymentStatusEvent -> DataType
toConstr :: DeploymentStatusEvent -> Constr
$ctoConstr :: DeploymentStatusEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentStatusEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentStatusEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> DeploymentStatusEvent
-> c DeploymentStatusEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> DeploymentStatusEvent
-> c DeploymentStatusEvent
Data, forall x. Rep DeploymentStatusEvent x -> DeploymentStatusEvent
forall x. DeploymentStatusEvent -> Rep DeploymentStatusEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeploymentStatusEvent x -> DeploymentStatusEvent
$cfrom :: forall x. DeploymentStatusEvent -> Rep DeploymentStatusEvent x
Generic)

instance EventHasSender DeploymentStatusEvent where senderOfEvent :: DeploymentStatusEvent -> HookUser
senderOfEvent = DeploymentStatusEvent -> HookUser
evDeplStatusSender
instance EventHasRepo DeploymentStatusEvent where repoForEvent :: DeploymentStatusEvent -> HookRepository
repoForEvent = DeploymentStatusEvent -> HookRepository
evDeplStatusRepo
instance NFData DeploymentStatusEvent where rnf :: DeploymentStatusEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


-- | Triggered when a new download is created.

-- Events of this kind are no longer delivered.

-- See <https://developer.github.com/v3/activity/events/types/#downloadevent>.

data DownloadEvent = DownloadEvent

-- | Triggered when a user follows another user.

-- Events of this kind are no longer delivered.

-- See <https://developer.github.com/v3/activity/events/types/#downloadevent>.

data FollowEvent = FollowEvent

-- | Triggered when a user forks a repository.

-- See <https://developer.github.com/v3/activity/events/types/#forkevent>.

data ForkEvent = ForkEvent
    { ForkEvent -> HookRepository
evForkDestination         :: !HookRepository
    , ForkEvent -> HookRepository
evForkSource              :: !HookRepository
    , ForkEvent -> HookUser
evForkSender              :: !HookUser
    }
    deriving (ForkEvent -> ForkEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ForkEvent -> ForkEvent -> Bool
$c/= :: ForkEvent -> ForkEvent -> Bool
== :: ForkEvent -> ForkEvent -> Bool
$c== :: ForkEvent -> ForkEvent -> Bool
Eq, Int -> ForkEvent -> ShowS
[ForkEvent] -> ShowS
ForkEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ForkEvent] -> ShowS
$cshowList :: [ForkEvent] -> ShowS
show :: ForkEvent -> String
$cshow :: ForkEvent -> String
showsPrec :: Int -> ForkEvent -> ShowS
$cshowsPrec :: Int -> ForkEvent -> ShowS
Show, Typeable, Typeable ForkEvent
ForkEvent -> DataType
ForkEvent -> Constr
(forall b. Data b => b -> b) -> ForkEvent -> ForkEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ForkEvent -> u
forall u. (forall d. Data d => d -> u) -> ForkEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ForkEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ForkEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ForkEvent -> m ForkEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ForkEvent -> m ForkEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ForkEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ForkEvent -> c ForkEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ForkEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForkEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ForkEvent -> m ForkEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ForkEvent -> m ForkEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ForkEvent -> m ForkEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ForkEvent -> m ForkEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ForkEvent -> m ForkEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ForkEvent -> m ForkEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ForkEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ForkEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> ForkEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ForkEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ForkEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ForkEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ForkEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ForkEvent -> r
gmapT :: (forall b. Data b => b -> b) -> ForkEvent -> ForkEvent
$cgmapT :: (forall b. Data b => b -> b) -> ForkEvent -> ForkEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForkEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForkEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ForkEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ForkEvent)
dataTypeOf :: ForkEvent -> DataType
$cdataTypeOf :: ForkEvent -> DataType
toConstr :: ForkEvent -> Constr
$ctoConstr :: ForkEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ForkEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ForkEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ForkEvent -> c ForkEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ForkEvent -> c ForkEvent
Data, forall x. Rep ForkEvent x -> ForkEvent
forall x. ForkEvent -> Rep ForkEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ForkEvent x -> ForkEvent
$cfrom :: forall x. ForkEvent -> Rep ForkEvent x
Generic)

instance EventHasSender ForkEvent where senderOfEvent :: ForkEvent -> HookUser
senderOfEvent = ForkEvent -> HookUser
evForkSender
instance EventHasRepo ForkEvent where repoForEvent :: ForkEvent -> HookRepository
repoForEvent = ForkEvent -> HookRepository
evForkSource
instance NFData ForkEvent where rnf :: ForkEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


-- | Triggered when a patch is applied in the Fork Queue.

-- Events of this kind are no longer delivered.

-- See <https://developer.github.com/v3/activity/events/types/#forkapplyevent>.

data ForkApplyEvent = ForkApplyEvent


-- | Triggered when a Gist is created or updated.

-- Events of this kind are no longer delivered.

-- See <https://developer.github.com/v3/activity/events/types/#gistevent>.

data GistEvent = GistEvent


-- | Triggered when a Wiki page is created or updated.

-- See <https://developer.github.com/v3/activity/events/types/#gollumevent>.

data GollumEvent = GollumEvent
    { GollumEvent -> Vector HookWikiPage
evGollumPages             :: !(Vector HookWikiPage)
    , GollumEvent -> HookRepository
evGollumRepo              :: !HookRepository
    , GollumEvent -> HookUser
evGollumSender            :: !HookUser
    }
    deriving (GollumEvent -> GollumEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GollumEvent -> GollumEvent -> Bool
$c/= :: GollumEvent -> GollumEvent -> Bool
== :: GollumEvent -> GollumEvent -> Bool
$c== :: GollumEvent -> GollumEvent -> Bool
Eq, Int -> GollumEvent -> ShowS
[GollumEvent] -> ShowS
GollumEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GollumEvent] -> ShowS
$cshowList :: [GollumEvent] -> ShowS
show :: GollumEvent -> String
$cshow :: GollumEvent -> String
showsPrec :: Int -> GollumEvent -> ShowS
$cshowsPrec :: Int -> GollumEvent -> ShowS
Show, Typeable, Typeable GollumEvent
GollumEvent -> DataType
GollumEvent -> Constr
(forall b. Data b => b -> b) -> GollumEvent -> GollumEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> GollumEvent -> u
forall u. (forall d. Data d => d -> u) -> GollumEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> GollumEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> GollumEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> GollumEvent -> m GollumEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> GollumEvent -> m GollumEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GollumEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> GollumEvent -> c GollumEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c GollumEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c GollumEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> GollumEvent -> m GollumEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> GollumEvent -> m GollumEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> GollumEvent -> m GollumEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> GollumEvent -> m GollumEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> GollumEvent -> m GollumEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> GollumEvent -> m GollumEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> GollumEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> GollumEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> GollumEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> GollumEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> GollumEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> GollumEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> GollumEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> GollumEvent -> r
gmapT :: (forall b. Data b => b -> b) -> GollumEvent -> GollumEvent
$cgmapT :: (forall b. Data b => b -> b) -> GollumEvent -> GollumEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c GollumEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c GollumEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c GollumEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c GollumEvent)
dataTypeOf :: GollumEvent -> DataType
$cdataTypeOf :: GollumEvent -> DataType
toConstr :: GollumEvent -> Constr
$ctoConstr :: GollumEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GollumEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GollumEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> GollumEvent -> c GollumEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> GollumEvent -> c GollumEvent
Data, forall x. Rep GollumEvent x -> GollumEvent
forall x. GollumEvent -> Rep GollumEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GollumEvent x -> GollumEvent
$cfrom :: forall x. GollumEvent -> Rep GollumEvent x
Generic)

instance EventHasSender GollumEvent where senderOfEvent :: GollumEvent -> HookUser
senderOfEvent = GollumEvent -> HookUser
evGollumSender
instance EventHasRepo GollumEvent where repoForEvent :: GollumEvent -> HookRepository
repoForEvent = GollumEvent -> HookRepository
evGollumRepo
instance NFData GollumEvent where rnf :: GollumEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data InstallationEventAction
  -- | Decodes from "created"

  = InstallationCreatedAction
  -- | Decodes from "deleted"

  | InstallationDeletedAction
  -- | Decodes from "suspend"

  | InstallationSuspendAction
  -- | Decodes from "unsuspend"

  | InstallationUnsuspendAction
  -- | Decodes from "new_permissions_accepted"

  | InstallationNewPermissionsAcceptedAction
  -- | The result of decoding an unknown installation event action type

  | InstallationActionOther !Text
  deriving (InstallationEventAction -> InstallationEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstallationEventAction -> InstallationEventAction -> Bool
$c/= :: InstallationEventAction -> InstallationEventAction -> Bool
== :: InstallationEventAction -> InstallationEventAction -> Bool
$c== :: InstallationEventAction -> InstallationEventAction -> Bool
Eq, Eq InstallationEventAction
InstallationEventAction -> InstallationEventAction -> Bool
InstallationEventAction -> InstallationEventAction -> Ordering
InstallationEventAction
-> InstallationEventAction -> InstallationEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: InstallationEventAction
-> InstallationEventAction -> InstallationEventAction
$cmin :: InstallationEventAction
-> InstallationEventAction -> InstallationEventAction
max :: InstallationEventAction
-> InstallationEventAction -> InstallationEventAction
$cmax :: InstallationEventAction
-> InstallationEventAction -> InstallationEventAction
>= :: InstallationEventAction -> InstallationEventAction -> Bool
$c>= :: InstallationEventAction -> InstallationEventAction -> Bool
> :: InstallationEventAction -> InstallationEventAction -> Bool
$c> :: InstallationEventAction -> InstallationEventAction -> Bool
<= :: InstallationEventAction -> InstallationEventAction -> Bool
$c<= :: InstallationEventAction -> InstallationEventAction -> Bool
< :: InstallationEventAction -> InstallationEventAction -> Bool
$c< :: InstallationEventAction -> InstallationEventAction -> Bool
compare :: InstallationEventAction -> InstallationEventAction -> Ordering
$ccompare :: InstallationEventAction -> InstallationEventAction -> Ordering
Ord, Int -> InstallationEventAction -> ShowS
[InstallationEventAction] -> ShowS
InstallationEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstallationEventAction] -> ShowS
$cshowList :: [InstallationEventAction] -> ShowS
show :: InstallationEventAction -> String
$cshow :: InstallationEventAction -> String
showsPrec :: Int -> InstallationEventAction -> ShowS
$cshowsPrec :: Int -> InstallationEventAction -> ShowS
Show, forall x. Rep InstallationEventAction x -> InstallationEventAction
forall x. InstallationEventAction -> Rep InstallationEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstallationEventAction x -> InstallationEventAction
$cfrom :: forall x. InstallationEventAction -> Rep InstallationEventAction x
Generic, Typeable, Typeable InstallationEventAction
InstallationEventAction -> DataType
InstallationEventAction -> Constr
(forall b. Data b => b -> b)
-> InstallationEventAction -> InstallationEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> InstallationEventAction -> u
forall u.
(forall d. Data d => d -> u) -> InstallationEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationEventAction
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationEventAction
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> InstallationEventAction -> m InstallationEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationEventAction -> m InstallationEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c InstallationEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> InstallationEventAction
-> c InstallationEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c InstallationEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c InstallationEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationEventAction -> m InstallationEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationEventAction -> m InstallationEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationEventAction -> m InstallationEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationEventAction -> m InstallationEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> InstallationEventAction -> m InstallationEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> InstallationEventAction -> m InstallationEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> InstallationEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> InstallationEventAction -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> InstallationEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> InstallationEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationEventAction
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationEventAction
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationEventAction
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationEventAction
-> r
gmapT :: (forall b. Data b => b -> b)
-> InstallationEventAction -> InstallationEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> InstallationEventAction -> InstallationEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c InstallationEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c InstallationEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c InstallationEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c InstallationEventAction)
dataTypeOf :: InstallationEventAction -> DataType
$cdataTypeOf :: InstallationEventAction -> DataType
toConstr :: InstallationEventAction -> Constr
$ctoConstr :: InstallationEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c InstallationEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c InstallationEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> InstallationEventAction
-> c InstallationEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> InstallationEventAction
-> c InstallationEventAction
Data)

instance NFData InstallationEventAction where rnf :: InstallationEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON InstallationEventAction where
  parseJSON :: Value -> Parser InstallationEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Installation event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"created"                  -> forall (f :: * -> *) a. Applicative f => a -> f a
pure InstallationEventAction
InstallationCreatedAction
        Text
"deleted"                  -> forall (f :: * -> *) a. Applicative f => a -> f a
pure InstallationEventAction
InstallationDeletedAction
        Text
"suspend"                  -> forall (f :: * -> *) a. Applicative f => a -> f a
pure InstallationEventAction
InstallationSuspendAction
        Text
"unsuspend"                -> forall (f :: * -> *) a. Applicative f => a -> f a
pure InstallationEventAction
InstallationUnsuspendAction
        Text
"new_permissions_accepted" -> forall (f :: * -> *) a. Applicative f => a -> f a
pure InstallationEventAction
InstallationNewPermissionsAcceptedAction
        Text
_                          -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> InstallationEventAction
InstallationActionOther Text
t)

-- | Triggered when a GitHub App has been installed or uninstalled.

-- See <https://developer.github.com/v3/activity/events/types/#installationevent>.

data InstallationEvent = InstallationEvent
    { InstallationEvent -> InstallationEventAction
evInstallationAction      :: !InstallationEventAction
    , InstallationEvent -> HookInstallation
evInstallationInfo        :: !HookInstallation
    , InstallationEvent -> Vector HookRepositorySimple
evInstallationRepos       :: !(Vector HookRepositorySimple)
    , InstallationEvent -> HookUser
evInstallationSender      :: !HookUser
    }
    deriving (InstallationEvent -> InstallationEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstallationEvent -> InstallationEvent -> Bool
$c/= :: InstallationEvent -> InstallationEvent -> Bool
== :: InstallationEvent -> InstallationEvent -> Bool
$c== :: InstallationEvent -> InstallationEvent -> Bool
Eq, Int -> InstallationEvent -> ShowS
[InstallationEvent] -> ShowS
InstallationEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstallationEvent] -> ShowS
$cshowList :: [InstallationEvent] -> ShowS
show :: InstallationEvent -> String
$cshow :: InstallationEvent -> String
showsPrec :: Int -> InstallationEvent -> ShowS
$cshowsPrec :: Int -> InstallationEvent -> ShowS
Show, Typeable, Typeable InstallationEvent
InstallationEvent -> DataType
InstallationEvent -> Constr
(forall b. Data b => b -> b)
-> InstallationEvent -> InstallationEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> InstallationEvent -> u
forall u. (forall d. Data d => d -> u) -> InstallationEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> InstallationEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> InstallationEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> InstallationEvent -> m InstallationEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationEvent -> m InstallationEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c InstallationEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> InstallationEvent -> c InstallationEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c InstallationEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c InstallationEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationEvent -> m InstallationEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationEvent -> m InstallationEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationEvent -> m InstallationEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationEvent -> m InstallationEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> InstallationEvent -> m InstallationEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> InstallationEvent -> m InstallationEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> InstallationEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> InstallationEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> InstallationEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> InstallationEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> InstallationEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> InstallationEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> InstallationEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> InstallationEvent -> r
gmapT :: (forall b. Data b => b -> b)
-> InstallationEvent -> InstallationEvent
$cgmapT :: (forall b. Data b => b -> b)
-> InstallationEvent -> InstallationEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c InstallationEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c InstallationEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c InstallationEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c InstallationEvent)
dataTypeOf :: InstallationEvent -> DataType
$cdataTypeOf :: InstallationEvent -> DataType
toConstr :: InstallationEvent -> Constr
$ctoConstr :: InstallationEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c InstallationEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c InstallationEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> InstallationEvent -> c InstallationEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> InstallationEvent -> c InstallationEvent
Data, forall x. Rep InstallationEvent x -> InstallationEvent
forall x. InstallationEvent -> Rep InstallationEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstallationEvent x -> InstallationEvent
$cfrom :: forall x. InstallationEvent -> Rep InstallationEvent x
Generic)

instance EventHasSender InstallationEvent where senderOfEvent :: InstallationEvent -> HookUser
senderOfEvent = InstallationEvent -> HookUser
evInstallationSender
instance NFData InstallationEvent where rnf :: InstallationEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data InstallationRepoEventAction
  -- | Decodes from "added"

  = InstallationRepoAddedAction
  -- | Decodes from "removed"

  | InstallationRepoRemovedAction
  -- | The result of decoding an unknown installation repo event action type

  | InstallationRepoActionOther !Text
  deriving (InstallationRepoEventAction -> InstallationRepoEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstallationRepoEventAction -> InstallationRepoEventAction -> Bool
$c/= :: InstallationRepoEventAction -> InstallationRepoEventAction -> Bool
== :: InstallationRepoEventAction -> InstallationRepoEventAction -> Bool
$c== :: InstallationRepoEventAction -> InstallationRepoEventAction -> Bool
Eq, Eq InstallationRepoEventAction
InstallationRepoEventAction -> InstallationRepoEventAction -> Bool
InstallationRepoEventAction
-> InstallationRepoEventAction -> Ordering
InstallationRepoEventAction
-> InstallationRepoEventAction -> InstallationRepoEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: InstallationRepoEventAction
-> InstallationRepoEventAction -> InstallationRepoEventAction
$cmin :: InstallationRepoEventAction
-> InstallationRepoEventAction -> InstallationRepoEventAction
max :: InstallationRepoEventAction
-> InstallationRepoEventAction -> InstallationRepoEventAction
$cmax :: InstallationRepoEventAction
-> InstallationRepoEventAction -> InstallationRepoEventAction
>= :: InstallationRepoEventAction -> InstallationRepoEventAction -> Bool
$c>= :: InstallationRepoEventAction -> InstallationRepoEventAction -> Bool
> :: InstallationRepoEventAction -> InstallationRepoEventAction -> Bool
$c> :: InstallationRepoEventAction -> InstallationRepoEventAction -> Bool
<= :: InstallationRepoEventAction -> InstallationRepoEventAction -> Bool
$c<= :: InstallationRepoEventAction -> InstallationRepoEventAction -> Bool
< :: InstallationRepoEventAction -> InstallationRepoEventAction -> Bool
$c< :: InstallationRepoEventAction -> InstallationRepoEventAction -> Bool
compare :: InstallationRepoEventAction
-> InstallationRepoEventAction -> Ordering
$ccompare :: InstallationRepoEventAction
-> InstallationRepoEventAction -> Ordering
Ord, Int -> InstallationRepoEventAction -> ShowS
[InstallationRepoEventAction] -> ShowS
InstallationRepoEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstallationRepoEventAction] -> ShowS
$cshowList :: [InstallationRepoEventAction] -> ShowS
show :: InstallationRepoEventAction -> String
$cshow :: InstallationRepoEventAction -> String
showsPrec :: Int -> InstallationRepoEventAction -> ShowS
$cshowsPrec :: Int -> InstallationRepoEventAction -> ShowS
Show, forall x.
Rep InstallationRepoEventAction x -> InstallationRepoEventAction
forall x.
InstallationRepoEventAction -> Rep InstallationRepoEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InstallationRepoEventAction x -> InstallationRepoEventAction
$cfrom :: forall x.
InstallationRepoEventAction -> Rep InstallationRepoEventAction x
Generic, Typeable, Typeable InstallationRepoEventAction
InstallationRepoEventAction -> DataType
InstallationRepoEventAction -> Constr
(forall b. Data b => b -> b)
-> InstallationRepoEventAction -> InstallationRepoEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int
-> (forall d. Data d => d -> u) -> InstallationRepoEventAction -> u
forall u.
(forall d. Data d => d -> u) -> InstallationRepoEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationRepoEventAction
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationRepoEventAction
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> InstallationRepoEventAction -> m InstallationRepoEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationRepoEventAction -> m InstallationRepoEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c InstallationRepoEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> InstallationRepoEventAction
-> c InstallationRepoEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c InstallationRepoEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c InstallationRepoEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationRepoEventAction -> m InstallationRepoEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationRepoEventAction -> m InstallationRepoEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationRepoEventAction -> m InstallationRepoEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationRepoEventAction -> m InstallationRepoEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> InstallationRepoEventAction -> m InstallationRepoEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> InstallationRepoEventAction -> m InstallationRepoEventAction
gmapQi :: forall u.
Int
-> (forall d. Data d => d -> u) -> InstallationRepoEventAction -> u
$cgmapQi :: forall u.
Int
-> (forall d. Data d => d -> u) -> InstallationRepoEventAction -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> InstallationRepoEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> InstallationRepoEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationRepoEventAction
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationRepoEventAction
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationRepoEventAction
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationRepoEventAction
-> r
gmapT :: (forall b. Data b => b -> b)
-> InstallationRepoEventAction -> InstallationRepoEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> InstallationRepoEventAction -> InstallationRepoEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c InstallationRepoEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c InstallationRepoEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c InstallationRepoEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c InstallationRepoEventAction)
dataTypeOf :: InstallationRepoEventAction -> DataType
$cdataTypeOf :: InstallationRepoEventAction -> DataType
toConstr :: InstallationRepoEventAction -> Constr
$ctoConstr :: InstallationRepoEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c InstallationRepoEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c InstallationRepoEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> InstallationRepoEventAction
-> c InstallationRepoEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> InstallationRepoEventAction
-> c InstallationRepoEventAction
Data)

instance NFData InstallationRepoEventAction where rnf :: InstallationRepoEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON InstallationRepoEventAction where
  parseJSON :: Value -> Parser InstallationRepoEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Installation repo event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"added"         -> forall (f :: * -> *) a. Applicative f => a -> f a
pure InstallationRepoEventAction
InstallationRepoAddedAction
        Text
"removed"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure InstallationRepoEventAction
InstallationRepoRemovedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> InstallationRepoEventAction
InstallationRepoActionOther Text
t)

-- | Triggered when a repository is added or removed from an installation.

-- See <https://developer.github.com/v3/activity/events/types/#installationrepositoriesevent>.

data InstallationRepositoriesEvent = InstallationRepositoriesEvent
    { InstallationRepositoriesEvent -> InstallationRepoEventAction
evInstallationRepoAction  :: !InstallationRepoEventAction
    , InstallationRepositoriesEvent -> HookInstallation
evInstallationRepoInfo    :: !HookInstallation
    , InstallationRepositoriesEvent -> Text
evInstallationRepoSel     :: !Text
    , InstallationRepositoriesEvent -> Vector HookRepositorySimple
evInstallationReposAdd    :: !(Vector HookRepositorySimple)
    , InstallationRepositoriesEvent -> Vector HookRepositorySimple
evInstallationReposRemove :: !(Vector HookRepositorySimple)
    , InstallationRepositoriesEvent -> HookUser
evInstallationReposSender :: !HookUser
    }
    deriving (InstallationRepositoriesEvent
-> InstallationRepositoriesEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstallationRepositoriesEvent
-> InstallationRepositoriesEvent -> Bool
$c/= :: InstallationRepositoriesEvent
-> InstallationRepositoriesEvent -> Bool
== :: InstallationRepositoriesEvent
-> InstallationRepositoriesEvent -> Bool
$c== :: InstallationRepositoriesEvent
-> InstallationRepositoriesEvent -> Bool
Eq, Int -> InstallationRepositoriesEvent -> ShowS
[InstallationRepositoriesEvent] -> ShowS
InstallationRepositoriesEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstallationRepositoriesEvent] -> ShowS
$cshowList :: [InstallationRepositoriesEvent] -> ShowS
show :: InstallationRepositoriesEvent -> String
$cshow :: InstallationRepositoriesEvent -> String
showsPrec :: Int -> InstallationRepositoriesEvent -> ShowS
$cshowsPrec :: Int -> InstallationRepositoriesEvent -> ShowS
Show, Typeable, Typeable InstallationRepositoriesEvent
InstallationRepositoriesEvent -> DataType
InstallationRepositoriesEvent -> Constr
(forall b. Data b => b -> b)
-> InstallationRepositoriesEvent -> InstallationRepositoriesEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int
-> (forall d. Data d => d -> u)
-> InstallationRepositoriesEvent
-> u
forall u.
(forall d. Data d => d -> u)
-> InstallationRepositoriesEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationRepositoriesEvent
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationRepositoriesEvent
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> InstallationRepositoriesEvent -> m InstallationRepositoriesEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationRepositoriesEvent -> m InstallationRepositoriesEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c InstallationRepositoriesEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> InstallationRepositoriesEvent
-> c InstallationRepositoriesEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c InstallationRepositoriesEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c InstallationRepositoriesEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationRepositoriesEvent -> m InstallationRepositoriesEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationRepositoriesEvent -> m InstallationRepositoriesEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationRepositoriesEvent -> m InstallationRepositoriesEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> InstallationRepositoriesEvent -> m InstallationRepositoriesEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> InstallationRepositoriesEvent -> m InstallationRepositoriesEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> InstallationRepositoriesEvent -> m InstallationRepositoriesEvent
gmapQi :: forall u.
Int
-> (forall d. Data d => d -> u)
-> InstallationRepositoriesEvent
-> u
$cgmapQi :: forall u.
Int
-> (forall d. Data d => d -> u)
-> InstallationRepositoriesEvent
-> u
gmapQ :: forall u.
(forall d. Data d => d -> u)
-> InstallationRepositoriesEvent -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u)
-> InstallationRepositoriesEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationRepositoriesEvent
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationRepositoriesEvent
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationRepositoriesEvent
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> InstallationRepositoriesEvent
-> r
gmapT :: (forall b. Data b => b -> b)
-> InstallationRepositoriesEvent -> InstallationRepositoriesEvent
$cgmapT :: (forall b. Data b => b -> b)
-> InstallationRepositoriesEvent -> InstallationRepositoriesEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c InstallationRepositoriesEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c InstallationRepositoriesEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c InstallationRepositoriesEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c InstallationRepositoriesEvent)
dataTypeOf :: InstallationRepositoriesEvent -> DataType
$cdataTypeOf :: InstallationRepositoriesEvent -> DataType
toConstr :: InstallationRepositoriesEvent -> Constr
$ctoConstr :: InstallationRepositoriesEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c InstallationRepositoriesEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c InstallationRepositoriesEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> InstallationRepositoriesEvent
-> c InstallationRepositoriesEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> InstallationRepositoriesEvent
-> c InstallationRepositoriesEvent
Data, forall x.
Rep InstallationRepositoriesEvent x
-> InstallationRepositoriesEvent
forall x.
InstallationRepositoriesEvent
-> Rep InstallationRepositoriesEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InstallationRepositoriesEvent x
-> InstallationRepositoriesEvent
$cfrom :: forall x.
InstallationRepositoriesEvent
-> Rep InstallationRepositoriesEvent x
Generic)

instance EventHasSender InstallationRepositoriesEvent where senderOfEvent :: InstallationRepositoriesEvent -> HookUser
senderOfEvent = InstallationRepositoriesEvent -> HookUser
evInstallationReposSender
instance NFData InstallationRepositoriesEvent where rnf :: InstallationRepositoriesEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data IssueCommentEventAction
  -- | Decodes from "created"

  = IssueCommentCreatedAction
  -- | Decodes from "edited"

  | IssueCommentEditedAction
  -- | Decodes from "deleted"

  | IssueCommentDeletedAction
  -- | The result of decoding an unknown issue comment event action type

  | IssueCommentActionOther !Text
  deriving (IssueCommentEventAction -> IssueCommentEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssueCommentEventAction -> IssueCommentEventAction -> Bool
$c/= :: IssueCommentEventAction -> IssueCommentEventAction -> Bool
== :: IssueCommentEventAction -> IssueCommentEventAction -> Bool
$c== :: IssueCommentEventAction -> IssueCommentEventAction -> Bool
Eq, Eq IssueCommentEventAction
IssueCommentEventAction -> IssueCommentEventAction -> Bool
IssueCommentEventAction -> IssueCommentEventAction -> Ordering
IssueCommentEventAction
-> IssueCommentEventAction -> IssueCommentEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: IssueCommentEventAction
-> IssueCommentEventAction -> IssueCommentEventAction
$cmin :: IssueCommentEventAction
-> IssueCommentEventAction -> IssueCommentEventAction
max :: IssueCommentEventAction
-> IssueCommentEventAction -> IssueCommentEventAction
$cmax :: IssueCommentEventAction
-> IssueCommentEventAction -> IssueCommentEventAction
>= :: IssueCommentEventAction -> IssueCommentEventAction -> Bool
$c>= :: IssueCommentEventAction -> IssueCommentEventAction -> Bool
> :: IssueCommentEventAction -> IssueCommentEventAction -> Bool
$c> :: IssueCommentEventAction -> IssueCommentEventAction -> Bool
<= :: IssueCommentEventAction -> IssueCommentEventAction -> Bool
$c<= :: IssueCommentEventAction -> IssueCommentEventAction -> Bool
< :: IssueCommentEventAction -> IssueCommentEventAction -> Bool
$c< :: IssueCommentEventAction -> IssueCommentEventAction -> Bool
compare :: IssueCommentEventAction -> IssueCommentEventAction -> Ordering
$ccompare :: IssueCommentEventAction -> IssueCommentEventAction -> Ordering
Ord, Int -> IssueCommentEventAction -> ShowS
[IssueCommentEventAction] -> ShowS
IssueCommentEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssueCommentEventAction] -> ShowS
$cshowList :: [IssueCommentEventAction] -> ShowS
show :: IssueCommentEventAction -> String
$cshow :: IssueCommentEventAction -> String
showsPrec :: Int -> IssueCommentEventAction -> ShowS
$cshowsPrec :: Int -> IssueCommentEventAction -> ShowS
Show, forall x. Rep IssueCommentEventAction x -> IssueCommentEventAction
forall x. IssueCommentEventAction -> Rep IssueCommentEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IssueCommentEventAction x -> IssueCommentEventAction
$cfrom :: forall x. IssueCommentEventAction -> Rep IssueCommentEventAction x
Generic, Typeable, Typeable IssueCommentEventAction
IssueCommentEventAction -> DataType
IssueCommentEventAction -> Constr
(forall b. Data b => b -> b)
-> IssueCommentEventAction -> IssueCommentEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> IssueCommentEventAction -> u
forall u.
(forall d. Data d => d -> u) -> IssueCommentEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> IssueCommentEventAction
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> IssueCommentEventAction
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IssueCommentEventAction -> m IssueCommentEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssueCommentEventAction -> m IssueCommentEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssueCommentEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> IssueCommentEventAction
-> c IssueCommentEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssueCommentEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssueCommentEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssueCommentEventAction -> m IssueCommentEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssueCommentEventAction -> m IssueCommentEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssueCommentEventAction -> m IssueCommentEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssueCommentEventAction -> m IssueCommentEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IssueCommentEventAction -> m IssueCommentEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IssueCommentEventAction -> m IssueCommentEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> IssueCommentEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> IssueCommentEventAction -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> IssueCommentEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> IssueCommentEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> IssueCommentEventAction
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> IssueCommentEventAction
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> IssueCommentEventAction
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> IssueCommentEventAction
-> r
gmapT :: (forall b. Data b => b -> b)
-> IssueCommentEventAction -> IssueCommentEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> IssueCommentEventAction -> IssueCommentEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssueCommentEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssueCommentEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssueCommentEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssueCommentEventAction)
dataTypeOf :: IssueCommentEventAction -> DataType
$cdataTypeOf :: IssueCommentEventAction -> DataType
toConstr :: IssueCommentEventAction -> Constr
$ctoConstr :: IssueCommentEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssueCommentEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssueCommentEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> IssueCommentEventAction
-> c IssueCommentEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> IssueCommentEventAction
-> c IssueCommentEventAction
Data)

instance NFData IssueCommentEventAction where rnf :: IssueCommentEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON IssueCommentEventAction where
  parseJSON :: Value -> Parser IssueCommentEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Issue comment event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"created"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure IssueCommentEventAction
IssueCommentCreatedAction
        Text
"edited"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure IssueCommentEventAction
IssueCommentEditedAction
        Text
"deleted"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure IssueCommentEventAction
IssueCommentDeletedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> IssueCommentEventAction
IssueCommentActionOther Text
t)

-- | Triggered when an issue comment is created, edited, or deleted.

-- See <https://developer.github.com/v3/activity/events/types/#issuecommentevent>.

data IssueCommentEvent = IssueCommentEvent
    { IssueCommentEvent -> IssueCommentEventAction
evIssueCommentAction      :: !IssueCommentEventAction
    , IssueCommentEvent -> HookIssue
evIssueCommentIssue       :: !HookIssue
    , IssueCommentEvent -> HookIssueComment
evIssueCommentPayload     :: !HookIssueComment
    , IssueCommentEvent -> HookRepository
evIssueCommentRepo        :: !HookRepository
    , IssueCommentEvent -> HookUser
evIssueCommentSender      :: !HookUser
    }
    deriving (IssueCommentEvent -> IssueCommentEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssueCommentEvent -> IssueCommentEvent -> Bool
$c/= :: IssueCommentEvent -> IssueCommentEvent -> Bool
== :: IssueCommentEvent -> IssueCommentEvent -> Bool
$c== :: IssueCommentEvent -> IssueCommentEvent -> Bool
Eq, Int -> IssueCommentEvent -> ShowS
[IssueCommentEvent] -> ShowS
IssueCommentEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssueCommentEvent] -> ShowS
$cshowList :: [IssueCommentEvent] -> ShowS
show :: IssueCommentEvent -> String
$cshow :: IssueCommentEvent -> String
showsPrec :: Int -> IssueCommentEvent -> ShowS
$cshowsPrec :: Int -> IssueCommentEvent -> ShowS
Show, Typeable, Typeable IssueCommentEvent
IssueCommentEvent -> DataType
IssueCommentEvent -> Constr
(forall b. Data b => b -> b)
-> IssueCommentEvent -> IssueCommentEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> IssueCommentEvent -> u
forall u. (forall d. Data d => d -> u) -> IssueCommentEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IssueCommentEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IssueCommentEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IssueCommentEvent -> m IssueCommentEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssueCommentEvent -> m IssueCommentEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssueCommentEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IssueCommentEvent -> c IssueCommentEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssueCommentEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssueCommentEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssueCommentEvent -> m IssueCommentEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssueCommentEvent -> m IssueCommentEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssueCommentEvent -> m IssueCommentEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssueCommentEvent -> m IssueCommentEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IssueCommentEvent -> m IssueCommentEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IssueCommentEvent -> m IssueCommentEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> IssueCommentEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> IssueCommentEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> IssueCommentEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> IssueCommentEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IssueCommentEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IssueCommentEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IssueCommentEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IssueCommentEvent -> r
gmapT :: (forall b. Data b => b -> b)
-> IssueCommentEvent -> IssueCommentEvent
$cgmapT :: (forall b. Data b => b -> b)
-> IssueCommentEvent -> IssueCommentEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssueCommentEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssueCommentEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssueCommentEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssueCommentEvent)
dataTypeOf :: IssueCommentEvent -> DataType
$cdataTypeOf :: IssueCommentEvent -> DataType
toConstr :: IssueCommentEvent -> Constr
$ctoConstr :: IssueCommentEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssueCommentEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssueCommentEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IssueCommentEvent -> c IssueCommentEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IssueCommentEvent -> c IssueCommentEvent
Data, forall x. Rep IssueCommentEvent x -> IssueCommentEvent
forall x. IssueCommentEvent -> Rep IssueCommentEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IssueCommentEvent x -> IssueCommentEvent
$cfrom :: forall x. IssueCommentEvent -> Rep IssueCommentEvent x
Generic)

instance EventHasSender IssueCommentEvent where senderOfEvent :: IssueCommentEvent -> HookUser
senderOfEvent = IssueCommentEvent -> HookUser
evIssueCommentSender
instance EventHasRepo IssueCommentEvent where repoForEvent :: IssueCommentEvent -> HookRepository
repoForEvent = IssueCommentEvent -> HookRepository
evIssueCommentRepo
instance NFData IssueCommentEvent where rnf :: IssueCommentEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data IssuesEventAction
  -- | Decodes from "assigned"

  = IssuesAssignedAction
  -- | Decodes from "unassigned"

  | IssuesUnassignedAction
  -- | Decodes from "labeled"

  | IssuesLabeledAction
  -- | Decodes from "unlabeled"

  | IssuesUnlabeledAction
  -- | Decodes from "opened"

  | IssuesOpenedAction
  -- | Decodes from "edited"

  | IssuesEditedAction
  -- | Decodes from "milestoned"

  | IssuesMilestonedAction
  -- | Decodes from "demilestoned"

  | IssuesDemilestonedAction
  -- | Decodes from "closed"

  | IssuesClosedAction
  -- | Decodes from "reopened"

  | IssuesReopenedAction
  -- | The result of decoding an unknown issue comment event action type

  | IssuesActionOther !Text
  deriving (IssuesEventAction -> IssuesEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuesEventAction -> IssuesEventAction -> Bool
$c/= :: IssuesEventAction -> IssuesEventAction -> Bool
== :: IssuesEventAction -> IssuesEventAction -> Bool
$c== :: IssuesEventAction -> IssuesEventAction -> Bool
Eq, Eq IssuesEventAction
IssuesEventAction -> IssuesEventAction -> Bool
IssuesEventAction -> IssuesEventAction -> Ordering
IssuesEventAction -> IssuesEventAction -> IssuesEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: IssuesEventAction -> IssuesEventAction -> IssuesEventAction
$cmin :: IssuesEventAction -> IssuesEventAction -> IssuesEventAction
max :: IssuesEventAction -> IssuesEventAction -> IssuesEventAction
$cmax :: IssuesEventAction -> IssuesEventAction -> IssuesEventAction
>= :: IssuesEventAction -> IssuesEventAction -> Bool
$c>= :: IssuesEventAction -> IssuesEventAction -> Bool
> :: IssuesEventAction -> IssuesEventAction -> Bool
$c> :: IssuesEventAction -> IssuesEventAction -> Bool
<= :: IssuesEventAction -> IssuesEventAction -> Bool
$c<= :: IssuesEventAction -> IssuesEventAction -> Bool
< :: IssuesEventAction -> IssuesEventAction -> Bool
$c< :: IssuesEventAction -> IssuesEventAction -> Bool
compare :: IssuesEventAction -> IssuesEventAction -> Ordering
$ccompare :: IssuesEventAction -> IssuesEventAction -> Ordering
Ord, Int -> IssuesEventAction -> ShowS
[IssuesEventAction] -> ShowS
IssuesEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuesEventAction] -> ShowS
$cshowList :: [IssuesEventAction] -> ShowS
show :: IssuesEventAction -> String
$cshow :: IssuesEventAction -> String
showsPrec :: Int -> IssuesEventAction -> ShowS
$cshowsPrec :: Int -> IssuesEventAction -> ShowS
Show, forall x. Rep IssuesEventAction x -> IssuesEventAction
forall x. IssuesEventAction -> Rep IssuesEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IssuesEventAction x -> IssuesEventAction
$cfrom :: forall x. IssuesEventAction -> Rep IssuesEventAction x
Generic, Typeable, Typeable IssuesEventAction
IssuesEventAction -> DataType
IssuesEventAction -> Constr
(forall b. Data b => b -> b)
-> IssuesEventAction -> IssuesEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> IssuesEventAction -> u
forall u. (forall d. Data d => d -> u) -> IssuesEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IssuesEventAction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IssuesEventAction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IssuesEventAction -> m IssuesEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssuesEventAction -> m IssuesEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssuesEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IssuesEventAction -> c IssuesEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssuesEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssuesEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssuesEventAction -> m IssuesEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssuesEventAction -> m IssuesEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssuesEventAction -> m IssuesEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IssuesEventAction -> m IssuesEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IssuesEventAction -> m IssuesEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IssuesEventAction -> m IssuesEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> IssuesEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> IssuesEventAction -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> IssuesEventAction -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> IssuesEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IssuesEventAction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IssuesEventAction -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IssuesEventAction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IssuesEventAction -> r
gmapT :: (forall b. Data b => b -> b)
-> IssuesEventAction -> IssuesEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> IssuesEventAction -> IssuesEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssuesEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssuesEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssuesEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssuesEventAction)
dataTypeOf :: IssuesEventAction -> DataType
$cdataTypeOf :: IssuesEventAction -> DataType
toConstr :: IssuesEventAction -> Constr
$ctoConstr :: IssuesEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssuesEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssuesEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IssuesEventAction -> c IssuesEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IssuesEventAction -> c IssuesEventAction
Data)

instance NFData IssuesEventAction where rnf :: IssuesEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON IssuesEventAction where
  parseJSON :: Value -> Parser IssuesEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Issue comment event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"assigned"      -> forall (f :: * -> *) a. Applicative f => a -> f a
pure IssuesEventAction
IssuesAssignedAction
        Text
"unassigned"    -> forall (f :: * -> *) a. Applicative f => a -> f a
pure IssuesEventAction
IssuesUnassignedAction
        Text
"labeled"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure IssuesEventAction
IssuesLabeledAction
        Text
"unlabeled"     -> forall (f :: * -> *) a. Applicative f => a -> f a
pure IssuesEventAction
IssuesUnlabeledAction
        Text
"opened"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure IssuesEventAction
IssuesOpenedAction
        Text
"edited"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure IssuesEventAction
IssuesEditedAction
        Text
"milestoned"    -> forall (f :: * -> *) a. Applicative f => a -> f a
pure IssuesEventAction
IssuesMilestonedAction
        Text
"demilestoned"  -> forall (f :: * -> *) a. Applicative f => a -> f a
pure IssuesEventAction
IssuesDemilestonedAction
        Text
"closed"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure IssuesEventAction
IssuesClosedAction
        Text
"reopened"      -> forall (f :: * -> *) a. Applicative f => a -> f a
pure IssuesEventAction
IssuesReopenedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> IssuesEventAction
IssuesActionOther Text
t)

-- | Triggered when an issue is assigned, unassigned, labeled,

--  unlabeled, opened, edited, milestoned, demilestoned, closed, or reopened.

-- See <https://developer.github.com/v3/activity/events/types/#issuesevent>.

data IssuesEvent = IssuesEvent
    { IssuesEvent -> IssuesEventAction
evIssuesEventAction       :: !IssuesEventAction
    , IssuesEvent -> HookIssue
evIssuesEventIssue        :: !HookIssue
    , IssuesEvent -> HookRepository
evIssuesEventRepo         :: !HookRepository
    , IssuesEvent -> HookUser
evIssuesEventSender       :: !HookUser
    }
    deriving (IssuesEvent -> IssuesEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuesEvent -> IssuesEvent -> Bool
$c/= :: IssuesEvent -> IssuesEvent -> Bool
== :: IssuesEvent -> IssuesEvent -> Bool
$c== :: IssuesEvent -> IssuesEvent -> Bool
Eq, Int -> IssuesEvent -> ShowS
[IssuesEvent] -> ShowS
IssuesEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuesEvent] -> ShowS
$cshowList :: [IssuesEvent] -> ShowS
show :: IssuesEvent -> String
$cshow :: IssuesEvent -> String
showsPrec :: Int -> IssuesEvent -> ShowS
$cshowsPrec :: Int -> IssuesEvent -> ShowS
Show, Typeable, Typeable IssuesEvent
IssuesEvent -> DataType
IssuesEvent -> Constr
(forall b. Data b => b -> b) -> IssuesEvent -> IssuesEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> IssuesEvent -> u
forall u. (forall d. Data d => d -> u) -> IssuesEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IssuesEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IssuesEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> IssuesEvent -> m IssuesEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IssuesEvent -> m IssuesEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssuesEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IssuesEvent -> c IssuesEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssuesEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssuesEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IssuesEvent -> m IssuesEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IssuesEvent -> m IssuesEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IssuesEvent -> m IssuesEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IssuesEvent -> m IssuesEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> IssuesEvent -> m IssuesEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> IssuesEvent -> m IssuesEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> IssuesEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> IssuesEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> IssuesEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> IssuesEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IssuesEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IssuesEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IssuesEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IssuesEvent -> r
gmapT :: (forall b. Data b => b -> b) -> IssuesEvent -> IssuesEvent
$cgmapT :: (forall b. Data b => b -> b) -> IssuesEvent -> IssuesEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssuesEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IssuesEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssuesEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssuesEvent)
dataTypeOf :: IssuesEvent -> DataType
$cdataTypeOf :: IssuesEvent -> DataType
toConstr :: IssuesEvent -> Constr
$ctoConstr :: IssuesEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssuesEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssuesEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IssuesEvent -> c IssuesEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IssuesEvent -> c IssuesEvent
Data, forall x. Rep IssuesEvent x -> IssuesEvent
forall x. IssuesEvent -> Rep IssuesEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IssuesEvent x -> IssuesEvent
$cfrom :: forall x. IssuesEvent -> Rep IssuesEvent x
Generic)

instance EventHasSender IssuesEvent where senderOfEvent :: IssuesEvent -> HookUser
senderOfEvent = IssuesEvent -> HookUser
evIssuesEventSender
instance EventHasRepo IssuesEvent where repoForEvent :: IssuesEvent -> HookRepository
repoForEvent = IssuesEvent -> HookRepository
evIssuesEventRepo
instance NFData IssuesEvent where rnf :: IssuesEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data LabelEventAction
  -- | Decodes from "created"

  = LabelCreatedAction
  -- | Decodes from "edited"

  | LabelEditedAction
  -- | Decodes from "deleted"

  | LabelDeletedAction
  -- | The result of decoding an unknown label event action type

  | LabelActionOther !Text
  deriving (LabelEventAction -> LabelEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LabelEventAction -> LabelEventAction -> Bool
$c/= :: LabelEventAction -> LabelEventAction -> Bool
== :: LabelEventAction -> LabelEventAction -> Bool
$c== :: LabelEventAction -> LabelEventAction -> Bool
Eq, Eq LabelEventAction
LabelEventAction -> LabelEventAction -> Bool
LabelEventAction -> LabelEventAction -> Ordering
LabelEventAction -> LabelEventAction -> LabelEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: LabelEventAction -> LabelEventAction -> LabelEventAction
$cmin :: LabelEventAction -> LabelEventAction -> LabelEventAction
max :: LabelEventAction -> LabelEventAction -> LabelEventAction
$cmax :: LabelEventAction -> LabelEventAction -> LabelEventAction
>= :: LabelEventAction -> LabelEventAction -> Bool
$c>= :: LabelEventAction -> LabelEventAction -> Bool
> :: LabelEventAction -> LabelEventAction -> Bool
$c> :: LabelEventAction -> LabelEventAction -> Bool
<= :: LabelEventAction -> LabelEventAction -> Bool
$c<= :: LabelEventAction -> LabelEventAction -> Bool
< :: LabelEventAction -> LabelEventAction -> Bool
$c< :: LabelEventAction -> LabelEventAction -> Bool
compare :: LabelEventAction -> LabelEventAction -> Ordering
$ccompare :: LabelEventAction -> LabelEventAction -> Ordering
Ord, Int -> LabelEventAction -> ShowS
[LabelEventAction] -> ShowS
LabelEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LabelEventAction] -> ShowS
$cshowList :: [LabelEventAction] -> ShowS
show :: LabelEventAction -> String
$cshow :: LabelEventAction -> String
showsPrec :: Int -> LabelEventAction -> ShowS
$cshowsPrec :: Int -> LabelEventAction -> ShowS
Show, forall x. Rep LabelEventAction x -> LabelEventAction
forall x. LabelEventAction -> Rep LabelEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LabelEventAction x -> LabelEventAction
$cfrom :: forall x. LabelEventAction -> Rep LabelEventAction x
Generic, Typeable, Typeable LabelEventAction
LabelEventAction -> DataType
LabelEventAction -> Constr
(forall b. Data b => b -> b)
-> LabelEventAction -> LabelEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> LabelEventAction -> u
forall u. (forall d. Data d => d -> u) -> LabelEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LabelEventAction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LabelEventAction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> LabelEventAction -> m LabelEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LabelEventAction -> m LabelEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LabelEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LabelEventAction -> c LabelEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LabelEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LabelEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LabelEventAction -> m LabelEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LabelEventAction -> m LabelEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LabelEventAction -> m LabelEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LabelEventAction -> m LabelEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> LabelEventAction -> m LabelEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> LabelEventAction -> m LabelEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> LabelEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> LabelEventAction -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> LabelEventAction -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> LabelEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LabelEventAction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LabelEventAction -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LabelEventAction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LabelEventAction -> r
gmapT :: (forall b. Data b => b -> b)
-> LabelEventAction -> LabelEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> LabelEventAction -> LabelEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LabelEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LabelEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LabelEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LabelEventAction)
dataTypeOf :: LabelEventAction -> DataType
$cdataTypeOf :: LabelEventAction -> DataType
toConstr :: LabelEventAction -> Constr
$ctoConstr :: LabelEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LabelEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LabelEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LabelEventAction -> c LabelEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LabelEventAction -> c LabelEventAction
Data)

instance NFData LabelEventAction where rnf :: LabelEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON LabelEventAction where
  parseJSON :: Value -> Parser LabelEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Label event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"created"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure LabelEventAction
LabelCreatedAction
        Text
"edited"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure LabelEventAction
LabelEditedAction
        Text
"deleted"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure LabelEventAction
LabelDeletedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> LabelEventAction
LabelActionOther Text
t)

-- | Triggered when a repository's label is created, edited, or deleted.

-- Events of this type are not visible in timelines. These events are only used to trigger hooks.

-- See <https://developer.github.com/v3/activity/events/types/#labelevent>.

data LabelEvent = LabelEvent
    { LabelEvent -> LabelEventAction
evLabelEventAction        :: !LabelEventAction
    , LabelEvent -> HookRepositoryLabel
evLabelEventPayload       :: !HookRepositoryLabel
    , LabelEvent -> HookRepository
evLabelEventRepo          :: !HookRepository
    , LabelEvent -> Maybe HookOrganization
evLabelEventOrganization  :: !(Maybe HookOrganization)
    , LabelEvent -> HookUser
evLabelEventSender        :: !HookUser
    }
    deriving (LabelEvent -> LabelEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LabelEvent -> LabelEvent -> Bool
$c/= :: LabelEvent -> LabelEvent -> Bool
== :: LabelEvent -> LabelEvent -> Bool
$c== :: LabelEvent -> LabelEvent -> Bool
Eq, Int -> LabelEvent -> ShowS
[LabelEvent] -> ShowS
LabelEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LabelEvent] -> ShowS
$cshowList :: [LabelEvent] -> ShowS
show :: LabelEvent -> String
$cshow :: LabelEvent -> String
showsPrec :: Int -> LabelEvent -> ShowS
$cshowsPrec :: Int -> LabelEvent -> ShowS
Show, Typeable, Typeable LabelEvent
LabelEvent -> DataType
LabelEvent -> Constr
(forall b. Data b => b -> b) -> LabelEvent -> LabelEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> LabelEvent -> u
forall u. (forall d. Data d => d -> u) -> LabelEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LabelEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LabelEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> LabelEvent -> m LabelEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LabelEvent -> m LabelEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LabelEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LabelEvent -> c LabelEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LabelEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LabelEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LabelEvent -> m LabelEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LabelEvent -> m LabelEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LabelEvent -> m LabelEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LabelEvent -> m LabelEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> LabelEvent -> m LabelEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> LabelEvent -> m LabelEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> LabelEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> LabelEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> LabelEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> LabelEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LabelEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LabelEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LabelEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LabelEvent -> r
gmapT :: (forall b. Data b => b -> b) -> LabelEvent -> LabelEvent
$cgmapT :: (forall b. Data b => b -> b) -> LabelEvent -> LabelEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LabelEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LabelEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LabelEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LabelEvent)
dataTypeOf :: LabelEvent -> DataType
$cdataTypeOf :: LabelEvent -> DataType
toConstr :: LabelEvent -> Constr
$ctoConstr :: LabelEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LabelEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LabelEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LabelEvent -> c LabelEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LabelEvent -> c LabelEvent
Data, forall x. Rep LabelEvent x -> LabelEvent
forall x. LabelEvent -> Rep LabelEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LabelEvent x -> LabelEvent
$cfrom :: forall x. LabelEvent -> Rep LabelEvent x
Generic)

instance EventHasSender LabelEvent where senderOfEvent :: LabelEvent -> HookUser
senderOfEvent = LabelEvent -> HookUser
evLabelEventSender
instance EventHasRepo LabelEvent where repoForEvent :: LabelEvent -> HookRepository
repoForEvent = LabelEvent -> HookRepository
evLabelEventRepo
instance NFData LabelEvent where rnf :: LabelEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data MarketplacePurchaseEventAction
  -- | Decodes from "purchased"

  = MarketplacePurchasePurchasedAction
  -- | Decodes from "cancelled"

  | MarketplacePurchaseCancelledAction
  -- | Decodes from "pending_change"

  | MarketplacePurchasePendingChangeAction
  -- | Decodes from "pending_change_cancelled"

  | MarketplacePurchasePendingChangeCancelledAction
  -- | Decodes from "changed"

  | MarketplacePurchaseChangedAction
  -- | The result of decoding an unknown marketplace purchase event action type

  | MarketplacePurchaseActionOther !Text
  deriving (MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Bool
$c/= :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Bool
== :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Bool
$c== :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Bool
Eq, Eq MarketplacePurchaseEventAction
MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Bool
MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Ordering
MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> MarketplacePurchaseEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> MarketplacePurchaseEventAction
$cmin :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> MarketplacePurchaseEventAction
max :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> MarketplacePurchaseEventAction
$cmax :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> MarketplacePurchaseEventAction
>= :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Bool
$c>= :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Bool
> :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Bool
$c> :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Bool
<= :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Bool
$c<= :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Bool
< :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Bool
$c< :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Bool
compare :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Ordering
$ccompare :: MarketplacePurchaseEventAction
-> MarketplacePurchaseEventAction -> Ordering
Ord, Int -> MarketplacePurchaseEventAction -> ShowS
[MarketplacePurchaseEventAction] -> ShowS
MarketplacePurchaseEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MarketplacePurchaseEventAction] -> ShowS
$cshowList :: [MarketplacePurchaseEventAction] -> ShowS
show :: MarketplacePurchaseEventAction -> String
$cshow :: MarketplacePurchaseEventAction -> String
showsPrec :: Int -> MarketplacePurchaseEventAction -> ShowS
$cshowsPrec :: Int -> MarketplacePurchaseEventAction -> ShowS
Show, forall x.
Rep MarketplacePurchaseEventAction x
-> MarketplacePurchaseEventAction
forall x.
MarketplacePurchaseEventAction
-> Rep MarketplacePurchaseEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MarketplacePurchaseEventAction x
-> MarketplacePurchaseEventAction
$cfrom :: forall x.
MarketplacePurchaseEventAction
-> Rep MarketplacePurchaseEventAction x
Generic, Typeable, Typeable MarketplacePurchaseEventAction
MarketplacePurchaseEventAction -> DataType
MarketplacePurchaseEventAction -> Constr
(forall b. Data b => b -> b)
-> MarketplacePurchaseEventAction -> MarketplacePurchaseEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int
-> (forall d. Data d => d -> u)
-> MarketplacePurchaseEventAction
-> u
forall u.
(forall d. Data d => d -> u)
-> MarketplacePurchaseEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> MarketplacePurchaseEventAction
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> MarketplacePurchaseEventAction
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEventAction
-> m MarketplacePurchaseEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEventAction
-> m MarketplacePurchaseEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c MarketplacePurchaseEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> MarketplacePurchaseEventAction
-> c MarketplacePurchaseEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c MarketplacePurchaseEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MarketplacePurchaseEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEventAction
-> m MarketplacePurchaseEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEventAction
-> m MarketplacePurchaseEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEventAction
-> m MarketplacePurchaseEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEventAction
-> m MarketplacePurchaseEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEventAction
-> m MarketplacePurchaseEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEventAction
-> m MarketplacePurchaseEventAction
gmapQi :: forall u.
Int
-> (forall d. Data d => d -> u)
-> MarketplacePurchaseEventAction
-> u
$cgmapQi :: forall u.
Int
-> (forall d. Data d => d -> u)
-> MarketplacePurchaseEventAction
-> u
gmapQ :: forall u.
(forall d. Data d => d -> u)
-> MarketplacePurchaseEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u)
-> MarketplacePurchaseEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> MarketplacePurchaseEventAction
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> MarketplacePurchaseEventAction
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> MarketplacePurchaseEventAction
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> MarketplacePurchaseEventAction
-> r
gmapT :: (forall b. Data b => b -> b)
-> MarketplacePurchaseEventAction -> MarketplacePurchaseEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> MarketplacePurchaseEventAction -> MarketplacePurchaseEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MarketplacePurchaseEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MarketplacePurchaseEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c MarketplacePurchaseEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c MarketplacePurchaseEventAction)
dataTypeOf :: MarketplacePurchaseEventAction -> DataType
$cdataTypeOf :: MarketplacePurchaseEventAction -> DataType
toConstr :: MarketplacePurchaseEventAction -> Constr
$ctoConstr :: MarketplacePurchaseEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c MarketplacePurchaseEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c MarketplacePurchaseEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> MarketplacePurchaseEventAction
-> c MarketplacePurchaseEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> MarketplacePurchaseEventAction
-> c MarketplacePurchaseEventAction
Data)

instance NFData MarketplacePurchaseEventAction where rnf :: MarketplacePurchaseEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON MarketplacePurchaseEventAction where
  parseJSON :: Value -> Parser MarketplacePurchaseEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Marketplace purchase event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"purchased"                -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MarketplacePurchaseEventAction
MarketplacePurchasePurchasedAction
        Text
"cancelled"                -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MarketplacePurchaseEventAction
MarketplacePurchaseCancelledAction
        Text
"pending_change"           -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MarketplacePurchaseEventAction
MarketplacePurchasePendingChangeAction
        Text
"pending_change_cancelled" -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MarketplacePurchaseEventAction
MarketplacePurchasePendingChangeCancelledAction
        Text
"changed"                  -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MarketplacePurchaseEventAction
MarketplacePurchaseChangedAction
        Text
_                          -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> MarketplacePurchaseEventAction
MarketplacePurchaseActionOther Text
t)

-- | A GitHub Marketplace app receives information about changes to a user's plan from the Marketplace purchase event webhook. A Marketplace purchase event is triggered when a user purchases, cancels, or changes their payment plan.

-- See <https://docs.github.com/en/developers/github-marketplace/using-the-github-marketplace-api-in-your-app/webhook-events-for-the-github-marketplace-api#github-marketplace-purchase-webhook-payload>.

data MarketplacePurchaseEvent = MarketplacePurchaseEvent
    { MarketplacePurchaseEvent -> MarketplacePurchaseEventAction
evMarketplacePurchaseAction        :: !MarketplacePurchaseEventAction
    , MarketplacePurchaseEvent -> UTCTime
evMarketplacePurchaseEffectiveDate :: !UTCTime
    , MarketplacePurchaseEvent -> HookUser
evMarketplacePurchaseSender        :: !HookUser
    , MarketplacePurchaseEvent -> HookMarketplacePurchase
evMarketplacePurchaseNew           :: !HookMarketplacePurchase
    , MarketplacePurchaseEvent -> Maybe HookMarketplacePurchase
evMarketplacePurchasePrevious      :: !(Maybe HookMarketplacePurchase)
    }
    deriving (MarketplacePurchaseEvent -> MarketplacePurchaseEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MarketplacePurchaseEvent -> MarketplacePurchaseEvent -> Bool
$c/= :: MarketplacePurchaseEvent -> MarketplacePurchaseEvent -> Bool
== :: MarketplacePurchaseEvent -> MarketplacePurchaseEvent -> Bool
$c== :: MarketplacePurchaseEvent -> MarketplacePurchaseEvent -> Bool
Eq, Int -> MarketplacePurchaseEvent -> ShowS
[MarketplacePurchaseEvent] -> ShowS
MarketplacePurchaseEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MarketplacePurchaseEvent] -> ShowS
$cshowList :: [MarketplacePurchaseEvent] -> ShowS
show :: MarketplacePurchaseEvent -> String
$cshow :: MarketplacePurchaseEvent -> String
showsPrec :: Int -> MarketplacePurchaseEvent -> ShowS
$cshowsPrec :: Int -> MarketplacePurchaseEvent -> ShowS
Show, Typeable, Typeable MarketplacePurchaseEvent
MarketplacePurchaseEvent -> DataType
MarketplacePurchaseEvent -> Constr
(forall b. Data b => b -> b)
-> MarketplacePurchaseEvent -> MarketplacePurchaseEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int
-> (forall d. Data d => d -> u) -> MarketplacePurchaseEvent -> u
forall u.
(forall d. Data d => d -> u) -> MarketplacePurchaseEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> MarketplacePurchaseEvent
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> MarketplacePurchaseEvent
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEvent -> m MarketplacePurchaseEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEvent -> m MarketplacePurchaseEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MarketplacePurchaseEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> MarketplacePurchaseEvent
-> c MarketplacePurchaseEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MarketplacePurchaseEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MarketplacePurchaseEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEvent -> m MarketplacePurchaseEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEvent -> m MarketplacePurchaseEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEvent -> m MarketplacePurchaseEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEvent -> m MarketplacePurchaseEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEvent -> m MarketplacePurchaseEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MarketplacePurchaseEvent -> m MarketplacePurchaseEvent
gmapQi :: forall u.
Int
-> (forall d. Data d => d -> u) -> MarketplacePurchaseEvent -> u
$cgmapQi :: forall u.
Int
-> (forall d. Data d => d -> u) -> MarketplacePurchaseEvent -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> MarketplacePurchaseEvent -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> MarketplacePurchaseEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> MarketplacePurchaseEvent
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> MarketplacePurchaseEvent
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> MarketplacePurchaseEvent
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> MarketplacePurchaseEvent
-> r
gmapT :: (forall b. Data b => b -> b)
-> MarketplacePurchaseEvent -> MarketplacePurchaseEvent
$cgmapT :: (forall b. Data b => b -> b)
-> MarketplacePurchaseEvent -> MarketplacePurchaseEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MarketplacePurchaseEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MarketplacePurchaseEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MarketplacePurchaseEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MarketplacePurchaseEvent)
dataTypeOf :: MarketplacePurchaseEvent -> DataType
$cdataTypeOf :: MarketplacePurchaseEvent -> DataType
toConstr :: MarketplacePurchaseEvent -> Constr
$ctoConstr :: MarketplacePurchaseEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MarketplacePurchaseEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MarketplacePurchaseEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> MarketplacePurchaseEvent
-> c MarketplacePurchaseEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> MarketplacePurchaseEvent
-> c MarketplacePurchaseEvent
Data, forall x.
Rep MarketplacePurchaseEvent x -> MarketplacePurchaseEvent
forall x.
MarketplacePurchaseEvent -> Rep MarketplacePurchaseEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MarketplacePurchaseEvent x -> MarketplacePurchaseEvent
$cfrom :: forall x.
MarketplacePurchaseEvent -> Rep MarketplacePurchaseEvent x
Generic)

instance EventHasSender MarketplacePurchaseEvent where senderOfEvent :: MarketplacePurchaseEvent -> HookUser
senderOfEvent = MarketplacePurchaseEvent -> HookUser
evMarketplacePurchaseSender
instance NFData MarketplacePurchaseEvent where rnf :: MarketplacePurchaseEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data MemberEventAction
  -- | Decodes from "added"

  = MemberAddedAction
  -- | Decodes from "edited"

  | MemberEditedAction
  -- | Decodes from "deleted"

  | MemberDeletedAction
  -- | The result of decoding an unknown label event action type

  | MemberActionOther !Text
  deriving (MemberEventAction -> MemberEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MemberEventAction -> MemberEventAction -> Bool
$c/= :: MemberEventAction -> MemberEventAction -> Bool
== :: MemberEventAction -> MemberEventAction -> Bool
$c== :: MemberEventAction -> MemberEventAction -> Bool
Eq, Eq MemberEventAction
MemberEventAction -> MemberEventAction -> Bool
MemberEventAction -> MemberEventAction -> Ordering
MemberEventAction -> MemberEventAction -> MemberEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: MemberEventAction -> MemberEventAction -> MemberEventAction
$cmin :: MemberEventAction -> MemberEventAction -> MemberEventAction
max :: MemberEventAction -> MemberEventAction -> MemberEventAction
$cmax :: MemberEventAction -> MemberEventAction -> MemberEventAction
>= :: MemberEventAction -> MemberEventAction -> Bool
$c>= :: MemberEventAction -> MemberEventAction -> Bool
> :: MemberEventAction -> MemberEventAction -> Bool
$c> :: MemberEventAction -> MemberEventAction -> Bool
<= :: MemberEventAction -> MemberEventAction -> Bool
$c<= :: MemberEventAction -> MemberEventAction -> Bool
< :: MemberEventAction -> MemberEventAction -> Bool
$c< :: MemberEventAction -> MemberEventAction -> Bool
compare :: MemberEventAction -> MemberEventAction -> Ordering
$ccompare :: MemberEventAction -> MemberEventAction -> Ordering
Ord, Int -> MemberEventAction -> ShowS
[MemberEventAction] -> ShowS
MemberEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MemberEventAction] -> ShowS
$cshowList :: [MemberEventAction] -> ShowS
show :: MemberEventAction -> String
$cshow :: MemberEventAction -> String
showsPrec :: Int -> MemberEventAction -> ShowS
$cshowsPrec :: Int -> MemberEventAction -> ShowS
Show, forall x. Rep MemberEventAction x -> MemberEventAction
forall x. MemberEventAction -> Rep MemberEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MemberEventAction x -> MemberEventAction
$cfrom :: forall x. MemberEventAction -> Rep MemberEventAction x
Generic, Typeable, Typeable MemberEventAction
MemberEventAction -> DataType
MemberEventAction -> Constr
(forall b. Data b => b -> b)
-> MemberEventAction -> MemberEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> MemberEventAction -> u
forall u. (forall d. Data d => d -> u) -> MemberEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MemberEventAction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MemberEventAction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MemberEventAction -> m MemberEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MemberEventAction -> m MemberEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MemberEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MemberEventAction -> c MemberEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MemberEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MemberEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MemberEventAction -> m MemberEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MemberEventAction -> m MemberEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MemberEventAction -> m MemberEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MemberEventAction -> m MemberEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MemberEventAction -> m MemberEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MemberEventAction -> m MemberEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> MemberEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> MemberEventAction -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> MemberEventAction -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> MemberEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MemberEventAction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MemberEventAction -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MemberEventAction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MemberEventAction -> r
gmapT :: (forall b. Data b => b -> b)
-> MemberEventAction -> MemberEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> MemberEventAction -> MemberEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MemberEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MemberEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MemberEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MemberEventAction)
dataTypeOf :: MemberEventAction -> DataType
$cdataTypeOf :: MemberEventAction -> DataType
toConstr :: MemberEventAction -> Constr
$ctoConstr :: MemberEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MemberEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MemberEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MemberEventAction -> c MemberEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MemberEventAction -> c MemberEventAction
Data)

instance NFData MemberEventAction where rnf :: MemberEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON MemberEventAction where
  parseJSON :: Value -> Parser MemberEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Member event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"added"         -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MemberEventAction
MemberAddedAction
        Text
"edited"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MemberEventAction
MemberEditedAction
        Text
"deleted"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MemberEventAction
MemberDeletedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> MemberEventAction
MemberActionOther Text
t)

-- | Triggered when a user is added or removed as a collaborator to a repository, or has their permissions changed.

-- See <https://developer.github.com/v3/activity/events/types/#memberevent>.

data MemberEvent = MemberEvent
    { MemberEvent -> MemberEventAction
evMemberAction            :: !MemberEventAction
    , MemberEvent -> HookUser
evMemberUser              :: !HookUser
    , MemberEvent -> HookRepository
evMemberRepo              :: !HookRepository
    , MemberEvent -> HookUser
evMemberSender            :: !HookUser
    }
    deriving (MemberEvent -> MemberEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MemberEvent -> MemberEvent -> Bool
$c/= :: MemberEvent -> MemberEvent -> Bool
== :: MemberEvent -> MemberEvent -> Bool
$c== :: MemberEvent -> MemberEvent -> Bool
Eq, Int -> MemberEvent -> ShowS
[MemberEvent] -> ShowS
MemberEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MemberEvent] -> ShowS
$cshowList :: [MemberEvent] -> ShowS
show :: MemberEvent -> String
$cshow :: MemberEvent -> String
showsPrec :: Int -> MemberEvent -> ShowS
$cshowsPrec :: Int -> MemberEvent -> ShowS
Show, Typeable, Typeable MemberEvent
MemberEvent -> DataType
MemberEvent -> Constr
(forall b. Data b => b -> b) -> MemberEvent -> MemberEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> MemberEvent -> u
forall u. (forall d. Data d => d -> u) -> MemberEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MemberEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MemberEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> MemberEvent -> m MemberEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MemberEvent -> m MemberEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MemberEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MemberEvent -> c MemberEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MemberEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MemberEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MemberEvent -> m MemberEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MemberEvent -> m MemberEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MemberEvent -> m MemberEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MemberEvent -> m MemberEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> MemberEvent -> m MemberEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> MemberEvent -> m MemberEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> MemberEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> MemberEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> MemberEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> MemberEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MemberEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MemberEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MemberEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MemberEvent -> r
gmapT :: (forall b. Data b => b -> b) -> MemberEvent -> MemberEvent
$cgmapT :: (forall b. Data b => b -> b) -> MemberEvent -> MemberEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MemberEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MemberEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MemberEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MemberEvent)
dataTypeOf :: MemberEvent -> DataType
$cdataTypeOf :: MemberEvent -> DataType
toConstr :: MemberEvent -> Constr
$ctoConstr :: MemberEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MemberEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MemberEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MemberEvent -> c MemberEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MemberEvent -> c MemberEvent
Data, forall x. Rep MemberEvent x -> MemberEvent
forall x. MemberEvent -> Rep MemberEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MemberEvent x -> MemberEvent
$cfrom :: forall x. MemberEvent -> Rep MemberEvent x
Generic)

instance EventHasSender MemberEvent where senderOfEvent :: MemberEvent -> HookUser
senderOfEvent = MemberEvent -> HookUser
evMemberSender
instance EventHasRepo MemberEvent where repoForEvent :: MemberEvent -> HookRepository
repoForEvent = MemberEvent -> HookRepository
evMemberRepo
instance NFData MemberEvent where rnf :: MemberEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data MembershipEventAction
  -- | Decodes from "added"

  = MembershipAddedAction
  -- | Decodes from "removed"

  | MembershipRemovedAction
  -- | The result of decoding an unknown label event action type

  | MembershipActionOther !Text
  deriving (MembershipEventAction -> MembershipEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MembershipEventAction -> MembershipEventAction -> Bool
$c/= :: MembershipEventAction -> MembershipEventAction -> Bool
== :: MembershipEventAction -> MembershipEventAction -> Bool
$c== :: MembershipEventAction -> MembershipEventAction -> Bool
Eq, Eq MembershipEventAction
MembershipEventAction -> MembershipEventAction -> Bool
MembershipEventAction -> MembershipEventAction -> Ordering
MembershipEventAction
-> MembershipEventAction -> MembershipEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: MembershipEventAction
-> MembershipEventAction -> MembershipEventAction
$cmin :: MembershipEventAction
-> MembershipEventAction -> MembershipEventAction
max :: MembershipEventAction
-> MembershipEventAction -> MembershipEventAction
$cmax :: MembershipEventAction
-> MembershipEventAction -> MembershipEventAction
>= :: MembershipEventAction -> MembershipEventAction -> Bool
$c>= :: MembershipEventAction -> MembershipEventAction -> Bool
> :: MembershipEventAction -> MembershipEventAction -> Bool
$c> :: MembershipEventAction -> MembershipEventAction -> Bool
<= :: MembershipEventAction -> MembershipEventAction -> Bool
$c<= :: MembershipEventAction -> MembershipEventAction -> Bool
< :: MembershipEventAction -> MembershipEventAction -> Bool
$c< :: MembershipEventAction -> MembershipEventAction -> Bool
compare :: MembershipEventAction -> MembershipEventAction -> Ordering
$ccompare :: MembershipEventAction -> MembershipEventAction -> Ordering
Ord, Int -> MembershipEventAction -> ShowS
[MembershipEventAction] -> ShowS
MembershipEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MembershipEventAction] -> ShowS
$cshowList :: [MembershipEventAction] -> ShowS
show :: MembershipEventAction -> String
$cshow :: MembershipEventAction -> String
showsPrec :: Int -> MembershipEventAction -> ShowS
$cshowsPrec :: Int -> MembershipEventAction -> ShowS
Show, forall x. Rep MembershipEventAction x -> MembershipEventAction
forall x. MembershipEventAction -> Rep MembershipEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MembershipEventAction x -> MembershipEventAction
$cfrom :: forall x. MembershipEventAction -> Rep MembershipEventAction x
Generic, Typeable, Typeable MembershipEventAction
MembershipEventAction -> DataType
MembershipEventAction -> Constr
(forall b. Data b => b -> b)
-> MembershipEventAction -> MembershipEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> MembershipEventAction -> u
forall u.
(forall d. Data d => d -> u) -> MembershipEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MembershipEventAction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MembershipEventAction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MembershipEventAction -> m MembershipEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MembershipEventAction -> m MembershipEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MembershipEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> MembershipEventAction
-> c MembershipEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MembershipEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MembershipEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MembershipEventAction -> m MembershipEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MembershipEventAction -> m MembershipEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MembershipEventAction -> m MembershipEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MembershipEventAction -> m MembershipEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MembershipEventAction -> m MembershipEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MembershipEventAction -> m MembershipEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> MembershipEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> MembershipEventAction -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> MembershipEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> MembershipEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MembershipEventAction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MembershipEventAction -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MembershipEventAction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MembershipEventAction -> r
gmapT :: (forall b. Data b => b -> b)
-> MembershipEventAction -> MembershipEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> MembershipEventAction -> MembershipEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MembershipEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MembershipEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MembershipEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MembershipEventAction)
dataTypeOf :: MembershipEventAction -> DataType
$cdataTypeOf :: MembershipEventAction -> DataType
toConstr :: MembershipEventAction -> Constr
$ctoConstr :: MembershipEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MembershipEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MembershipEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> MembershipEventAction
-> c MembershipEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> MembershipEventAction
-> c MembershipEventAction
Data)

instance NFData MembershipEventAction where rnf :: MembershipEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON MembershipEventAction where
  parseJSON :: Value -> Parser MembershipEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Membership event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"added"         -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MembershipEventAction
MembershipAddedAction
        Text
"removed"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MembershipEventAction
MembershipRemovedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> MembershipEventAction
MembershipActionOther Text
t)

-- | Triggered when a user is added or removed from a team.

-- Events of this type are not visible in timelines. These events are only used to trigger hooks.

-- See <https://developer.github.com/v3/activity/events/types/#membershipevent>.

data MembershipEvent = MembershipEvent
    { MembershipEvent -> MembershipEventAction
evMembershipAction        :: !MembershipEventAction
    , MembershipEvent -> Text
evMembershipScope         :: !Text        -- ^ Current can only be "team"

    , MembershipEvent -> HookUser
evMembershipUser          :: !HookUser
    , MembershipEvent -> HookTeam
evMembershipTeam          :: !HookTeam
    , MembershipEvent -> HookOrganization
evMembershipOrg           :: !HookOrganization
    , MembershipEvent -> HookUser
evMembershipSender        :: !HookUser
    }
    deriving (MembershipEvent -> MembershipEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MembershipEvent -> MembershipEvent -> Bool
$c/= :: MembershipEvent -> MembershipEvent -> Bool
== :: MembershipEvent -> MembershipEvent -> Bool
$c== :: MembershipEvent -> MembershipEvent -> Bool
Eq, Int -> MembershipEvent -> ShowS
[MembershipEvent] -> ShowS
MembershipEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MembershipEvent] -> ShowS
$cshowList :: [MembershipEvent] -> ShowS
show :: MembershipEvent -> String
$cshow :: MembershipEvent -> String
showsPrec :: Int -> MembershipEvent -> ShowS
$cshowsPrec :: Int -> MembershipEvent -> ShowS
Show, Typeable, Typeable MembershipEvent
MembershipEvent -> DataType
MembershipEvent -> Constr
(forall b. Data b => b -> b) -> MembershipEvent -> MembershipEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> MembershipEvent -> u
forall u. (forall d. Data d => d -> u) -> MembershipEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MembershipEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MembershipEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MembershipEvent -> m MembershipEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MembershipEvent -> m MembershipEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MembershipEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MembershipEvent -> c MembershipEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MembershipEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MembershipEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MembershipEvent -> m MembershipEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MembershipEvent -> m MembershipEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MembershipEvent -> m MembershipEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MembershipEvent -> m MembershipEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MembershipEvent -> m MembershipEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MembershipEvent -> m MembershipEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> MembershipEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> MembershipEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> MembershipEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> MembershipEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MembershipEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MembershipEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MembershipEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MembershipEvent -> r
gmapT :: (forall b. Data b => b -> b) -> MembershipEvent -> MembershipEvent
$cgmapT :: (forall b. Data b => b -> b) -> MembershipEvent -> MembershipEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MembershipEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MembershipEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MembershipEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MembershipEvent)
dataTypeOf :: MembershipEvent -> DataType
$cdataTypeOf :: MembershipEvent -> DataType
toConstr :: MembershipEvent -> Constr
$ctoConstr :: MembershipEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MembershipEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MembershipEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MembershipEvent -> c MembershipEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MembershipEvent -> c MembershipEvent
Data, forall x. Rep MembershipEvent x -> MembershipEvent
forall x. MembershipEvent -> Rep MembershipEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MembershipEvent x -> MembershipEvent
$cfrom :: forall x. MembershipEvent -> Rep MembershipEvent x
Generic)

instance EventHasSender MembershipEvent where senderOfEvent :: MembershipEvent -> HookUser
senderOfEvent = MembershipEvent -> HookUser
evMembershipSender
instance NFData MembershipEvent where rnf :: MembershipEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data MilestoneEventAction
  -- | Decodes from "created"

  = MilestoneCreatedAction
  -- | Decodes from "closed"

  | MilestoneClosedAction
  -- | Decodes from "opened"

  | MilestoneOpenedAction
  -- | Decodes from "edited"

  | MilestoneEditedAction
  -- | Decodes from "deleted"

  | MilestoneDeletedAction
  -- | The result of decoding an unknown label event action type

  | MilestoneActionOther !Text
  deriving (MilestoneEventAction -> MilestoneEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MilestoneEventAction -> MilestoneEventAction -> Bool
$c/= :: MilestoneEventAction -> MilestoneEventAction -> Bool
== :: MilestoneEventAction -> MilestoneEventAction -> Bool
$c== :: MilestoneEventAction -> MilestoneEventAction -> Bool
Eq, Eq MilestoneEventAction
MilestoneEventAction -> MilestoneEventAction -> Bool
MilestoneEventAction -> MilestoneEventAction -> Ordering
MilestoneEventAction
-> MilestoneEventAction -> MilestoneEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: MilestoneEventAction
-> MilestoneEventAction -> MilestoneEventAction
$cmin :: MilestoneEventAction
-> MilestoneEventAction -> MilestoneEventAction
max :: MilestoneEventAction
-> MilestoneEventAction -> MilestoneEventAction
$cmax :: MilestoneEventAction
-> MilestoneEventAction -> MilestoneEventAction
>= :: MilestoneEventAction -> MilestoneEventAction -> Bool
$c>= :: MilestoneEventAction -> MilestoneEventAction -> Bool
> :: MilestoneEventAction -> MilestoneEventAction -> Bool
$c> :: MilestoneEventAction -> MilestoneEventAction -> Bool
<= :: MilestoneEventAction -> MilestoneEventAction -> Bool
$c<= :: MilestoneEventAction -> MilestoneEventAction -> Bool
< :: MilestoneEventAction -> MilestoneEventAction -> Bool
$c< :: MilestoneEventAction -> MilestoneEventAction -> Bool
compare :: MilestoneEventAction -> MilestoneEventAction -> Ordering
$ccompare :: MilestoneEventAction -> MilestoneEventAction -> Ordering
Ord, Int -> MilestoneEventAction -> ShowS
[MilestoneEventAction] -> ShowS
MilestoneEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MilestoneEventAction] -> ShowS
$cshowList :: [MilestoneEventAction] -> ShowS
show :: MilestoneEventAction -> String
$cshow :: MilestoneEventAction -> String
showsPrec :: Int -> MilestoneEventAction -> ShowS
$cshowsPrec :: Int -> MilestoneEventAction -> ShowS
Show, forall x. Rep MilestoneEventAction x -> MilestoneEventAction
forall x. MilestoneEventAction -> Rep MilestoneEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MilestoneEventAction x -> MilestoneEventAction
$cfrom :: forall x. MilestoneEventAction -> Rep MilestoneEventAction x
Generic, Typeable, Typeable MilestoneEventAction
MilestoneEventAction -> DataType
MilestoneEventAction -> Constr
(forall b. Data b => b -> b)
-> MilestoneEventAction -> MilestoneEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> MilestoneEventAction -> u
forall u.
(forall d. Data d => d -> u) -> MilestoneEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MilestoneEventAction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MilestoneEventAction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MilestoneEventAction -> m MilestoneEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MilestoneEventAction -> m MilestoneEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MilestoneEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> MilestoneEventAction
-> c MilestoneEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MilestoneEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MilestoneEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MilestoneEventAction -> m MilestoneEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MilestoneEventAction -> m MilestoneEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MilestoneEventAction -> m MilestoneEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MilestoneEventAction -> m MilestoneEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MilestoneEventAction -> m MilestoneEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MilestoneEventAction -> m MilestoneEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> MilestoneEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> MilestoneEventAction -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> MilestoneEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> MilestoneEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MilestoneEventAction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MilestoneEventAction -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MilestoneEventAction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MilestoneEventAction -> r
gmapT :: (forall b. Data b => b -> b)
-> MilestoneEventAction -> MilestoneEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> MilestoneEventAction -> MilestoneEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MilestoneEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MilestoneEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MilestoneEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MilestoneEventAction)
dataTypeOf :: MilestoneEventAction -> DataType
$cdataTypeOf :: MilestoneEventAction -> DataType
toConstr :: MilestoneEventAction -> Constr
$ctoConstr :: MilestoneEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MilestoneEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MilestoneEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> MilestoneEventAction
-> c MilestoneEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> MilestoneEventAction
-> c MilestoneEventAction
Data)

instance NFData MilestoneEventAction where rnf :: MilestoneEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON MilestoneEventAction where
  parseJSON :: Value -> Parser MilestoneEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Milestone event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"created"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MilestoneEventAction
MilestoneCreatedAction
        Text
"closed"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MilestoneEventAction
MilestoneClosedAction
        Text
"opened"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MilestoneEventAction
MilestoneOpenedAction
        Text
"edited"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MilestoneEventAction
MilestoneEditedAction
        Text
"deleted"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure MilestoneEventAction
MilestoneDeletedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> MilestoneEventAction
MilestoneActionOther Text
t)

-- | Triggered when a milestone is created, closed, opened, edited, or deleted.

-- Events of this type are not visible in timelines. These events are only used to trigger hooks.

-- See <https://developer.github.com/v3/activity/events/types/#milestoneevent>.

data MilestoneEvent = MilestoneEvent
    { MilestoneEvent -> MilestoneEventAction
evMilestoneAction         :: !MilestoneEventAction
    , MilestoneEvent -> HookMilestone
evMilestoenPayload        :: !HookMilestone
    , MilestoneEvent -> HookRepository
evMilestoneRepo           :: !HookRepository
    , MilestoneEvent -> HookOrganization
evMilestoneOrg            :: !HookOrganization
    , MilestoneEvent -> HookUser
evMilestoneSender         :: !HookUser
    }
    deriving (MilestoneEvent -> MilestoneEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MilestoneEvent -> MilestoneEvent -> Bool
$c/= :: MilestoneEvent -> MilestoneEvent -> Bool
== :: MilestoneEvent -> MilestoneEvent -> Bool
$c== :: MilestoneEvent -> MilestoneEvent -> Bool
Eq, Int -> MilestoneEvent -> ShowS
[MilestoneEvent] -> ShowS
MilestoneEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MilestoneEvent] -> ShowS
$cshowList :: [MilestoneEvent] -> ShowS
show :: MilestoneEvent -> String
$cshow :: MilestoneEvent -> String
showsPrec :: Int -> MilestoneEvent -> ShowS
$cshowsPrec :: Int -> MilestoneEvent -> ShowS
Show, Typeable, Typeable MilestoneEvent
MilestoneEvent -> DataType
MilestoneEvent -> Constr
(forall b. Data b => b -> b) -> MilestoneEvent -> MilestoneEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> MilestoneEvent -> u
forall u. (forall d. Data d => d -> u) -> MilestoneEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MilestoneEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MilestoneEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MilestoneEvent -> m MilestoneEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MilestoneEvent -> m MilestoneEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MilestoneEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MilestoneEvent -> c MilestoneEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MilestoneEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MilestoneEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MilestoneEvent -> m MilestoneEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MilestoneEvent -> m MilestoneEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MilestoneEvent -> m MilestoneEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> MilestoneEvent -> m MilestoneEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MilestoneEvent -> m MilestoneEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> MilestoneEvent -> m MilestoneEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> MilestoneEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> MilestoneEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> MilestoneEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> MilestoneEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MilestoneEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MilestoneEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MilestoneEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MilestoneEvent -> r
gmapT :: (forall b. Data b => b -> b) -> MilestoneEvent -> MilestoneEvent
$cgmapT :: (forall b. Data b => b -> b) -> MilestoneEvent -> MilestoneEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MilestoneEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MilestoneEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MilestoneEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MilestoneEvent)
dataTypeOf :: MilestoneEvent -> DataType
$cdataTypeOf :: MilestoneEvent -> DataType
toConstr :: MilestoneEvent -> Constr
$ctoConstr :: MilestoneEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MilestoneEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MilestoneEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MilestoneEvent -> c MilestoneEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MilestoneEvent -> c MilestoneEvent
Data, forall x. Rep MilestoneEvent x -> MilestoneEvent
forall x. MilestoneEvent -> Rep MilestoneEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MilestoneEvent x -> MilestoneEvent
$cfrom :: forall x. MilestoneEvent -> Rep MilestoneEvent x
Generic)

instance EventHasSender MilestoneEvent where senderOfEvent :: MilestoneEvent -> HookUser
senderOfEvent = MilestoneEvent -> HookUser
evMilestoneSender
instance EventHasRepo MilestoneEvent where repoForEvent :: MilestoneEvent -> HookRepository
repoForEvent = MilestoneEvent -> HookRepository
evMilestoneRepo
instance NFData MilestoneEvent where rnf :: MilestoneEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data OrganizationEventAction
  -- | Decodes from "member_added"

  = OrgMemberAddedAction
  -- | Decodes from "member_removed"

  | OrgMemberRemovedAction
  -- | Decodes from "member_invited"

  | OrgMemberInvitedAction
  -- | The result of decoding an unknown label event action type

  | OrgActionOther !Text
  deriving (OrganizationEventAction -> OrganizationEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrganizationEventAction -> OrganizationEventAction -> Bool
$c/= :: OrganizationEventAction -> OrganizationEventAction -> Bool
== :: OrganizationEventAction -> OrganizationEventAction -> Bool
$c== :: OrganizationEventAction -> OrganizationEventAction -> Bool
Eq, Eq OrganizationEventAction
OrganizationEventAction -> OrganizationEventAction -> Bool
OrganizationEventAction -> OrganizationEventAction -> Ordering
OrganizationEventAction
-> OrganizationEventAction -> OrganizationEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: OrganizationEventAction
-> OrganizationEventAction -> OrganizationEventAction
$cmin :: OrganizationEventAction
-> OrganizationEventAction -> OrganizationEventAction
max :: OrganizationEventAction
-> OrganizationEventAction -> OrganizationEventAction
$cmax :: OrganizationEventAction
-> OrganizationEventAction -> OrganizationEventAction
>= :: OrganizationEventAction -> OrganizationEventAction -> Bool
$c>= :: OrganizationEventAction -> OrganizationEventAction -> Bool
> :: OrganizationEventAction -> OrganizationEventAction -> Bool
$c> :: OrganizationEventAction -> OrganizationEventAction -> Bool
<= :: OrganizationEventAction -> OrganizationEventAction -> Bool
$c<= :: OrganizationEventAction -> OrganizationEventAction -> Bool
< :: OrganizationEventAction -> OrganizationEventAction -> Bool
$c< :: OrganizationEventAction -> OrganizationEventAction -> Bool
compare :: OrganizationEventAction -> OrganizationEventAction -> Ordering
$ccompare :: OrganizationEventAction -> OrganizationEventAction -> Ordering
Ord, Int -> OrganizationEventAction -> ShowS
[OrganizationEventAction] -> ShowS
OrganizationEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrganizationEventAction] -> ShowS
$cshowList :: [OrganizationEventAction] -> ShowS
show :: OrganizationEventAction -> String
$cshow :: OrganizationEventAction -> String
showsPrec :: Int -> OrganizationEventAction -> ShowS
$cshowsPrec :: Int -> OrganizationEventAction -> ShowS
Show, forall x. Rep OrganizationEventAction x -> OrganizationEventAction
forall x. OrganizationEventAction -> Rep OrganizationEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OrganizationEventAction x -> OrganizationEventAction
$cfrom :: forall x. OrganizationEventAction -> Rep OrganizationEventAction x
Generic, Typeable, Typeable OrganizationEventAction
OrganizationEventAction -> DataType
OrganizationEventAction -> Constr
(forall b. Data b => b -> b)
-> OrganizationEventAction -> OrganizationEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> OrganizationEventAction -> u
forall u.
(forall d. Data d => d -> u) -> OrganizationEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> OrganizationEventAction
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> OrganizationEventAction
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> OrganizationEventAction -> m OrganizationEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrganizationEventAction -> m OrganizationEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrganizationEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> OrganizationEventAction
-> c OrganizationEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrganizationEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrganizationEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrganizationEventAction -> m OrganizationEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrganizationEventAction -> m OrganizationEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrganizationEventAction -> m OrganizationEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrganizationEventAction -> m OrganizationEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> OrganizationEventAction -> m OrganizationEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> OrganizationEventAction -> m OrganizationEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> OrganizationEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> OrganizationEventAction -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> OrganizationEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> OrganizationEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> OrganizationEventAction
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> OrganizationEventAction
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> OrganizationEventAction
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> OrganizationEventAction
-> r
gmapT :: (forall b. Data b => b -> b)
-> OrganizationEventAction -> OrganizationEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> OrganizationEventAction -> OrganizationEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrganizationEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrganizationEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrganizationEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrganizationEventAction)
dataTypeOf :: OrganizationEventAction -> DataType
$cdataTypeOf :: OrganizationEventAction -> DataType
toConstr :: OrganizationEventAction -> Constr
$ctoConstr :: OrganizationEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrganizationEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrganizationEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> OrganizationEventAction
-> c OrganizationEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> OrganizationEventAction
-> c OrganizationEventAction
Data)

instance NFData OrganizationEventAction where rnf :: OrganizationEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON OrganizationEventAction where
  parseJSON :: Value -> Parser OrganizationEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Organization event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"member_added"   -> forall (f :: * -> *) a. Applicative f => a -> f a
pure OrganizationEventAction
OrgMemberAddedAction
        Text
"member_removed" -> forall (f :: * -> *) a. Applicative f => a -> f a
pure OrganizationEventAction
OrgMemberRemovedAction
        Text
"member_invited" -> forall (f :: * -> *) a. Applicative f => a -> f a
pure OrganizationEventAction
OrgMemberInvitedAction
        Text
_                -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> OrganizationEventAction
OrgActionOther Text
t)

-- | Triggered when a user is added, removed, or invited to an Organization.

-- Events of this type are not visible in timelines. These events are only used to trigger organization hooks.

-- See <https://developer.github.com/v3/activity/events/types/#organizationevent>.

data OrganizationEvent = OrganizationEvent
    { OrganizationEvent -> OrganizationEventAction
evOrganizationAction      :: !OrganizationEventAction
    , OrganizationEvent -> Maybe HookOrganizationInvitation
evOrganizationInvitation  :: !(Maybe HookOrganizationInvitation)
    , OrganizationEvent -> Maybe HookOrganizationMembership
evOrganizationMembership  :: !(Maybe HookOrganizationMembership)
    , OrganizationEvent -> HookOrganization
evOrganizationOrg         :: !HookOrganization
    , OrganizationEvent -> HookUser
evOrganizationSender      :: !HookUser
    }
    deriving (OrganizationEvent -> OrganizationEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrganizationEvent -> OrganizationEvent -> Bool
$c/= :: OrganizationEvent -> OrganizationEvent -> Bool
== :: OrganizationEvent -> OrganizationEvent -> Bool
$c== :: OrganizationEvent -> OrganizationEvent -> Bool
Eq, Int -> OrganizationEvent -> ShowS
[OrganizationEvent] -> ShowS
OrganizationEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrganizationEvent] -> ShowS
$cshowList :: [OrganizationEvent] -> ShowS
show :: OrganizationEvent -> String
$cshow :: OrganizationEvent -> String
showsPrec :: Int -> OrganizationEvent -> ShowS
$cshowsPrec :: Int -> OrganizationEvent -> ShowS
Show, Typeable, Typeable OrganizationEvent
OrganizationEvent -> DataType
OrganizationEvent -> Constr
(forall b. Data b => b -> b)
-> OrganizationEvent -> OrganizationEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> OrganizationEvent -> u
forall u. (forall d. Data d => d -> u) -> OrganizationEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrganizationEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrganizationEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> OrganizationEvent -> m OrganizationEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrganizationEvent -> m OrganizationEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrganizationEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrganizationEvent -> c OrganizationEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrganizationEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrganizationEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrganizationEvent -> m OrganizationEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrganizationEvent -> m OrganizationEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrganizationEvent -> m OrganizationEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrganizationEvent -> m OrganizationEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> OrganizationEvent -> m OrganizationEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> OrganizationEvent -> m OrganizationEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> OrganizationEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> OrganizationEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> OrganizationEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> OrganizationEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrganizationEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrganizationEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrganizationEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrganizationEvent -> r
gmapT :: (forall b. Data b => b -> b)
-> OrganizationEvent -> OrganizationEvent
$cgmapT :: (forall b. Data b => b -> b)
-> OrganizationEvent -> OrganizationEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrganizationEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrganizationEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrganizationEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrganizationEvent)
dataTypeOf :: OrganizationEvent -> DataType
$cdataTypeOf :: OrganizationEvent -> DataType
toConstr :: OrganizationEvent -> Constr
$ctoConstr :: OrganizationEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrganizationEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrganizationEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrganizationEvent -> c OrganizationEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrganizationEvent -> c OrganizationEvent
Data, forall x. Rep OrganizationEvent x -> OrganizationEvent
forall x. OrganizationEvent -> Rep OrganizationEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OrganizationEvent x -> OrganizationEvent
$cfrom :: forall x. OrganizationEvent -> Rep OrganizationEvent x
Generic)

instance EventHasSender OrganizationEvent where senderOfEvent :: OrganizationEvent -> HookUser
senderOfEvent = OrganizationEvent -> HookUser
evOrganizationSender
instance NFData OrganizationEvent where rnf :: OrganizationEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data OrgBlockEventAction
  -- | Decodes from "blocked"

  = OrgBlockBlockedAction
  -- | Decodes from "unblocked"

  | OrgBlockUnblockedAction
  -- | The result of decoding an unknown org block event action type

  | OrgBlockActionOther !Text
  deriving (OrgBlockEventAction -> OrgBlockEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrgBlockEventAction -> OrgBlockEventAction -> Bool
$c/= :: OrgBlockEventAction -> OrgBlockEventAction -> Bool
== :: OrgBlockEventAction -> OrgBlockEventAction -> Bool
$c== :: OrgBlockEventAction -> OrgBlockEventAction -> Bool
Eq, Eq OrgBlockEventAction
OrgBlockEventAction -> OrgBlockEventAction -> Bool
OrgBlockEventAction -> OrgBlockEventAction -> Ordering
OrgBlockEventAction -> OrgBlockEventAction -> OrgBlockEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: OrgBlockEventAction -> OrgBlockEventAction -> OrgBlockEventAction
$cmin :: OrgBlockEventAction -> OrgBlockEventAction -> OrgBlockEventAction
max :: OrgBlockEventAction -> OrgBlockEventAction -> OrgBlockEventAction
$cmax :: OrgBlockEventAction -> OrgBlockEventAction -> OrgBlockEventAction
>= :: OrgBlockEventAction -> OrgBlockEventAction -> Bool
$c>= :: OrgBlockEventAction -> OrgBlockEventAction -> Bool
> :: OrgBlockEventAction -> OrgBlockEventAction -> Bool
$c> :: OrgBlockEventAction -> OrgBlockEventAction -> Bool
<= :: OrgBlockEventAction -> OrgBlockEventAction -> Bool
$c<= :: OrgBlockEventAction -> OrgBlockEventAction -> Bool
< :: OrgBlockEventAction -> OrgBlockEventAction -> Bool
$c< :: OrgBlockEventAction -> OrgBlockEventAction -> Bool
compare :: OrgBlockEventAction -> OrgBlockEventAction -> Ordering
$ccompare :: OrgBlockEventAction -> OrgBlockEventAction -> Ordering
Ord, Int -> OrgBlockEventAction -> ShowS
[OrgBlockEventAction] -> ShowS
OrgBlockEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrgBlockEventAction] -> ShowS
$cshowList :: [OrgBlockEventAction] -> ShowS
show :: OrgBlockEventAction -> String
$cshow :: OrgBlockEventAction -> String
showsPrec :: Int -> OrgBlockEventAction -> ShowS
$cshowsPrec :: Int -> OrgBlockEventAction -> ShowS
Show, forall x. Rep OrgBlockEventAction x -> OrgBlockEventAction
forall x. OrgBlockEventAction -> Rep OrgBlockEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OrgBlockEventAction x -> OrgBlockEventAction
$cfrom :: forall x. OrgBlockEventAction -> Rep OrgBlockEventAction x
Generic, Typeable, Typeable OrgBlockEventAction
OrgBlockEventAction -> DataType
OrgBlockEventAction -> Constr
(forall b. Data b => b -> b)
-> OrgBlockEventAction -> OrgBlockEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> OrgBlockEventAction -> u
forall u.
(forall d. Data d => d -> u) -> OrgBlockEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrgBlockEventAction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrgBlockEventAction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> OrgBlockEventAction -> m OrgBlockEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrgBlockEventAction -> m OrgBlockEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrgBlockEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> OrgBlockEventAction
-> c OrgBlockEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrgBlockEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrgBlockEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrgBlockEventAction -> m OrgBlockEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrgBlockEventAction -> m OrgBlockEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrgBlockEventAction -> m OrgBlockEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrgBlockEventAction -> m OrgBlockEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> OrgBlockEventAction -> m OrgBlockEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> OrgBlockEventAction -> m OrgBlockEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> OrgBlockEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> OrgBlockEventAction -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> OrgBlockEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> OrgBlockEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrgBlockEventAction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrgBlockEventAction -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrgBlockEventAction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrgBlockEventAction -> r
gmapT :: (forall b. Data b => b -> b)
-> OrgBlockEventAction -> OrgBlockEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> OrgBlockEventAction -> OrgBlockEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrgBlockEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrgBlockEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrgBlockEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrgBlockEventAction)
dataTypeOf :: OrgBlockEventAction -> DataType
$cdataTypeOf :: OrgBlockEventAction -> DataType
toConstr :: OrgBlockEventAction -> Constr
$ctoConstr :: OrgBlockEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrgBlockEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrgBlockEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> OrgBlockEventAction
-> c OrgBlockEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> OrgBlockEventAction
-> c OrgBlockEventAction
Data)

instance NFData OrgBlockEventAction where rnf :: OrgBlockEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON OrgBlockEventAction where
  parseJSON :: Value -> Parser OrgBlockEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Organization event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"blocked"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure OrgBlockEventAction
OrgBlockBlockedAction
        Text
"unblocked"     -> forall (f :: * -> *) a. Applicative f => a -> f a
pure OrgBlockEventAction
OrgBlockUnblockedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> OrgBlockEventAction
OrgBlockActionOther Text
t)

-- | Triggered when an organization blocks or unblocks a user.

-- See <https://developer.github.com/v3/activity/events/types/#orgblockevent>.

data OrgBlockEvent = OrgBlockEvent
    { OrgBlockEvent -> OrgBlockEventAction
evOrgBlockAction          :: !OrgBlockEventAction
    , OrgBlockEvent -> HookUser
evOrgBlockUser            :: !HookUser
    , OrgBlockEvent -> HookOrganization
evOrgBlockOrg             :: !HookOrganization
    , OrgBlockEvent -> HookUser
evOrgBlockSender          :: !HookUser
    }
    deriving (OrgBlockEvent -> OrgBlockEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrgBlockEvent -> OrgBlockEvent -> Bool
$c/= :: OrgBlockEvent -> OrgBlockEvent -> Bool
== :: OrgBlockEvent -> OrgBlockEvent -> Bool
$c== :: OrgBlockEvent -> OrgBlockEvent -> Bool
Eq, Int -> OrgBlockEvent -> ShowS
[OrgBlockEvent] -> ShowS
OrgBlockEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrgBlockEvent] -> ShowS
$cshowList :: [OrgBlockEvent] -> ShowS
show :: OrgBlockEvent -> String
$cshow :: OrgBlockEvent -> String
showsPrec :: Int -> OrgBlockEvent -> ShowS
$cshowsPrec :: Int -> OrgBlockEvent -> ShowS
Show, Typeable, Typeable OrgBlockEvent
OrgBlockEvent -> DataType
OrgBlockEvent -> Constr
(forall b. Data b => b -> b) -> OrgBlockEvent -> OrgBlockEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> OrgBlockEvent -> u
forall u. (forall d. Data d => d -> u) -> OrgBlockEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrgBlockEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrgBlockEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OrgBlockEvent -> m OrgBlockEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OrgBlockEvent -> m OrgBlockEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrgBlockEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrgBlockEvent -> c OrgBlockEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrgBlockEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrgBlockEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OrgBlockEvent -> m OrgBlockEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OrgBlockEvent -> m OrgBlockEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OrgBlockEvent -> m OrgBlockEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OrgBlockEvent -> m OrgBlockEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OrgBlockEvent -> m OrgBlockEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OrgBlockEvent -> m OrgBlockEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> OrgBlockEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> OrgBlockEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> OrgBlockEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> OrgBlockEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrgBlockEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrgBlockEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrgBlockEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrgBlockEvent -> r
gmapT :: (forall b. Data b => b -> b) -> OrgBlockEvent -> OrgBlockEvent
$cgmapT :: (forall b. Data b => b -> b) -> OrgBlockEvent -> OrgBlockEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrgBlockEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrgBlockEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrgBlockEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrgBlockEvent)
dataTypeOf :: OrgBlockEvent -> DataType
$cdataTypeOf :: OrgBlockEvent -> DataType
toConstr :: OrgBlockEvent -> Constr
$ctoConstr :: OrgBlockEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrgBlockEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrgBlockEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrgBlockEvent -> c OrgBlockEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrgBlockEvent -> c OrgBlockEvent
Data, forall x. Rep OrgBlockEvent x -> OrgBlockEvent
forall x. OrgBlockEvent -> Rep OrgBlockEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OrgBlockEvent x -> OrgBlockEvent
$cfrom :: forall x. OrgBlockEvent -> Rep OrgBlockEvent x
Generic)

instance EventHasSender OrgBlockEvent where senderOfEvent :: OrgBlockEvent -> HookUser
senderOfEvent = OrgBlockEvent -> HookUser
evOrgBlockSender
instance NFData OrgBlockEvent where rnf :: OrgBlockEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


-- | Represents an attempted build of a GitHub Pages site, whether successful or not.

-- Triggered on push to a GitHub Pages enabled branch (gh-pages for project pages, master for user and organization pages).

-- Events of this type are not visible in timelines. These events are only used to trigger hooks.

-- See <https://developer.github.com/v3/activity/events/types/#pagebuildevent>.

data PageBuildEvent = PageBuildEvent
    { PageBuildEvent -> Int
evPageBuildId             :: !Int
    , PageBuildEvent -> HookPageBuildResult
evPageBuildResult         :: !HookPageBuildResult
    , PageBuildEvent -> HookRepository
evPageBuildRepo           :: !HookRepository
    , PageBuildEvent -> HookUser
evPageBuildSender         :: !HookUser
    }
    deriving (PageBuildEvent -> PageBuildEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PageBuildEvent -> PageBuildEvent -> Bool
$c/= :: PageBuildEvent -> PageBuildEvent -> Bool
== :: PageBuildEvent -> PageBuildEvent -> Bool
$c== :: PageBuildEvent -> PageBuildEvent -> Bool
Eq, Int -> PageBuildEvent -> ShowS
[PageBuildEvent] -> ShowS
PageBuildEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PageBuildEvent] -> ShowS
$cshowList :: [PageBuildEvent] -> ShowS
show :: PageBuildEvent -> String
$cshow :: PageBuildEvent -> String
showsPrec :: Int -> PageBuildEvent -> ShowS
$cshowsPrec :: Int -> PageBuildEvent -> ShowS
Show, Typeable, Typeable PageBuildEvent
PageBuildEvent -> DataType
PageBuildEvent -> Constr
(forall b. Data b => b -> b) -> PageBuildEvent -> PageBuildEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> PageBuildEvent -> u
forall u. (forall d. Data d => d -> u) -> PageBuildEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PageBuildEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PageBuildEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PageBuildEvent -> m PageBuildEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PageBuildEvent -> m PageBuildEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PageBuildEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PageBuildEvent -> c PageBuildEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PageBuildEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PageBuildEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PageBuildEvent -> m PageBuildEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PageBuildEvent -> m PageBuildEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PageBuildEvent -> m PageBuildEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PageBuildEvent -> m PageBuildEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PageBuildEvent -> m PageBuildEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PageBuildEvent -> m PageBuildEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PageBuildEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PageBuildEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> PageBuildEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> PageBuildEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PageBuildEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PageBuildEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PageBuildEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PageBuildEvent -> r
gmapT :: (forall b. Data b => b -> b) -> PageBuildEvent -> PageBuildEvent
$cgmapT :: (forall b. Data b => b -> b) -> PageBuildEvent -> PageBuildEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PageBuildEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PageBuildEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PageBuildEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PageBuildEvent)
dataTypeOf :: PageBuildEvent -> DataType
$cdataTypeOf :: PageBuildEvent -> DataType
toConstr :: PageBuildEvent -> Constr
$ctoConstr :: PageBuildEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PageBuildEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PageBuildEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PageBuildEvent -> c PageBuildEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PageBuildEvent -> c PageBuildEvent
Data, forall x. Rep PageBuildEvent x -> PageBuildEvent
forall x. PageBuildEvent -> Rep PageBuildEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PageBuildEvent x -> PageBuildEvent
$cfrom :: forall x. PageBuildEvent -> Rep PageBuildEvent x
Generic)

instance EventHasSender PageBuildEvent where senderOfEvent :: PageBuildEvent -> HookUser
senderOfEvent = PageBuildEvent -> HookUser
evPageBuildSender
instance EventHasRepo PageBuildEvent where repoForEvent :: PageBuildEvent -> HookRepository
repoForEvent = PageBuildEvent -> HookRepository
evPageBuildRepo
instance NFData PageBuildEvent where rnf :: PageBuildEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data ProjectCardEventAction
  -- | Decodes from "created"

  = ProjectCardCreatedAction
  -- | Decodes from "edited"

  | ProjectCardEditedAction
  -- | Decodes from "converted"

  | ProjectCardConvertedAction
  -- | Decodes from "moved"

  | ProjectCardMovedAction
  -- | Decodes from "deleted"

  | ProjectCardDeletedAction
  -- | The result of decoding an unknown project card event action type

  | ProjectCardActionOther !Text
  deriving (ProjectCardEventAction -> ProjectCardEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProjectCardEventAction -> ProjectCardEventAction -> Bool
$c/= :: ProjectCardEventAction -> ProjectCardEventAction -> Bool
== :: ProjectCardEventAction -> ProjectCardEventAction -> Bool
$c== :: ProjectCardEventAction -> ProjectCardEventAction -> Bool
Eq, Eq ProjectCardEventAction
ProjectCardEventAction -> ProjectCardEventAction -> Bool
ProjectCardEventAction -> ProjectCardEventAction -> Ordering
ProjectCardEventAction
-> ProjectCardEventAction -> ProjectCardEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ProjectCardEventAction
-> ProjectCardEventAction -> ProjectCardEventAction
$cmin :: ProjectCardEventAction
-> ProjectCardEventAction -> ProjectCardEventAction
max :: ProjectCardEventAction
-> ProjectCardEventAction -> ProjectCardEventAction
$cmax :: ProjectCardEventAction
-> ProjectCardEventAction -> ProjectCardEventAction
>= :: ProjectCardEventAction -> ProjectCardEventAction -> Bool
$c>= :: ProjectCardEventAction -> ProjectCardEventAction -> Bool
> :: ProjectCardEventAction -> ProjectCardEventAction -> Bool
$c> :: ProjectCardEventAction -> ProjectCardEventAction -> Bool
<= :: ProjectCardEventAction -> ProjectCardEventAction -> Bool
$c<= :: ProjectCardEventAction -> ProjectCardEventAction -> Bool
< :: ProjectCardEventAction -> ProjectCardEventAction -> Bool
$c< :: ProjectCardEventAction -> ProjectCardEventAction -> Bool
compare :: ProjectCardEventAction -> ProjectCardEventAction -> Ordering
$ccompare :: ProjectCardEventAction -> ProjectCardEventAction -> Ordering
Ord, Int -> ProjectCardEventAction -> ShowS
[ProjectCardEventAction] -> ShowS
ProjectCardEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProjectCardEventAction] -> ShowS
$cshowList :: [ProjectCardEventAction] -> ShowS
show :: ProjectCardEventAction -> String
$cshow :: ProjectCardEventAction -> String
showsPrec :: Int -> ProjectCardEventAction -> ShowS
$cshowsPrec :: Int -> ProjectCardEventAction -> ShowS
Show, forall x. Rep ProjectCardEventAction x -> ProjectCardEventAction
forall x. ProjectCardEventAction -> Rep ProjectCardEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProjectCardEventAction x -> ProjectCardEventAction
$cfrom :: forall x. ProjectCardEventAction -> Rep ProjectCardEventAction x
Generic, Typeable, Typeable ProjectCardEventAction
ProjectCardEventAction -> DataType
ProjectCardEventAction -> Constr
(forall b. Data b => b -> b)
-> ProjectCardEventAction -> ProjectCardEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> ProjectCardEventAction -> u
forall u.
(forall d. Data d => d -> u) -> ProjectCardEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ProjectCardEventAction
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ProjectCardEventAction
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectCardEventAction -> m ProjectCardEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectCardEventAction -> m ProjectCardEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectCardEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ProjectCardEventAction
-> c ProjectCardEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectCardEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectCardEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectCardEventAction -> m ProjectCardEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectCardEventAction -> m ProjectCardEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectCardEventAction -> m ProjectCardEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectCardEventAction -> m ProjectCardEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectCardEventAction -> m ProjectCardEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectCardEventAction -> m ProjectCardEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ProjectCardEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ProjectCardEventAction -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> ProjectCardEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> ProjectCardEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ProjectCardEventAction
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ProjectCardEventAction
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ProjectCardEventAction
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ProjectCardEventAction
-> r
gmapT :: (forall b. Data b => b -> b)
-> ProjectCardEventAction -> ProjectCardEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> ProjectCardEventAction -> ProjectCardEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectCardEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectCardEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectCardEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectCardEventAction)
dataTypeOf :: ProjectCardEventAction -> DataType
$cdataTypeOf :: ProjectCardEventAction -> DataType
toConstr :: ProjectCardEventAction -> Constr
$ctoConstr :: ProjectCardEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectCardEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectCardEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ProjectCardEventAction
-> c ProjectCardEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ProjectCardEventAction
-> c ProjectCardEventAction
Data)

instance NFData ProjectCardEventAction where rnf :: ProjectCardEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON ProjectCardEventAction where
  parseJSON :: Value -> Parser ProjectCardEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Project card event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"created"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ProjectCardEventAction
ProjectCardCreatedAction
        Text
"edited"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ProjectCardEventAction
ProjectCardEditedAction
        Text
"converted"     -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ProjectCardEventAction
ProjectCardConvertedAction
        Text
"moved"         -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ProjectCardEventAction
ProjectCardMovedAction
        Text
"deleted"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ProjectCardEventAction
ProjectCardDeletedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> ProjectCardEventAction
ProjectCardActionOther Text
t)

-- | Triggered when a project card is created, updated, moved, converted to an issue, or deleted.

-- See <https://developer.github.com/v3/activity/events/types/#projectcardevent>.

data ProjectCardEvent = ProjectCardEvent
    { ProjectCardEvent -> ProjectCardEventAction
evProjectCardAction       :: !ProjectCardEventAction
    , ProjectCardEvent -> HookProjectCard
evProjectCardPayload      :: !HookProjectCard
    , ProjectCardEvent -> HookRepository
evProjectCardRepo         :: !HookRepository
    , ProjectCardEvent -> HookOrganization
evProjectCardOrg          :: !HookOrganization
    , ProjectCardEvent -> HookUser
evProjectCardSender       :: !HookUser
    }
    deriving (ProjectCardEvent -> ProjectCardEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProjectCardEvent -> ProjectCardEvent -> Bool
$c/= :: ProjectCardEvent -> ProjectCardEvent -> Bool
== :: ProjectCardEvent -> ProjectCardEvent -> Bool
$c== :: ProjectCardEvent -> ProjectCardEvent -> Bool
Eq, Int -> ProjectCardEvent -> ShowS
[ProjectCardEvent] -> ShowS
ProjectCardEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProjectCardEvent] -> ShowS
$cshowList :: [ProjectCardEvent] -> ShowS
show :: ProjectCardEvent -> String
$cshow :: ProjectCardEvent -> String
showsPrec :: Int -> ProjectCardEvent -> ShowS
$cshowsPrec :: Int -> ProjectCardEvent -> ShowS
Show, Typeable, Typeable ProjectCardEvent
ProjectCardEvent -> DataType
ProjectCardEvent -> Constr
(forall b. Data b => b -> b)
-> ProjectCardEvent -> ProjectCardEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> ProjectCardEvent -> u
forall u. (forall d. Data d => d -> u) -> ProjectCardEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectCardEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectCardEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectCardEvent -> m ProjectCardEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectCardEvent -> m ProjectCardEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectCardEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProjectCardEvent -> c ProjectCardEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectCardEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectCardEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectCardEvent -> m ProjectCardEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectCardEvent -> m ProjectCardEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectCardEvent -> m ProjectCardEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectCardEvent -> m ProjectCardEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectCardEvent -> m ProjectCardEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectCardEvent -> m ProjectCardEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ProjectCardEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ProjectCardEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> ProjectCardEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ProjectCardEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectCardEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectCardEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectCardEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectCardEvent -> r
gmapT :: (forall b. Data b => b -> b)
-> ProjectCardEvent -> ProjectCardEvent
$cgmapT :: (forall b. Data b => b -> b)
-> ProjectCardEvent -> ProjectCardEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectCardEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectCardEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectCardEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectCardEvent)
dataTypeOf :: ProjectCardEvent -> DataType
$cdataTypeOf :: ProjectCardEvent -> DataType
toConstr :: ProjectCardEvent -> Constr
$ctoConstr :: ProjectCardEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectCardEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectCardEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProjectCardEvent -> c ProjectCardEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProjectCardEvent -> c ProjectCardEvent
Data, forall x. Rep ProjectCardEvent x -> ProjectCardEvent
forall x. ProjectCardEvent -> Rep ProjectCardEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProjectCardEvent x -> ProjectCardEvent
$cfrom :: forall x. ProjectCardEvent -> Rep ProjectCardEvent x
Generic)

instance EventHasSender ProjectCardEvent where senderOfEvent :: ProjectCardEvent -> HookUser
senderOfEvent = ProjectCardEvent -> HookUser
evProjectCardSender
instance EventHasRepo ProjectCardEvent where repoForEvent :: ProjectCardEvent -> HookRepository
repoForEvent = ProjectCardEvent -> HookRepository
evProjectCardRepo
instance NFData ProjectCardEvent where rnf :: ProjectCardEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data ProjectColumnEventAction
  -- | Decodes from "created"

  = ProjectColumnCreatedAction
  -- | Decodes from "edited"

  | ProjectColumnEditedAction
  -- | Decodes from "moved"

  | ProjectColumnMovedAction
  -- | Decodes from "deleted"

  | ProjectColumnDeletedAction
  -- | The result of decoding an unknown project card event action type

  | ProjectColumnActionOther !Text
  deriving (ProjectColumnEventAction -> ProjectColumnEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProjectColumnEventAction -> ProjectColumnEventAction -> Bool
$c/= :: ProjectColumnEventAction -> ProjectColumnEventAction -> Bool
== :: ProjectColumnEventAction -> ProjectColumnEventAction -> Bool
$c== :: ProjectColumnEventAction -> ProjectColumnEventAction -> Bool
Eq, Eq ProjectColumnEventAction
ProjectColumnEventAction -> ProjectColumnEventAction -> Bool
ProjectColumnEventAction -> ProjectColumnEventAction -> Ordering
ProjectColumnEventAction
-> ProjectColumnEventAction -> ProjectColumnEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ProjectColumnEventAction
-> ProjectColumnEventAction -> ProjectColumnEventAction
$cmin :: ProjectColumnEventAction
-> ProjectColumnEventAction -> ProjectColumnEventAction
max :: ProjectColumnEventAction
-> ProjectColumnEventAction -> ProjectColumnEventAction
$cmax :: ProjectColumnEventAction
-> ProjectColumnEventAction -> ProjectColumnEventAction
>= :: ProjectColumnEventAction -> ProjectColumnEventAction -> Bool
$c>= :: ProjectColumnEventAction -> ProjectColumnEventAction -> Bool
> :: ProjectColumnEventAction -> ProjectColumnEventAction -> Bool
$c> :: ProjectColumnEventAction -> ProjectColumnEventAction -> Bool
<= :: ProjectColumnEventAction -> ProjectColumnEventAction -> Bool
$c<= :: ProjectColumnEventAction -> ProjectColumnEventAction -> Bool
< :: ProjectColumnEventAction -> ProjectColumnEventAction -> Bool
$c< :: ProjectColumnEventAction -> ProjectColumnEventAction -> Bool
compare :: ProjectColumnEventAction -> ProjectColumnEventAction -> Ordering
$ccompare :: ProjectColumnEventAction -> ProjectColumnEventAction -> Ordering
Ord, Int -> ProjectColumnEventAction -> ShowS
[ProjectColumnEventAction] -> ShowS
ProjectColumnEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProjectColumnEventAction] -> ShowS
$cshowList :: [ProjectColumnEventAction] -> ShowS
show :: ProjectColumnEventAction -> String
$cshow :: ProjectColumnEventAction -> String
showsPrec :: Int -> ProjectColumnEventAction -> ShowS
$cshowsPrec :: Int -> ProjectColumnEventAction -> ShowS
Show, forall x.
Rep ProjectColumnEventAction x -> ProjectColumnEventAction
forall x.
ProjectColumnEventAction -> Rep ProjectColumnEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProjectColumnEventAction x -> ProjectColumnEventAction
$cfrom :: forall x.
ProjectColumnEventAction -> Rep ProjectColumnEventAction x
Generic, Typeable, Typeable ProjectColumnEventAction
ProjectColumnEventAction -> DataType
ProjectColumnEventAction -> Constr
(forall b. Data b => b -> b)
-> ProjectColumnEventAction -> ProjectColumnEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int
-> (forall d. Data d => d -> u) -> ProjectColumnEventAction -> u
forall u.
(forall d. Data d => d -> u) -> ProjectColumnEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ProjectColumnEventAction
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ProjectColumnEventAction
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEventAction -> m ProjectColumnEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEventAction -> m ProjectColumnEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectColumnEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ProjectColumnEventAction
-> c ProjectColumnEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectColumnEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectColumnEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEventAction -> m ProjectColumnEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEventAction -> m ProjectColumnEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEventAction -> m ProjectColumnEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEventAction -> m ProjectColumnEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEventAction -> m ProjectColumnEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEventAction -> m ProjectColumnEventAction
gmapQi :: forall u.
Int
-> (forall d. Data d => d -> u) -> ProjectColumnEventAction -> u
$cgmapQi :: forall u.
Int
-> (forall d. Data d => d -> u) -> ProjectColumnEventAction -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> ProjectColumnEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> ProjectColumnEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ProjectColumnEventAction
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ProjectColumnEventAction
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ProjectColumnEventAction
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ProjectColumnEventAction
-> r
gmapT :: (forall b. Data b => b -> b)
-> ProjectColumnEventAction -> ProjectColumnEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> ProjectColumnEventAction -> ProjectColumnEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectColumnEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectColumnEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectColumnEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectColumnEventAction)
dataTypeOf :: ProjectColumnEventAction -> DataType
$cdataTypeOf :: ProjectColumnEventAction -> DataType
toConstr :: ProjectColumnEventAction -> Constr
$ctoConstr :: ProjectColumnEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectColumnEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectColumnEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ProjectColumnEventAction
-> c ProjectColumnEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ProjectColumnEventAction
-> c ProjectColumnEventAction
Data)

instance NFData ProjectColumnEventAction where rnf :: ProjectColumnEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON ProjectColumnEventAction where
  parseJSON :: Value -> Parser ProjectColumnEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Project column event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"created"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ProjectColumnEventAction
ProjectColumnCreatedAction
        Text
"edited"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ProjectColumnEventAction
ProjectColumnEditedAction
        Text
"moved"         -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ProjectColumnEventAction
ProjectColumnMovedAction
        Text
"deleted"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ProjectColumnEventAction
ProjectColumnDeletedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> ProjectColumnEventAction
ProjectColumnActionOther Text
t)

-- | Triggered when a project column is created, updated, moved, or deleted.

-- See <https://developer.github.com/v3/activity/events/types/#projectcolumnevent>.

data ProjectColumnEvent = ProjectColumnEvent
    { ProjectColumnEvent -> ProjectColumnEventAction
evProjectColumnAction     :: !ProjectColumnEventAction
    , ProjectColumnEvent -> HookProjectColumn
evProjectColumnPayload    :: !HookProjectColumn
    , ProjectColumnEvent -> HookRepository
evProjectColumnRepo       :: !HookRepository
    , ProjectColumnEvent -> HookOrganization
evProjectColumnOrg        :: !HookOrganization
    , ProjectColumnEvent -> HookUser
evProjectColumnSender     :: !HookUser
    }
    deriving (ProjectColumnEvent -> ProjectColumnEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProjectColumnEvent -> ProjectColumnEvent -> Bool
$c/= :: ProjectColumnEvent -> ProjectColumnEvent -> Bool
== :: ProjectColumnEvent -> ProjectColumnEvent -> Bool
$c== :: ProjectColumnEvent -> ProjectColumnEvent -> Bool
Eq, Int -> ProjectColumnEvent -> ShowS
[ProjectColumnEvent] -> ShowS
ProjectColumnEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProjectColumnEvent] -> ShowS
$cshowList :: [ProjectColumnEvent] -> ShowS
show :: ProjectColumnEvent -> String
$cshow :: ProjectColumnEvent -> String
showsPrec :: Int -> ProjectColumnEvent -> ShowS
$cshowsPrec :: Int -> ProjectColumnEvent -> ShowS
Show, Typeable, Typeable ProjectColumnEvent
ProjectColumnEvent -> DataType
ProjectColumnEvent -> Constr
(forall b. Data b => b -> b)
-> ProjectColumnEvent -> ProjectColumnEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> ProjectColumnEvent -> u
forall u. (forall d. Data d => d -> u) -> ProjectColumnEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectColumnEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectColumnEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEvent -> m ProjectColumnEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEvent -> m ProjectColumnEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectColumnEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ProjectColumnEvent
-> c ProjectColumnEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectColumnEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectColumnEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEvent -> m ProjectColumnEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEvent -> m ProjectColumnEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEvent -> m ProjectColumnEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEvent -> m ProjectColumnEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEvent -> m ProjectColumnEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectColumnEvent -> m ProjectColumnEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ProjectColumnEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ProjectColumnEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> ProjectColumnEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ProjectColumnEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectColumnEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectColumnEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectColumnEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectColumnEvent -> r
gmapT :: (forall b. Data b => b -> b)
-> ProjectColumnEvent -> ProjectColumnEvent
$cgmapT :: (forall b. Data b => b -> b)
-> ProjectColumnEvent -> ProjectColumnEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectColumnEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectColumnEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectColumnEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectColumnEvent)
dataTypeOf :: ProjectColumnEvent -> DataType
$cdataTypeOf :: ProjectColumnEvent -> DataType
toConstr :: ProjectColumnEvent -> Constr
$ctoConstr :: ProjectColumnEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectColumnEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectColumnEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ProjectColumnEvent
-> c ProjectColumnEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ProjectColumnEvent
-> c ProjectColumnEvent
Data, forall x. Rep ProjectColumnEvent x -> ProjectColumnEvent
forall x. ProjectColumnEvent -> Rep ProjectColumnEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProjectColumnEvent x -> ProjectColumnEvent
$cfrom :: forall x. ProjectColumnEvent -> Rep ProjectColumnEvent x
Generic)

instance EventHasSender ProjectColumnEvent where senderOfEvent :: ProjectColumnEvent -> HookUser
senderOfEvent = ProjectColumnEvent -> HookUser
evProjectColumnSender
instance EventHasRepo ProjectColumnEvent where repoForEvent :: ProjectColumnEvent -> HookRepository
repoForEvent = ProjectColumnEvent -> HookRepository
evProjectColumnRepo
instance NFData ProjectColumnEvent where rnf :: ProjectColumnEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data ProjectEventAction
  -- | Decodes from "created"

  = ProjectCreatedAction
  -- | Decodes from "edited"

  | ProjectEditedAction
  -- | Decodes from "closed"

  | ProjectClosedAction
  -- | Decodes from "reopened"

  | ProjectReopenedAction
  -- | Decodes from "deleted"

  | ProjectDeletedAction
  -- | The result of decoding an unknown project event action type

  | ProjectActionOther !Text
  deriving (ProjectEventAction -> ProjectEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProjectEventAction -> ProjectEventAction -> Bool
$c/= :: ProjectEventAction -> ProjectEventAction -> Bool
== :: ProjectEventAction -> ProjectEventAction -> Bool
$c== :: ProjectEventAction -> ProjectEventAction -> Bool
Eq, Eq ProjectEventAction
ProjectEventAction -> ProjectEventAction -> Bool
ProjectEventAction -> ProjectEventAction -> Ordering
ProjectEventAction -> ProjectEventAction -> ProjectEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ProjectEventAction -> ProjectEventAction -> ProjectEventAction
$cmin :: ProjectEventAction -> ProjectEventAction -> ProjectEventAction
max :: ProjectEventAction -> ProjectEventAction -> ProjectEventAction
$cmax :: ProjectEventAction -> ProjectEventAction -> ProjectEventAction
>= :: ProjectEventAction -> ProjectEventAction -> Bool
$c>= :: ProjectEventAction -> ProjectEventAction -> Bool
> :: ProjectEventAction -> ProjectEventAction -> Bool
$c> :: ProjectEventAction -> ProjectEventAction -> Bool
<= :: ProjectEventAction -> ProjectEventAction -> Bool
$c<= :: ProjectEventAction -> ProjectEventAction -> Bool
< :: ProjectEventAction -> ProjectEventAction -> Bool
$c< :: ProjectEventAction -> ProjectEventAction -> Bool
compare :: ProjectEventAction -> ProjectEventAction -> Ordering
$ccompare :: ProjectEventAction -> ProjectEventAction -> Ordering
Ord, Int -> ProjectEventAction -> ShowS
[ProjectEventAction] -> ShowS
ProjectEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProjectEventAction] -> ShowS
$cshowList :: [ProjectEventAction] -> ShowS
show :: ProjectEventAction -> String
$cshow :: ProjectEventAction -> String
showsPrec :: Int -> ProjectEventAction -> ShowS
$cshowsPrec :: Int -> ProjectEventAction -> ShowS
Show, forall x. Rep ProjectEventAction x -> ProjectEventAction
forall x. ProjectEventAction -> Rep ProjectEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProjectEventAction x -> ProjectEventAction
$cfrom :: forall x. ProjectEventAction -> Rep ProjectEventAction x
Generic, Typeable, Typeable ProjectEventAction
ProjectEventAction -> DataType
ProjectEventAction -> Constr
(forall b. Data b => b -> b)
-> ProjectEventAction -> ProjectEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> ProjectEventAction -> u
forall u. (forall d. Data d => d -> u) -> ProjectEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectEventAction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectEventAction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectEventAction -> m ProjectEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectEventAction -> m ProjectEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ProjectEventAction
-> c ProjectEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectEventAction -> m ProjectEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectEventAction -> m ProjectEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectEventAction -> m ProjectEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ProjectEventAction -> m ProjectEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectEventAction -> m ProjectEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ProjectEventAction -> m ProjectEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ProjectEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ProjectEventAction -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> ProjectEventAction -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ProjectEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectEventAction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectEventAction -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectEventAction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectEventAction -> r
gmapT :: (forall b. Data b => b -> b)
-> ProjectEventAction -> ProjectEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> ProjectEventAction -> ProjectEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectEventAction)
dataTypeOf :: ProjectEventAction -> DataType
$cdataTypeOf :: ProjectEventAction -> DataType
toConstr :: ProjectEventAction -> Constr
$ctoConstr :: ProjectEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ProjectEventAction
-> c ProjectEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ProjectEventAction
-> c ProjectEventAction
Data)

instance NFData ProjectEventAction where rnf :: ProjectEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON ProjectEventAction where
  parseJSON :: Value -> Parser ProjectEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Project event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"created"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ProjectEventAction
ProjectCreatedAction
        Text
"edited"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ProjectEventAction
ProjectEditedAction
        Text
"closed"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ProjectEventAction
ProjectClosedAction
        Text
"reopened"      -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ProjectEventAction
ProjectReopenedAction
        Text
"deleted"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ProjectEventAction
ProjectDeletedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> ProjectEventAction
ProjectActionOther Text
t)

-- | Triggered when a project is created, updated, closed, reopened, or deleted.

-- See <https://developer.github.com/v3/activity/events/types/#projectevent>.

data ProjectEvent = ProjectEvent
    { ProjectEvent -> ProjectEventAction
evProjectEventAction      :: !ProjectEventAction
    , ProjectEvent -> HookProject
evProjectPayload          :: !HookProject
    , ProjectEvent -> HookRepository
evProjectRepo             :: !HookRepository
    , ProjectEvent -> HookOrganization
evProjectOrganization     :: !HookOrganization
    , ProjectEvent -> HookUser
evProjectSender           :: !HookUser
    }
    deriving (ProjectEvent -> ProjectEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProjectEvent -> ProjectEvent -> Bool
$c/= :: ProjectEvent -> ProjectEvent -> Bool
== :: ProjectEvent -> ProjectEvent -> Bool
$c== :: ProjectEvent -> ProjectEvent -> Bool
Eq, Int -> ProjectEvent -> ShowS
[ProjectEvent] -> ShowS
ProjectEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProjectEvent] -> ShowS
$cshowList :: [ProjectEvent] -> ShowS
show :: ProjectEvent -> String
$cshow :: ProjectEvent -> String
showsPrec :: Int -> ProjectEvent -> ShowS
$cshowsPrec :: Int -> ProjectEvent -> ShowS
Show, Typeable, Typeable ProjectEvent
ProjectEvent -> DataType
ProjectEvent -> Constr
(forall b. Data b => b -> b) -> ProjectEvent -> ProjectEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ProjectEvent -> u
forall u. (forall d. Data d => d -> u) -> ProjectEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ProjectEvent -> m ProjectEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProjectEvent -> m ProjectEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProjectEvent -> c ProjectEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProjectEvent -> m ProjectEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProjectEvent -> m ProjectEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProjectEvent -> m ProjectEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProjectEvent -> m ProjectEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ProjectEvent -> m ProjectEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ProjectEvent -> m ProjectEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ProjectEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ProjectEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> ProjectEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ProjectEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ProjectEvent -> r
gmapT :: (forall b. Data b => b -> b) -> ProjectEvent -> ProjectEvent
$cgmapT :: (forall b. Data b => b -> b) -> ProjectEvent -> ProjectEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ProjectEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProjectEvent)
dataTypeOf :: ProjectEvent -> DataType
$cdataTypeOf :: ProjectEvent -> DataType
toConstr :: ProjectEvent -> Constr
$ctoConstr :: ProjectEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProjectEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProjectEvent -> c ProjectEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProjectEvent -> c ProjectEvent
Data, forall x. Rep ProjectEvent x -> ProjectEvent
forall x. ProjectEvent -> Rep ProjectEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProjectEvent x -> ProjectEvent
$cfrom :: forall x. ProjectEvent -> Rep ProjectEvent x
Generic)

instance EventHasSender ProjectEvent where senderOfEvent :: ProjectEvent -> HookUser
senderOfEvent = ProjectEvent -> HookUser
evProjectSender
instance EventHasRepo ProjectEvent where repoForEvent :: ProjectEvent -> HookRepository
repoForEvent = ProjectEvent -> HookRepository
evProjectRepo
instance NFData ProjectEvent where rnf :: ProjectEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


-- | Triggered when a private repository is open sourced. Without a doubt: the best GitHub event.

-- See <https://developer.github.com/v3/activity/events/types/#publicevent>.

data PublicEvent = PublicEvent
    { PublicEvent -> HookRepository
evPublicEventRepo         :: !HookRepository
    , PublicEvent -> HookUser
evPublicEventSender       :: !HookUser
    }
    deriving (PublicEvent -> PublicEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PublicEvent -> PublicEvent -> Bool
$c/= :: PublicEvent -> PublicEvent -> Bool
== :: PublicEvent -> PublicEvent -> Bool
$c== :: PublicEvent -> PublicEvent -> Bool
Eq, Int -> PublicEvent -> ShowS
[PublicEvent] -> ShowS
PublicEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PublicEvent] -> ShowS
$cshowList :: [PublicEvent] -> ShowS
show :: PublicEvent -> String
$cshow :: PublicEvent -> String
showsPrec :: Int -> PublicEvent -> ShowS
$cshowsPrec :: Int -> PublicEvent -> ShowS
Show, Typeable, Typeable PublicEvent
PublicEvent -> DataType
PublicEvent -> Constr
(forall b. Data b => b -> b) -> PublicEvent -> PublicEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> PublicEvent -> u
forall u. (forall d. Data d => d -> u) -> PublicEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PublicEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PublicEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PublicEvent -> m PublicEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PublicEvent -> m PublicEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PublicEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PublicEvent -> c PublicEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PublicEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PublicEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PublicEvent -> m PublicEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PublicEvent -> m PublicEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PublicEvent -> m PublicEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PublicEvent -> m PublicEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PublicEvent -> m PublicEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PublicEvent -> m PublicEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> PublicEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> PublicEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> PublicEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> PublicEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PublicEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PublicEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PublicEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PublicEvent -> r
gmapT :: (forall b. Data b => b -> b) -> PublicEvent -> PublicEvent
$cgmapT :: (forall b. Data b => b -> b) -> PublicEvent -> PublicEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PublicEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PublicEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PublicEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PublicEvent)
dataTypeOf :: PublicEvent -> DataType
$cdataTypeOf :: PublicEvent -> DataType
toConstr :: PublicEvent -> Constr
$ctoConstr :: PublicEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PublicEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PublicEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PublicEvent -> c PublicEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PublicEvent -> c PublicEvent
Data, forall x. Rep PublicEvent x -> PublicEvent
forall x. PublicEvent -> Rep PublicEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PublicEvent x -> PublicEvent
$cfrom :: forall x. PublicEvent -> Rep PublicEvent x
Generic)

instance EventHasSender PublicEvent where senderOfEvent :: PublicEvent -> HookUser
senderOfEvent = PublicEvent -> HookUser
evPublicEventSender
instance EventHasRepo PublicEvent where repoForEvent :: PublicEvent -> HookRepository
repoForEvent = PublicEvent -> HookRepository
evPublicEventRepo
instance NFData PublicEvent where rnf :: PublicEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data PullRequestEventAction
  -- | Decodes from "assigned"

  = PullRequestAssignedAction
  -- | Decodes from "unassigned"

  | PullRequestUnassignedAction
  -- | Decodes from "review_requsted"

  | PullRequestReviewRequestedAction
  -- | Decodes from "review_request_removed"

  | PullRequestReviewRequestRemovedAction
  -- | Decodes from "labeled"

  | PullRequestLabeledAction
  -- | Decodes from "unlabeled"

  | PullRequestUnlabeledAction
  -- | Decodes from "opened"

  | PullRequestOpenedAction
  -- | Decodes from "edited"

  | PullRequestEditedAction
  -- | Decodes from "closed"

  | PullRequestClosedAction
  -- | Decodes from "reopened"

  | PullRequestReopenedAction
  -- | The result of decoding an unknown pull request event action type

  | PullRequestActionOther !Text
  deriving (PullRequestEventAction -> PullRequestEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PullRequestEventAction -> PullRequestEventAction -> Bool
$c/= :: PullRequestEventAction -> PullRequestEventAction -> Bool
== :: PullRequestEventAction -> PullRequestEventAction -> Bool
$c== :: PullRequestEventAction -> PullRequestEventAction -> Bool
Eq, Eq PullRequestEventAction
PullRequestEventAction -> PullRequestEventAction -> Bool
PullRequestEventAction -> PullRequestEventAction -> Ordering
PullRequestEventAction
-> PullRequestEventAction -> PullRequestEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: PullRequestEventAction
-> PullRequestEventAction -> PullRequestEventAction
$cmin :: PullRequestEventAction
-> PullRequestEventAction -> PullRequestEventAction
max :: PullRequestEventAction
-> PullRequestEventAction -> PullRequestEventAction
$cmax :: PullRequestEventAction
-> PullRequestEventAction -> PullRequestEventAction
>= :: PullRequestEventAction -> PullRequestEventAction -> Bool
$c>= :: PullRequestEventAction -> PullRequestEventAction -> Bool
> :: PullRequestEventAction -> PullRequestEventAction -> Bool
$c> :: PullRequestEventAction -> PullRequestEventAction -> Bool
<= :: PullRequestEventAction -> PullRequestEventAction -> Bool
$c<= :: PullRequestEventAction -> PullRequestEventAction -> Bool
< :: PullRequestEventAction -> PullRequestEventAction -> Bool
$c< :: PullRequestEventAction -> PullRequestEventAction -> Bool
compare :: PullRequestEventAction -> PullRequestEventAction -> Ordering
$ccompare :: PullRequestEventAction -> PullRequestEventAction -> Ordering
Ord, Int -> PullRequestEventAction -> ShowS
[PullRequestEventAction] -> ShowS
PullRequestEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PullRequestEventAction] -> ShowS
$cshowList :: [PullRequestEventAction] -> ShowS
show :: PullRequestEventAction -> String
$cshow :: PullRequestEventAction -> String
showsPrec :: Int -> PullRequestEventAction -> ShowS
$cshowsPrec :: Int -> PullRequestEventAction -> ShowS
Show, forall x. Rep PullRequestEventAction x -> PullRequestEventAction
forall x. PullRequestEventAction -> Rep PullRequestEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PullRequestEventAction x -> PullRequestEventAction
$cfrom :: forall x. PullRequestEventAction -> Rep PullRequestEventAction x
Generic, Typeable, Typeable PullRequestEventAction
PullRequestEventAction -> DataType
PullRequestEventAction -> Constr
(forall b. Data b => b -> b)
-> PullRequestEventAction -> PullRequestEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> PullRequestEventAction -> u
forall u.
(forall d. Data d => d -> u) -> PullRequestEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestEventAction
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestEventAction
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestEventAction -> m PullRequestEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestEventAction -> m PullRequestEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PullRequestEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestEventAction
-> c PullRequestEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PullRequestEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestEventAction -> m PullRequestEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestEventAction -> m PullRequestEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestEventAction -> m PullRequestEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestEventAction -> m PullRequestEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestEventAction -> m PullRequestEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestEventAction -> m PullRequestEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PullRequestEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PullRequestEventAction -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> PullRequestEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> PullRequestEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestEventAction
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestEventAction
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestEventAction
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestEventAction
-> r
gmapT :: (forall b. Data b => b -> b)
-> PullRequestEventAction -> PullRequestEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> PullRequestEventAction -> PullRequestEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PullRequestEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PullRequestEventAction)
dataTypeOf :: PullRequestEventAction -> DataType
$cdataTypeOf :: PullRequestEventAction -> DataType
toConstr :: PullRequestEventAction -> Constr
$ctoConstr :: PullRequestEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PullRequestEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PullRequestEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestEventAction
-> c PullRequestEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestEventAction
-> c PullRequestEventAction
Data)

instance NFData PullRequestEventAction where rnf :: PullRequestEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON PullRequestEventAction where
  parseJSON :: Value -> Parser PullRequestEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Pull request event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"assigned"      -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestEventAction
PullRequestAssignedAction
        Text
"unassigned"    -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestEventAction
PullRequestUnassignedAction
        Text
"review_requsted" -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestEventAction
PullRequestReviewRequestedAction
        Text
"review_request_removed" -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestEventAction
PullRequestReviewRequestRemovedAction
        Text
"labeled"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestEventAction
PullRequestLabeledAction
        Text
"unlabeled"     -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestEventAction
PullRequestUnlabeledAction
        Text
"opened"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestEventAction
PullRequestOpenedAction
        Text
"edited"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestEventAction
PullRequestEditedAction
        Text
"closed"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestEventAction
PullRequestClosedAction
        Text
"reopened"      -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestEventAction
PullRequestReopenedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> PullRequestEventAction
PullRequestActionOther Text
t)

-- | Triggered when a pull request is assigned, unassigned, labeled, unlabeled, opened, edited,

-- closed, reopened, or synchronized. Also triggered when a pull request review is requested,

-- or when a review request is removed.

-- See <https://developer.github.com/v3/activity/events/types/#pullrequestevent>.

data PullRequestEvent = PullRequestEvent
    { PullRequestEvent -> PullRequestEventAction
evPullReqAction           :: !PullRequestEventAction
    , PullRequestEvent -> Int
evPullReqNumber           :: !Int
    , PullRequestEvent -> HookPullRequest
evPullReqPayload          :: !HookPullRequest
    , PullRequestEvent -> HookRepository
evPullReqRepo             :: !HookRepository
    , PullRequestEvent -> HookUser
evPullReqSender           :: !HookUser
    , PullRequestEvent -> Maybe Int
evPullReqInstallationId   :: !(Maybe Int)
    }
    deriving (PullRequestEvent -> PullRequestEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PullRequestEvent -> PullRequestEvent -> Bool
$c/= :: PullRequestEvent -> PullRequestEvent -> Bool
== :: PullRequestEvent -> PullRequestEvent -> Bool
$c== :: PullRequestEvent -> PullRequestEvent -> Bool
Eq, Int -> PullRequestEvent -> ShowS
[PullRequestEvent] -> ShowS
PullRequestEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PullRequestEvent] -> ShowS
$cshowList :: [PullRequestEvent] -> ShowS
show :: PullRequestEvent -> String
$cshow :: PullRequestEvent -> String
showsPrec :: Int -> PullRequestEvent -> ShowS
$cshowsPrec :: Int -> PullRequestEvent -> ShowS
Show, Typeable, Typeable PullRequestEvent
PullRequestEvent -> DataType
PullRequestEvent -> Constr
(forall b. Data b => b -> b)
-> PullRequestEvent -> PullRequestEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> PullRequestEvent -> u
forall u. (forall d. Data d => d -> u) -> PullRequestEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PullRequestEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PullRequestEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestEvent -> m PullRequestEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestEvent -> m PullRequestEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PullRequestEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PullRequestEvent -> c PullRequestEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PullRequestEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestEvent -> m PullRequestEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestEvent -> m PullRequestEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestEvent -> m PullRequestEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestEvent -> m PullRequestEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestEvent -> m PullRequestEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestEvent -> m PullRequestEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PullRequestEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PullRequestEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> PullRequestEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> PullRequestEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PullRequestEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PullRequestEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PullRequestEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PullRequestEvent -> r
gmapT :: (forall b. Data b => b -> b)
-> PullRequestEvent -> PullRequestEvent
$cgmapT :: (forall b. Data b => b -> b)
-> PullRequestEvent -> PullRequestEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PullRequestEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PullRequestEvent)
dataTypeOf :: PullRequestEvent -> DataType
$cdataTypeOf :: PullRequestEvent -> DataType
toConstr :: PullRequestEvent -> Constr
$ctoConstr :: PullRequestEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PullRequestEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PullRequestEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PullRequestEvent -> c PullRequestEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PullRequestEvent -> c PullRequestEvent
Data, forall x. Rep PullRequestEvent x -> PullRequestEvent
forall x. PullRequestEvent -> Rep PullRequestEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PullRequestEvent x -> PullRequestEvent
$cfrom :: forall x. PullRequestEvent -> Rep PullRequestEvent x
Generic)

instance EventHasSender PullRequestEvent where senderOfEvent :: PullRequestEvent -> HookUser
senderOfEvent = PullRequestEvent -> HookUser
evPullReqSender
instance EventHasRepo PullRequestEvent where repoForEvent :: PullRequestEvent -> HookRepository
repoForEvent = PullRequestEvent -> HookRepository
evPullReqRepo
instance NFData PullRequestEvent where rnf :: PullRequestEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data PullRequestReviewEventAction
  -- | Decodes from "submitted"

  = PullRequestReviewSubmittedAction
  -- | Decodes from "edited"

  | PullRequestReviewEditedAction
  -- | Decodes from "dismissed"

  | PullRequestReviewDismissedAction
  -- | The result of decoding an unknown pull request review event action type

  | PullRequestReviewActionOther !Text
  deriving (PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Bool
$c/= :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Bool
== :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Bool
$c== :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Bool
Eq, Eq PullRequestReviewEventAction
PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Bool
PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Ordering
PullRequestReviewEventAction
-> PullRequestReviewEventAction -> PullRequestReviewEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> PullRequestReviewEventAction
$cmin :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> PullRequestReviewEventAction
max :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> PullRequestReviewEventAction
$cmax :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> PullRequestReviewEventAction
>= :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Bool
$c>= :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Bool
> :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Bool
$c> :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Bool
<= :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Bool
$c<= :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Bool
< :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Bool
$c< :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Bool
compare :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Ordering
$ccompare :: PullRequestReviewEventAction
-> PullRequestReviewEventAction -> Ordering
Ord, Int -> PullRequestReviewEventAction -> ShowS
[PullRequestReviewEventAction] -> ShowS
PullRequestReviewEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PullRequestReviewEventAction] -> ShowS
$cshowList :: [PullRequestReviewEventAction] -> ShowS
show :: PullRequestReviewEventAction -> String
$cshow :: PullRequestReviewEventAction -> String
showsPrec :: Int -> PullRequestReviewEventAction -> ShowS
$cshowsPrec :: Int -> PullRequestReviewEventAction -> ShowS
Show, forall x.
Rep PullRequestReviewEventAction x -> PullRequestReviewEventAction
forall x.
PullRequestReviewEventAction -> Rep PullRequestReviewEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PullRequestReviewEventAction x -> PullRequestReviewEventAction
$cfrom :: forall x.
PullRequestReviewEventAction -> Rep PullRequestReviewEventAction x
Generic, Typeable, Typeable PullRequestReviewEventAction
PullRequestReviewEventAction -> DataType
PullRequestReviewEventAction -> Constr
(forall b. Data b => b -> b)
-> PullRequestReviewEventAction -> PullRequestReviewEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int
-> (forall d. Data d => d -> u)
-> PullRequestReviewEventAction
-> u
forall u.
(forall d. Data d => d -> u) -> PullRequestReviewEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewEventAction
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewEventAction
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEventAction -> m PullRequestReviewEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEventAction -> m PullRequestReviewEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PullRequestReviewEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestReviewEventAction
-> c PullRequestReviewEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c PullRequestReviewEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestReviewEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEventAction -> m PullRequestReviewEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEventAction -> m PullRequestReviewEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEventAction -> m PullRequestReviewEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEventAction -> m PullRequestReviewEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEventAction -> m PullRequestReviewEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEventAction -> m PullRequestReviewEventAction
gmapQi :: forall u.
Int
-> (forall d. Data d => d -> u)
-> PullRequestReviewEventAction
-> u
$cgmapQi :: forall u.
Int
-> (forall d. Data d => d -> u)
-> PullRequestReviewEventAction
-> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> PullRequestReviewEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> PullRequestReviewEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewEventAction
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewEventAction
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewEventAction
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewEventAction
-> r
gmapT :: (forall b. Data b => b -> b)
-> PullRequestReviewEventAction -> PullRequestReviewEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> PullRequestReviewEventAction -> PullRequestReviewEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestReviewEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestReviewEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c PullRequestReviewEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c PullRequestReviewEventAction)
dataTypeOf :: PullRequestReviewEventAction -> DataType
$cdataTypeOf :: PullRequestReviewEventAction -> DataType
toConstr :: PullRequestReviewEventAction -> Constr
$ctoConstr :: PullRequestReviewEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PullRequestReviewEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PullRequestReviewEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestReviewEventAction
-> c PullRequestReviewEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestReviewEventAction
-> c PullRequestReviewEventAction
Data)

instance NFData PullRequestReviewEventAction where rnf :: PullRequestReviewEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON PullRequestReviewEventAction where
  parseJSON :: Value -> Parser PullRequestReviewEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Pull request review event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"submitted"     -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestReviewEventAction
PullRequestReviewSubmittedAction
        Text
"edited"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestReviewEventAction
PullRequestReviewEditedAction
        Text
"dismissed"     -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestReviewEventAction
PullRequestReviewDismissedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> PullRequestReviewEventAction
PullRequestReviewActionOther Text
t)

-- | Triggered when a pull request review is submitted into a non-pending state,

-- the body is edited, or the review is dismissed.

-- See <https://developer.github.com/v3/activity/events/types/#pullrequestreviewevent>.

data PullRequestReviewEvent = PullRequestReviewEvent
    { PullRequestReviewEvent -> PullRequestReviewEventAction
evPullReqReviewAction     :: !PullRequestReviewEventAction
    , PullRequestReviewEvent -> HookPullRequestReview
evPullReqReviewPayload    :: !HookPullRequestReview
    , PullRequestReviewEvent -> HookPullRequest
evPullReqReviewTarget     :: !HookPullRequest
    , PullRequestReviewEvent -> HookRepository
evPullReqReviewRepo       :: !HookRepository
    , PullRequestReviewEvent -> HookUser
evPullReqReviewSender     :: !HookUser
    }
    deriving (PullRequestReviewEvent -> PullRequestReviewEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PullRequestReviewEvent -> PullRequestReviewEvent -> Bool
$c/= :: PullRequestReviewEvent -> PullRequestReviewEvent -> Bool
== :: PullRequestReviewEvent -> PullRequestReviewEvent -> Bool
$c== :: PullRequestReviewEvent -> PullRequestReviewEvent -> Bool
Eq, Int -> PullRequestReviewEvent -> ShowS
[PullRequestReviewEvent] -> ShowS
PullRequestReviewEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PullRequestReviewEvent] -> ShowS
$cshowList :: [PullRequestReviewEvent] -> ShowS
show :: PullRequestReviewEvent -> String
$cshow :: PullRequestReviewEvent -> String
showsPrec :: Int -> PullRequestReviewEvent -> ShowS
$cshowsPrec :: Int -> PullRequestReviewEvent -> ShowS
Show, Typeable, Typeable PullRequestReviewEvent
PullRequestReviewEvent -> DataType
PullRequestReviewEvent -> Constr
(forall b. Data b => b -> b)
-> PullRequestReviewEvent -> PullRequestReviewEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> PullRequestReviewEvent -> u
forall u.
(forall d. Data d => d -> u) -> PullRequestReviewEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewEvent
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewEvent
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEvent -> m PullRequestReviewEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEvent -> m PullRequestReviewEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PullRequestReviewEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestReviewEvent
-> c PullRequestReviewEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PullRequestReviewEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestReviewEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEvent -> m PullRequestReviewEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEvent -> m PullRequestReviewEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEvent -> m PullRequestReviewEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEvent -> m PullRequestReviewEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEvent -> m PullRequestReviewEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewEvent -> m PullRequestReviewEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PullRequestReviewEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PullRequestReviewEvent -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> PullRequestReviewEvent -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> PullRequestReviewEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewEvent
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewEvent
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewEvent
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewEvent
-> r
gmapT :: (forall b. Data b => b -> b)
-> PullRequestReviewEvent -> PullRequestReviewEvent
$cgmapT :: (forall b. Data b => b -> b)
-> PullRequestReviewEvent -> PullRequestReviewEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestReviewEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestReviewEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PullRequestReviewEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PullRequestReviewEvent)
dataTypeOf :: PullRequestReviewEvent -> DataType
$cdataTypeOf :: PullRequestReviewEvent -> DataType
toConstr :: PullRequestReviewEvent -> Constr
$ctoConstr :: PullRequestReviewEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PullRequestReviewEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PullRequestReviewEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestReviewEvent
-> c PullRequestReviewEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestReviewEvent
-> c PullRequestReviewEvent
Data, forall x. Rep PullRequestReviewEvent x -> PullRequestReviewEvent
forall x. PullRequestReviewEvent -> Rep PullRequestReviewEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PullRequestReviewEvent x -> PullRequestReviewEvent
$cfrom :: forall x. PullRequestReviewEvent -> Rep PullRequestReviewEvent x
Generic)

instance EventHasSender PullRequestReviewEvent where senderOfEvent :: PullRequestReviewEvent -> HookUser
senderOfEvent = PullRequestReviewEvent -> HookUser
evPullReqReviewSender
instance EventHasRepo PullRequestReviewEvent where repoForEvent :: PullRequestReviewEvent -> HookRepository
repoForEvent = PullRequestReviewEvent -> HookRepository
evPullReqReviewRepo
instance NFData PullRequestReviewEvent where rnf :: PullRequestReviewEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data PullRequestReviewCommentEventAction
  -- | Decodes from "created"

  = PullRequestReviewCommentCreatedAction
  -- | Decodes from "edited"

  | PullRequestReviewCommentEditedAction
  -- | Decodes from "deleted"

  | PullRequestReviewCommentDeletedAction
  -- | The result of decoding an unknown pull request review comment event action type

  | PullRequestReviewCommentActionOther !Text
  deriving (PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Bool
$c/= :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Bool
== :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Bool
$c== :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Bool
Eq, Eq PullRequestReviewCommentEventAction
PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Bool
PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Ordering
PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction
$cmin :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction
max :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction
$cmax :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction
>= :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Bool
$c>= :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Bool
> :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Bool
$c> :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Bool
<= :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Bool
$c<= :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Bool
< :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Bool
$c< :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Bool
compare :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Ordering
$ccompare :: PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction -> Ordering
Ord, Int -> PullRequestReviewCommentEventAction -> ShowS
[PullRequestReviewCommentEventAction] -> ShowS
PullRequestReviewCommentEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PullRequestReviewCommentEventAction] -> ShowS
$cshowList :: [PullRequestReviewCommentEventAction] -> ShowS
show :: PullRequestReviewCommentEventAction -> String
$cshow :: PullRequestReviewCommentEventAction -> String
showsPrec :: Int -> PullRequestReviewCommentEventAction -> ShowS
$cshowsPrec :: Int -> PullRequestReviewCommentEventAction -> ShowS
Show, forall x.
Rep PullRequestReviewCommentEventAction x
-> PullRequestReviewCommentEventAction
forall x.
PullRequestReviewCommentEventAction
-> Rep PullRequestReviewCommentEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PullRequestReviewCommentEventAction x
-> PullRequestReviewCommentEventAction
$cfrom :: forall x.
PullRequestReviewCommentEventAction
-> Rep PullRequestReviewCommentEventAction x
Generic, Typeable, Typeable PullRequestReviewCommentEventAction
PullRequestReviewCommentEventAction -> DataType
PullRequestReviewCommentEventAction -> Constr
(forall b. Data b => b -> b)
-> PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int
-> (forall d. Data d => d -> u)
-> PullRequestReviewCommentEventAction
-> u
forall u.
(forall d. Data d => d -> u)
-> PullRequestReviewCommentEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewCommentEventAction
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewCommentEventAction
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEventAction
-> m PullRequestReviewCommentEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEventAction
-> m PullRequestReviewCommentEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c PullRequestReviewCommentEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestReviewCommentEventAction
-> c PullRequestReviewCommentEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c PullRequestReviewCommentEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestReviewCommentEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEventAction
-> m PullRequestReviewCommentEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEventAction
-> m PullRequestReviewCommentEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEventAction
-> m PullRequestReviewCommentEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEventAction
-> m PullRequestReviewCommentEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEventAction
-> m PullRequestReviewCommentEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEventAction
-> m PullRequestReviewCommentEventAction
gmapQi :: forall u.
Int
-> (forall d. Data d => d -> u)
-> PullRequestReviewCommentEventAction
-> u
$cgmapQi :: forall u.
Int
-> (forall d. Data d => d -> u)
-> PullRequestReviewCommentEventAction
-> u
gmapQ :: forall u.
(forall d. Data d => d -> u)
-> PullRequestReviewCommentEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u)
-> PullRequestReviewCommentEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewCommentEventAction
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewCommentEventAction
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewCommentEventAction
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewCommentEventAction
-> r
gmapT :: (forall b. Data b => b -> b)
-> PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> PullRequestReviewCommentEventAction
-> PullRequestReviewCommentEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestReviewCommentEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestReviewCommentEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c PullRequestReviewCommentEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c PullRequestReviewCommentEventAction)
dataTypeOf :: PullRequestReviewCommentEventAction -> DataType
$cdataTypeOf :: PullRequestReviewCommentEventAction -> DataType
toConstr :: PullRequestReviewCommentEventAction -> Constr
$ctoConstr :: PullRequestReviewCommentEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c PullRequestReviewCommentEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c PullRequestReviewCommentEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestReviewCommentEventAction
-> c PullRequestReviewCommentEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestReviewCommentEventAction
-> c PullRequestReviewCommentEventAction
Data)

instance NFData PullRequestReviewCommentEventAction where rnf :: PullRequestReviewCommentEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON PullRequestReviewCommentEventAction where
  parseJSON :: Value -> Parser PullRequestReviewCommentEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Pull request review comment event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"created"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestReviewCommentEventAction
PullRequestReviewCommentCreatedAction
        Text
"edited"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestReviewCommentEventAction
PullRequestReviewCommentEditedAction
        Text
"deleted"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure PullRequestReviewCommentEventAction
PullRequestReviewCommentDeletedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> PullRequestReviewCommentEventAction
PullRequestReviewCommentActionOther Text
t)

-- | Triggered when a comment on a pull request's unified diff is created,

-- edited, or deleted (in the Files Changed tab).

-- See <https://developer.github.com/v3/activity/events/types/#pullrequestreviewcommentevent>.

data PullRequestReviewCommentEvent = PullRequestReviewCommentEvent
    { PullRequestReviewCommentEvent
-> PullRequestReviewCommentEventAction
evPullReqRevComAction     :: !PullRequestReviewCommentEventAction
    , PullRequestReviewCommentEvent -> HookPullRequestReviewComment
evPullReqRevComment       :: !HookPullRequestReviewComment
    , PullRequestReviewCommentEvent -> HookPullRequest
evPullReqRevTarget        :: !HookPullRequest
    , PullRequestReviewCommentEvent -> HookRepository
evPullReqRevRepo          :: !HookRepository
    , PullRequestReviewCommentEvent -> HookUser
evPullReqRevSender        :: !HookUser
    }
    deriving (PullRequestReviewCommentEvent
-> PullRequestReviewCommentEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PullRequestReviewCommentEvent
-> PullRequestReviewCommentEvent -> Bool
$c/= :: PullRequestReviewCommentEvent
-> PullRequestReviewCommentEvent -> Bool
== :: PullRequestReviewCommentEvent
-> PullRequestReviewCommentEvent -> Bool
$c== :: PullRequestReviewCommentEvent
-> PullRequestReviewCommentEvent -> Bool
Eq, Int -> PullRequestReviewCommentEvent -> ShowS
[PullRequestReviewCommentEvent] -> ShowS
PullRequestReviewCommentEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PullRequestReviewCommentEvent] -> ShowS
$cshowList :: [PullRequestReviewCommentEvent] -> ShowS
show :: PullRequestReviewCommentEvent -> String
$cshow :: PullRequestReviewCommentEvent -> String
showsPrec :: Int -> PullRequestReviewCommentEvent -> ShowS
$cshowsPrec :: Int -> PullRequestReviewCommentEvent -> ShowS
Show, Typeable, Typeable PullRequestReviewCommentEvent
PullRequestReviewCommentEvent -> DataType
PullRequestReviewCommentEvent -> Constr
(forall b. Data b => b -> b)
-> PullRequestReviewCommentEvent -> PullRequestReviewCommentEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int
-> (forall d. Data d => d -> u)
-> PullRequestReviewCommentEvent
-> u
forall u.
(forall d. Data d => d -> u)
-> PullRequestReviewCommentEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewCommentEvent
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewCommentEvent
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEvent -> m PullRequestReviewCommentEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEvent -> m PullRequestReviewCommentEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c PullRequestReviewCommentEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestReviewCommentEvent
-> c PullRequestReviewCommentEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c PullRequestReviewCommentEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestReviewCommentEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEvent -> m PullRequestReviewCommentEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEvent -> m PullRequestReviewCommentEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEvent -> m PullRequestReviewCommentEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEvent -> m PullRequestReviewCommentEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEvent -> m PullRequestReviewCommentEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PullRequestReviewCommentEvent -> m PullRequestReviewCommentEvent
gmapQi :: forall u.
Int
-> (forall d. Data d => d -> u)
-> PullRequestReviewCommentEvent
-> u
$cgmapQi :: forall u.
Int
-> (forall d. Data d => d -> u)
-> PullRequestReviewCommentEvent
-> u
gmapQ :: forall u.
(forall d. Data d => d -> u)
-> PullRequestReviewCommentEvent -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u)
-> PullRequestReviewCommentEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewCommentEvent
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewCommentEvent
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewCommentEvent
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PullRequestReviewCommentEvent
-> r
gmapT :: (forall b. Data b => b -> b)
-> PullRequestReviewCommentEvent -> PullRequestReviewCommentEvent
$cgmapT :: (forall b. Data b => b -> b)
-> PullRequestReviewCommentEvent -> PullRequestReviewCommentEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestReviewCommentEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PullRequestReviewCommentEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c PullRequestReviewCommentEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c PullRequestReviewCommentEvent)
dataTypeOf :: PullRequestReviewCommentEvent -> DataType
$cdataTypeOf :: PullRequestReviewCommentEvent -> DataType
toConstr :: PullRequestReviewCommentEvent -> Constr
$ctoConstr :: PullRequestReviewCommentEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c PullRequestReviewCommentEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c PullRequestReviewCommentEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestReviewCommentEvent
-> c PullRequestReviewCommentEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PullRequestReviewCommentEvent
-> c PullRequestReviewCommentEvent
Data, forall x.
Rep PullRequestReviewCommentEvent x
-> PullRequestReviewCommentEvent
forall x.
PullRequestReviewCommentEvent
-> Rep PullRequestReviewCommentEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PullRequestReviewCommentEvent x
-> PullRequestReviewCommentEvent
$cfrom :: forall x.
PullRequestReviewCommentEvent
-> Rep PullRequestReviewCommentEvent x
Generic)

instance EventHasSender PullRequestReviewCommentEvent where senderOfEvent :: PullRequestReviewCommentEvent -> HookUser
senderOfEvent = PullRequestReviewCommentEvent -> HookUser
evPullReqRevSender
instance EventHasRepo PullRequestReviewCommentEvent where repoForEvent :: PullRequestReviewCommentEvent -> HookRepository
repoForEvent = PullRequestReviewCommentEvent -> HookRepository
evPullReqRevRepo
instance NFData PullRequestReviewCommentEvent where rnf :: PullRequestReviewCommentEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


-- | Triggered on a push to a repository branch. Branch pushes and repository tag

-- pushes also trigger webhook push events.

-- See <https://developer.github.com/v3/activity/events/types/#pushevent>.

data PushEvent = PushEvent
    { PushEvent -> Text
evPushRef                 :: !Text
    , PushEvent -> Maybe Text
evPushHeadSha             :: !(Maybe Text)
    , PushEvent -> Maybe Text
evPushBeforeSha           :: !(Maybe Text)
    , PushEvent -> Bool
evPushCreated             :: !Bool
    , PushEvent -> Bool
evPushDeleted             :: !Bool
    , PushEvent -> Bool
evPushForced              :: !Bool
    , PushEvent -> Maybe Text
evPushBaseRef             :: !(Maybe Text)
    , PushEvent -> URL
evPushCompareUrl          :: !URL
    , PushEvent -> Maybe (Vector HookCommit)
evPushCommits             :: !(Maybe (Vector HookCommit))
    , PushEvent -> Maybe HookCommit
evPushHeadCommit          :: !(Maybe HookCommit)
    , PushEvent -> HookRepository
evPushRepository          :: !HookRepository
    , PushEvent -> Maybe HookOrganization
evPushOrganization        :: !(Maybe HookOrganization)
      -- | In very rare cases, the sender may be missing.

    , PushEvent -> Maybe HookUser
evPushSender              :: !(Maybe HookUser)
    }
    deriving (PushEvent -> PushEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PushEvent -> PushEvent -> Bool
$c/= :: PushEvent -> PushEvent -> Bool
== :: PushEvent -> PushEvent -> Bool
$c== :: PushEvent -> PushEvent -> Bool
Eq, Int -> PushEvent -> ShowS
[PushEvent] -> ShowS
PushEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PushEvent] -> ShowS
$cshowList :: [PushEvent] -> ShowS
show :: PushEvent -> String
$cshow :: PushEvent -> String
showsPrec :: Int -> PushEvent -> ShowS
$cshowsPrec :: Int -> PushEvent -> ShowS
Show, Typeable, Typeable PushEvent
PushEvent -> DataType
PushEvent -> Constr
(forall b. Data b => b -> b) -> PushEvent -> PushEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> PushEvent -> u
forall u. (forall d. Data d => d -> u) -> PushEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PushEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PushEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PushEvent -> m PushEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PushEvent -> m PushEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PushEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PushEvent -> c PushEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PushEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PushEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PushEvent -> m PushEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PushEvent -> m PushEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PushEvent -> m PushEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PushEvent -> m PushEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PushEvent -> m PushEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PushEvent -> m PushEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> PushEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> PushEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> PushEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> PushEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PushEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PushEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PushEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PushEvent -> r
gmapT :: (forall b. Data b => b -> b) -> PushEvent -> PushEvent
$cgmapT :: (forall b. Data b => b -> b) -> PushEvent -> PushEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PushEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PushEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PushEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PushEvent)
dataTypeOf :: PushEvent -> DataType
$cdataTypeOf :: PushEvent -> DataType
toConstr :: PushEvent -> Constr
$ctoConstr :: PushEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PushEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PushEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PushEvent -> c PushEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PushEvent -> c PushEvent
Data, forall x. Rep PushEvent x -> PushEvent
forall x. PushEvent -> Rep PushEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PushEvent x -> PushEvent
$cfrom :: forall x. PushEvent -> Rep PushEvent x
Generic)

instance EventHasMaybeSender PushEvent where maybeSenderOfEvent :: PushEvent -> Maybe HookUser
maybeSenderOfEvent = PushEvent -> Maybe HookUser
evPushSender
instance EventHasRepo PushEvent where repoForEvent :: PushEvent -> HookRepository
repoForEvent = PushEvent -> HookRepository
evPushRepository
instance NFData PushEvent where rnf :: PushEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data ReleaseEventAction
  -- | Decodes from "published"

  = ReleasePublishedAction
  -- | The result of decoding an unknown release event action type

  | ReleaseActionOther !Text
  deriving (ReleaseEventAction -> ReleaseEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReleaseEventAction -> ReleaseEventAction -> Bool
$c/= :: ReleaseEventAction -> ReleaseEventAction -> Bool
== :: ReleaseEventAction -> ReleaseEventAction -> Bool
$c== :: ReleaseEventAction -> ReleaseEventAction -> Bool
Eq, Eq ReleaseEventAction
ReleaseEventAction -> ReleaseEventAction -> Bool
ReleaseEventAction -> ReleaseEventAction -> Ordering
ReleaseEventAction -> ReleaseEventAction -> ReleaseEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ReleaseEventAction -> ReleaseEventAction -> ReleaseEventAction
$cmin :: ReleaseEventAction -> ReleaseEventAction -> ReleaseEventAction
max :: ReleaseEventAction -> ReleaseEventAction -> ReleaseEventAction
$cmax :: ReleaseEventAction -> ReleaseEventAction -> ReleaseEventAction
>= :: ReleaseEventAction -> ReleaseEventAction -> Bool
$c>= :: ReleaseEventAction -> ReleaseEventAction -> Bool
> :: ReleaseEventAction -> ReleaseEventAction -> Bool
$c> :: ReleaseEventAction -> ReleaseEventAction -> Bool
<= :: ReleaseEventAction -> ReleaseEventAction -> Bool
$c<= :: ReleaseEventAction -> ReleaseEventAction -> Bool
< :: ReleaseEventAction -> ReleaseEventAction -> Bool
$c< :: ReleaseEventAction -> ReleaseEventAction -> Bool
compare :: ReleaseEventAction -> ReleaseEventAction -> Ordering
$ccompare :: ReleaseEventAction -> ReleaseEventAction -> Ordering
Ord, Int -> ReleaseEventAction -> ShowS
[ReleaseEventAction] -> ShowS
ReleaseEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReleaseEventAction] -> ShowS
$cshowList :: [ReleaseEventAction] -> ShowS
show :: ReleaseEventAction -> String
$cshow :: ReleaseEventAction -> String
showsPrec :: Int -> ReleaseEventAction -> ShowS
$cshowsPrec :: Int -> ReleaseEventAction -> ShowS
Show, forall x. Rep ReleaseEventAction x -> ReleaseEventAction
forall x. ReleaseEventAction -> Rep ReleaseEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReleaseEventAction x -> ReleaseEventAction
$cfrom :: forall x. ReleaseEventAction -> Rep ReleaseEventAction x
Generic, Typeable, Typeable ReleaseEventAction
ReleaseEventAction -> DataType
ReleaseEventAction -> Constr
(forall b. Data b => b -> b)
-> ReleaseEventAction -> ReleaseEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> ReleaseEventAction -> u
forall u. (forall d. Data d => d -> u) -> ReleaseEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ReleaseEventAction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ReleaseEventAction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ReleaseEventAction -> m ReleaseEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ReleaseEventAction -> m ReleaseEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ReleaseEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ReleaseEventAction
-> c ReleaseEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ReleaseEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ReleaseEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ReleaseEventAction -> m ReleaseEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ReleaseEventAction -> m ReleaseEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ReleaseEventAction -> m ReleaseEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ReleaseEventAction -> m ReleaseEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ReleaseEventAction -> m ReleaseEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ReleaseEventAction -> m ReleaseEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ReleaseEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ReleaseEventAction -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> ReleaseEventAction -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ReleaseEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ReleaseEventAction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ReleaseEventAction -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ReleaseEventAction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ReleaseEventAction -> r
gmapT :: (forall b. Data b => b -> b)
-> ReleaseEventAction -> ReleaseEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> ReleaseEventAction -> ReleaseEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ReleaseEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ReleaseEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ReleaseEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ReleaseEventAction)
dataTypeOf :: ReleaseEventAction -> DataType
$cdataTypeOf :: ReleaseEventAction -> DataType
toConstr :: ReleaseEventAction -> Constr
$ctoConstr :: ReleaseEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ReleaseEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ReleaseEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ReleaseEventAction
-> c ReleaseEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ReleaseEventAction
-> c ReleaseEventAction
Data)

instance NFData ReleaseEventAction where rnf :: ReleaseEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON ReleaseEventAction where
  parseJSON :: Value -> Parser ReleaseEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Release event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"published"     -> forall (f :: * -> *) a. Applicative f => a -> f a
pure ReleaseEventAction
ReleasePublishedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> ReleaseEventAction
ReleaseActionOther Text
t)

-- | Triggered when a release is published.

-- See <https://developer.github.com/v3/activity/events/types/#releaseevent>.

data ReleaseEvent = ReleaseEvent
    { ReleaseEvent -> ReleaseEventAction
evReleaseEventAction      :: !ReleaseEventAction      -- ^ Currently only releasePublished.

    , ReleaseEvent -> HookRelease
evReleaseEventPayload     :: !HookRelease
    , ReleaseEvent -> HookRepository
evReleaseEventRepo        :: !HookRepository
    , ReleaseEvent -> HookUser
evReleaseEventSender      :: !HookUser
    }
    deriving (ReleaseEvent -> ReleaseEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReleaseEvent -> ReleaseEvent -> Bool
$c/= :: ReleaseEvent -> ReleaseEvent -> Bool
== :: ReleaseEvent -> ReleaseEvent -> Bool
$c== :: ReleaseEvent -> ReleaseEvent -> Bool
Eq, Int -> ReleaseEvent -> ShowS
[ReleaseEvent] -> ShowS
ReleaseEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReleaseEvent] -> ShowS
$cshowList :: [ReleaseEvent] -> ShowS
show :: ReleaseEvent -> String
$cshow :: ReleaseEvent -> String
showsPrec :: Int -> ReleaseEvent -> ShowS
$cshowsPrec :: Int -> ReleaseEvent -> ShowS
Show, Typeable, Typeable ReleaseEvent
ReleaseEvent -> DataType
ReleaseEvent -> Constr
(forall b. Data b => b -> b) -> ReleaseEvent -> ReleaseEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ReleaseEvent -> u
forall u. (forall d. Data d => d -> u) -> ReleaseEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ReleaseEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ReleaseEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ReleaseEvent -> m ReleaseEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ReleaseEvent -> m ReleaseEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ReleaseEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ReleaseEvent -> c ReleaseEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ReleaseEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ReleaseEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ReleaseEvent -> m ReleaseEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ReleaseEvent -> m ReleaseEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ReleaseEvent -> m ReleaseEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ReleaseEvent -> m ReleaseEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ReleaseEvent -> m ReleaseEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ReleaseEvent -> m ReleaseEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ReleaseEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ReleaseEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> ReleaseEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ReleaseEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ReleaseEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ReleaseEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ReleaseEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ReleaseEvent -> r
gmapT :: (forall b. Data b => b -> b) -> ReleaseEvent -> ReleaseEvent
$cgmapT :: (forall b. Data b => b -> b) -> ReleaseEvent -> ReleaseEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ReleaseEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ReleaseEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ReleaseEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ReleaseEvent)
dataTypeOf :: ReleaseEvent -> DataType
$cdataTypeOf :: ReleaseEvent -> DataType
toConstr :: ReleaseEvent -> Constr
$ctoConstr :: ReleaseEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ReleaseEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ReleaseEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ReleaseEvent -> c ReleaseEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ReleaseEvent -> c ReleaseEvent
Data, forall x. Rep ReleaseEvent x -> ReleaseEvent
forall x. ReleaseEvent -> Rep ReleaseEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReleaseEvent x -> ReleaseEvent
$cfrom :: forall x. ReleaseEvent -> Rep ReleaseEvent x
Generic)

instance EventHasSender ReleaseEvent where senderOfEvent :: ReleaseEvent -> HookUser
senderOfEvent = ReleaseEvent -> HookUser
evReleaseEventSender
instance EventHasRepo ReleaseEvent where repoForEvent :: ReleaseEvent -> HookRepository
repoForEvent = ReleaseEvent -> HookRepository
evReleaseEventRepo
instance NFData ReleaseEvent where rnf :: ReleaseEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data RepositoryEventAction
  -- | Decodes from "created"

  = RepositoryCreatedAction
  -- | Decodes from "deleted"

  | RepositoryDeletedAction
  -- | Decodes from "archived"

  | RepositoryArchivedAction
  -- | Decodes from "unarchived"

  | RepositoryUnarchivedAction
  -- | Decodes from "publicized"

  | RepositoryPublicizedAction
  -- | Decodes from "privatized"

  | RepositoryPrivatizedAction
  -- | The result of decoding an unknown repository event action type

  | RepositoryActionOther !Text
  deriving (RepositoryEventAction -> RepositoryEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RepositoryEventAction -> RepositoryEventAction -> Bool
$c/= :: RepositoryEventAction -> RepositoryEventAction -> Bool
== :: RepositoryEventAction -> RepositoryEventAction -> Bool
$c== :: RepositoryEventAction -> RepositoryEventAction -> Bool
Eq, Eq RepositoryEventAction
RepositoryEventAction -> RepositoryEventAction -> Bool
RepositoryEventAction -> RepositoryEventAction -> Ordering
RepositoryEventAction
-> RepositoryEventAction -> RepositoryEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: RepositoryEventAction
-> RepositoryEventAction -> RepositoryEventAction
$cmin :: RepositoryEventAction
-> RepositoryEventAction -> RepositoryEventAction
max :: RepositoryEventAction
-> RepositoryEventAction -> RepositoryEventAction
$cmax :: RepositoryEventAction
-> RepositoryEventAction -> RepositoryEventAction
>= :: RepositoryEventAction -> RepositoryEventAction -> Bool
$c>= :: RepositoryEventAction -> RepositoryEventAction -> Bool
> :: RepositoryEventAction -> RepositoryEventAction -> Bool
$c> :: RepositoryEventAction -> RepositoryEventAction -> Bool
<= :: RepositoryEventAction -> RepositoryEventAction -> Bool
$c<= :: RepositoryEventAction -> RepositoryEventAction -> Bool
< :: RepositoryEventAction -> RepositoryEventAction -> Bool
$c< :: RepositoryEventAction -> RepositoryEventAction -> Bool
compare :: RepositoryEventAction -> RepositoryEventAction -> Ordering
$ccompare :: RepositoryEventAction -> RepositoryEventAction -> Ordering
Ord, Int -> RepositoryEventAction -> ShowS
[RepositoryEventAction] -> ShowS
RepositoryEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RepositoryEventAction] -> ShowS
$cshowList :: [RepositoryEventAction] -> ShowS
show :: RepositoryEventAction -> String
$cshow :: RepositoryEventAction -> String
showsPrec :: Int -> RepositoryEventAction -> ShowS
$cshowsPrec :: Int -> RepositoryEventAction -> ShowS
Show, forall x. Rep RepositoryEventAction x -> RepositoryEventAction
forall x. RepositoryEventAction -> Rep RepositoryEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RepositoryEventAction x -> RepositoryEventAction
$cfrom :: forall x. RepositoryEventAction -> Rep RepositoryEventAction x
Generic, Typeable, Typeable RepositoryEventAction
RepositoryEventAction -> DataType
RepositoryEventAction -> Constr
(forall b. Data b => b -> b)
-> RepositoryEventAction -> RepositoryEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> RepositoryEventAction -> u
forall u.
(forall d. Data d => d -> u) -> RepositoryEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RepositoryEventAction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RepositoryEventAction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RepositoryEventAction -> m RepositoryEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RepositoryEventAction -> m RepositoryEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RepositoryEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> RepositoryEventAction
-> c RepositoryEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RepositoryEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RepositoryEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RepositoryEventAction -> m RepositoryEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RepositoryEventAction -> m RepositoryEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RepositoryEventAction -> m RepositoryEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RepositoryEventAction -> m RepositoryEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RepositoryEventAction -> m RepositoryEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RepositoryEventAction -> m RepositoryEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RepositoryEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RepositoryEventAction -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> RepositoryEventAction -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> RepositoryEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RepositoryEventAction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RepositoryEventAction -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RepositoryEventAction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RepositoryEventAction -> r
gmapT :: (forall b. Data b => b -> b)
-> RepositoryEventAction -> RepositoryEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> RepositoryEventAction -> RepositoryEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RepositoryEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RepositoryEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RepositoryEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RepositoryEventAction)
dataTypeOf :: RepositoryEventAction -> DataType
$cdataTypeOf :: RepositoryEventAction -> DataType
toConstr :: RepositoryEventAction -> Constr
$ctoConstr :: RepositoryEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RepositoryEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RepositoryEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> RepositoryEventAction
-> c RepositoryEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> RepositoryEventAction
-> c RepositoryEventAction
Data)

instance NFData RepositoryEventAction where rnf :: RepositoryEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON RepositoryEventAction where
  parseJSON :: Value -> Parser RepositoryEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Repository event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"created"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure RepositoryEventAction
RepositoryCreatedAction
        Text
"deleted"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure RepositoryEventAction
RepositoryDeletedAction
        Text
"archived"      -> forall (f :: * -> *) a. Applicative f => a -> f a
pure RepositoryEventAction
RepositoryArchivedAction
        Text
"unarchived"    -> forall (f :: * -> *) a. Applicative f => a -> f a
pure RepositoryEventAction
RepositoryUnarchivedAction
        Text
"publicized"    -> forall (f :: * -> *) a. Applicative f => a -> f a
pure RepositoryEventAction
RepositoryPublicizedAction
        Text
"privatized"    -> forall (f :: * -> *) a. Applicative f => a -> f a
pure RepositoryEventAction
RepositoryPrivatizedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> RepositoryEventAction
RepositoryActionOther Text
t)

-- | Triggered when a repository is created, archived, unarchived, made public, or made private.

-- Organization hooks are also triggered when a repository is deleted.

-- Events of this type are not visible in timelines. These events are only used to trigger hooks.

-- See <https://developer.github.com/v3/activity/events/types/#repositoryevent>.

data RepositoryEvent = RepositoryEvent
    { RepositoryEvent -> RepositoryEventAction
evRepositoryAction        :: !RepositoryEventAction
    , RepositoryEvent -> HookRepository
evRepositoryTarget        :: !HookRepository
    , RepositoryEvent -> Maybe HookOrganization
evRepositoryOrg           :: !(Maybe HookOrganization)
    , RepositoryEvent -> HookUser
evRepositorySender        :: !HookUser
    }
    deriving (RepositoryEvent -> RepositoryEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RepositoryEvent -> RepositoryEvent -> Bool
$c/= :: RepositoryEvent -> RepositoryEvent -> Bool
== :: RepositoryEvent -> RepositoryEvent -> Bool
$c== :: RepositoryEvent -> RepositoryEvent -> Bool
Eq, Int -> RepositoryEvent -> ShowS
[RepositoryEvent] -> ShowS
RepositoryEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RepositoryEvent] -> ShowS
$cshowList :: [RepositoryEvent] -> ShowS
show :: RepositoryEvent -> String
$cshow :: RepositoryEvent -> String
showsPrec :: Int -> RepositoryEvent -> ShowS
$cshowsPrec :: Int -> RepositoryEvent -> ShowS
Show, Typeable, Typeable RepositoryEvent
RepositoryEvent -> DataType
RepositoryEvent -> Constr
(forall b. Data b => b -> b) -> RepositoryEvent -> RepositoryEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> RepositoryEvent -> u
forall u. (forall d. Data d => d -> u) -> RepositoryEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RepositoryEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RepositoryEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RepositoryEvent -> m RepositoryEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RepositoryEvent -> m RepositoryEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RepositoryEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RepositoryEvent -> c RepositoryEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RepositoryEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RepositoryEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RepositoryEvent -> m RepositoryEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RepositoryEvent -> m RepositoryEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RepositoryEvent -> m RepositoryEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RepositoryEvent -> m RepositoryEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RepositoryEvent -> m RepositoryEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RepositoryEvent -> m RepositoryEvent
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RepositoryEvent -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RepositoryEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> RepositoryEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> RepositoryEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RepositoryEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RepositoryEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RepositoryEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RepositoryEvent -> r
gmapT :: (forall b. Data b => b -> b) -> RepositoryEvent -> RepositoryEvent
$cgmapT :: (forall b. Data b => b -> b) -> RepositoryEvent -> RepositoryEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RepositoryEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RepositoryEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RepositoryEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RepositoryEvent)
dataTypeOf :: RepositoryEvent -> DataType
$cdataTypeOf :: RepositoryEvent -> DataType
toConstr :: RepositoryEvent -> Constr
$ctoConstr :: RepositoryEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RepositoryEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RepositoryEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RepositoryEvent -> c RepositoryEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RepositoryEvent -> c RepositoryEvent
Data, forall x. Rep RepositoryEvent x -> RepositoryEvent
forall x. RepositoryEvent -> Rep RepositoryEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RepositoryEvent x -> RepositoryEvent
$cfrom :: forall x. RepositoryEvent -> Rep RepositoryEvent x
Generic)

instance EventHasSender RepositoryEvent where senderOfEvent :: RepositoryEvent -> HookUser
senderOfEvent = RepositoryEvent -> HookUser
evRepositorySender
instance EventHasRepo RepositoryEvent where repoForEvent :: RepositoryEvent -> HookRepository
repoForEvent = RepositoryEvent -> HookRepository
evRepositoryTarget
instance NFData RepositoryEvent where rnf :: RepositoryEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data StatusEventState
  -- | Decodes from "pending"

  = StatusPendingState
  -- | Decodes from "success"

  | StatusSuccessState
  -- | Decodes from "failure"

  | StatusFailureState
  -- | Decodes from "error"

  | StatusErrorState
  -- | The result of decoding an unknown status event state

  | StatusStateOther !Text
  deriving (StatusEventState -> StatusEventState -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StatusEventState -> StatusEventState -> Bool
$c/= :: StatusEventState -> StatusEventState -> Bool
== :: StatusEventState -> StatusEventState -> Bool
$c== :: StatusEventState -> StatusEventState -> Bool
Eq, Eq StatusEventState
StatusEventState -> StatusEventState -> Bool
StatusEventState -> StatusEventState -> Ordering
StatusEventState -> StatusEventState -> StatusEventState
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: StatusEventState -> StatusEventState -> StatusEventState
$cmin :: StatusEventState -> StatusEventState -> StatusEventState
max :: StatusEventState -> StatusEventState -> StatusEventState
$cmax :: StatusEventState -> StatusEventState -> StatusEventState
>= :: StatusEventState -> StatusEventState -> Bool
$c>= :: StatusEventState -> StatusEventState -> Bool
> :: StatusEventState -> StatusEventState -> Bool
$c> :: StatusEventState -> StatusEventState -> Bool
<= :: StatusEventState -> StatusEventState -> Bool
$c<= :: StatusEventState -> StatusEventState -> Bool
< :: StatusEventState -> StatusEventState -> Bool
$c< :: StatusEventState -> StatusEventState -> Bool
compare :: StatusEventState -> StatusEventState -> Ordering
$ccompare :: StatusEventState -> StatusEventState -> Ordering
Ord, Int -> StatusEventState -> ShowS
[StatusEventState] -> ShowS
StatusEventState -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StatusEventState] -> ShowS
$cshowList :: [StatusEventState] -> ShowS
show :: StatusEventState -> String
$cshow :: StatusEventState -> String
showsPrec :: Int -> StatusEventState -> ShowS
$cshowsPrec :: Int -> StatusEventState -> ShowS
Show, forall x. Rep StatusEventState x -> StatusEventState
forall x. StatusEventState -> Rep StatusEventState x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StatusEventState x -> StatusEventState
$cfrom :: forall x. StatusEventState -> Rep StatusEventState x
Generic, Typeable, Typeable StatusEventState
StatusEventState -> DataType
StatusEventState -> Constr
(forall b. Data b => b -> b)
-> StatusEventState -> StatusEventState
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> StatusEventState -> u
forall u. (forall d. Data d => d -> u) -> StatusEventState -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StatusEventState -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StatusEventState -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> StatusEventState -> m StatusEventState
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> StatusEventState -> m StatusEventState
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StatusEventState
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StatusEventState -> c StatusEventState
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StatusEventState)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c StatusEventState)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> StatusEventState -> m StatusEventState
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> StatusEventState -> m StatusEventState
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> StatusEventState -> m StatusEventState
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> StatusEventState -> m StatusEventState
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> StatusEventState -> m StatusEventState
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> StatusEventState -> m StatusEventState
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> StatusEventState -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> StatusEventState -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> StatusEventState -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> StatusEventState -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StatusEventState -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StatusEventState -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StatusEventState -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StatusEventState -> r
gmapT :: (forall b. Data b => b -> b)
-> StatusEventState -> StatusEventState
$cgmapT :: (forall b. Data b => b -> b)
-> StatusEventState -> StatusEventState
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c StatusEventState)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c StatusEventState)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StatusEventState)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StatusEventState)
dataTypeOf :: StatusEventState -> DataType
$cdataTypeOf :: StatusEventState -> DataType
toConstr :: StatusEventState -> Constr
$ctoConstr :: StatusEventState -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StatusEventState
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StatusEventState
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StatusEventState -> c StatusEventState
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StatusEventState -> c StatusEventState
Data)

instance NFData StatusEventState where rnf :: StatusEventState -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON StatusEventState where
  parseJSON :: Value -> Parser StatusEventState
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Status event state" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"pending"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure StatusEventState
StatusPendingState
        Text
"success"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure StatusEventState
StatusSuccessState
        Text
"failure"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure StatusEventState
StatusFailureState
        Text
"error"         -> forall (f :: * -> *) a. Applicative f => a -> f a
pure StatusEventState
StatusErrorState
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> StatusEventState
StatusStateOther Text
t)

-- | Triggered when the status of a Git commit changes.

-- Events of this type are not visible in timelines. These events are only used to trigger hooks.

-- See <https://developer.github.com/v3/activity/events/types/#statusevent>.

data StatusEvent = StatusEvent
    { StatusEvent -> Int
evStatusId                :: !Int
    , StatusEvent -> Text
evStatusCommitSha         :: !Text
    , StatusEvent -> Text
evStatusCommitName        :: !Text
    , StatusEvent -> Maybe URL
evStatusTargetUrl         :: !(Maybe URL)
    , StatusEvent -> Text
evStatusContext           :: !Text
    , StatusEvent -> Maybe Text
evStatusDescription       :: !(Maybe Text)
    , StatusEvent -> StatusEventState
evStatusState             :: !StatusEventState
    , StatusEvent -> HookCommit
evStatusCommit            :: !HookCommit
    -- FIXME: Branches are missing here

    , StatusEvent -> UTCTime
evStatusCreatedAt         :: !UTCTime
    , StatusEvent -> UTCTime
evStatusUpdatedAt         :: !UTCTime
    , StatusEvent -> HookRepository
evStatusRepo              :: !HookRepository
    , StatusEvent -> HookUser
evStatusSender            :: !HookUser
    }
    deriving (StatusEvent -> StatusEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StatusEvent -> StatusEvent -> Bool
$c/= :: StatusEvent -> StatusEvent -> Bool
== :: StatusEvent -> StatusEvent -> Bool
$c== :: StatusEvent -> StatusEvent -> Bool
Eq, Int -> StatusEvent -> ShowS
[StatusEvent] -> ShowS
StatusEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StatusEvent] -> ShowS
$cshowList :: [StatusEvent] -> ShowS
show :: StatusEvent -> String
$cshow :: StatusEvent -> String
showsPrec :: Int -> StatusEvent -> ShowS
$cshowsPrec :: Int -> StatusEvent -> ShowS
Show, Typeable, Typeable StatusEvent
StatusEvent -> DataType
StatusEvent -> Constr
(forall b. Data b => b -> b) -> StatusEvent -> StatusEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> StatusEvent -> u
forall u. (forall d. Data d => d -> u) -> StatusEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StatusEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StatusEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> StatusEvent -> m StatusEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StatusEvent -> m StatusEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StatusEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StatusEvent -> c StatusEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StatusEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c StatusEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StatusEvent -> m StatusEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StatusEvent -> m StatusEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StatusEvent -> m StatusEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> StatusEvent -> m StatusEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> StatusEvent -> m StatusEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> StatusEvent -> m StatusEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> StatusEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> StatusEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> StatusEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> StatusEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StatusEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> StatusEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StatusEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> StatusEvent -> r
gmapT :: (forall b. Data b => b -> b) -> StatusEvent -> StatusEvent
$cgmapT :: (forall b. Data b => b -> b) -> StatusEvent -> StatusEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c StatusEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c StatusEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StatusEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c StatusEvent)
dataTypeOf :: StatusEvent -> DataType
$cdataTypeOf :: StatusEvent -> DataType
toConstr :: StatusEvent -> Constr
$ctoConstr :: StatusEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StatusEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c StatusEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StatusEvent -> c StatusEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> StatusEvent -> c StatusEvent
Data, forall x. Rep StatusEvent x -> StatusEvent
forall x. StatusEvent -> Rep StatusEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StatusEvent x -> StatusEvent
$cfrom :: forall x. StatusEvent -> Rep StatusEvent x
Generic)

instance EventHasSender StatusEvent where senderOfEvent :: StatusEvent -> HookUser
senderOfEvent = StatusEvent -> HookUser
evStatusSender
instance EventHasRepo StatusEvent where repoForEvent :: StatusEvent -> HookRepository
repoForEvent = StatusEvent -> HookRepository
evStatusRepo
instance NFData StatusEvent where rnf :: StatusEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data TeamEventAction
  -- | Decodes from "created"

  = TeamCreatedAction
  -- | Decodes from "deleted"

  | TeamDeletedAction
  -- | Decodes from "edited"

  | TeamEditedAction
  -- | Decodes from "added_to_repository"

  | TeamAddedToRepoAction
  -- | Decodes from "removed_from_repository"

  | TeamRemovedFromRepoAction
  -- | The result of decoding an unknown team event action type

  | TeamActionOther !Text
  deriving (TeamEventAction -> TeamEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TeamEventAction -> TeamEventAction -> Bool
$c/= :: TeamEventAction -> TeamEventAction -> Bool
== :: TeamEventAction -> TeamEventAction -> Bool
$c== :: TeamEventAction -> TeamEventAction -> Bool
Eq, Eq TeamEventAction
TeamEventAction -> TeamEventAction -> Bool
TeamEventAction -> TeamEventAction -> Ordering
TeamEventAction -> TeamEventAction -> TeamEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: TeamEventAction -> TeamEventAction -> TeamEventAction
$cmin :: TeamEventAction -> TeamEventAction -> TeamEventAction
max :: TeamEventAction -> TeamEventAction -> TeamEventAction
$cmax :: TeamEventAction -> TeamEventAction -> TeamEventAction
>= :: TeamEventAction -> TeamEventAction -> Bool
$c>= :: TeamEventAction -> TeamEventAction -> Bool
> :: TeamEventAction -> TeamEventAction -> Bool
$c> :: TeamEventAction -> TeamEventAction -> Bool
<= :: TeamEventAction -> TeamEventAction -> Bool
$c<= :: TeamEventAction -> TeamEventAction -> Bool
< :: TeamEventAction -> TeamEventAction -> Bool
$c< :: TeamEventAction -> TeamEventAction -> Bool
compare :: TeamEventAction -> TeamEventAction -> Ordering
$ccompare :: TeamEventAction -> TeamEventAction -> Ordering
Ord, Int -> TeamEventAction -> ShowS
[TeamEventAction] -> ShowS
TeamEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TeamEventAction] -> ShowS
$cshowList :: [TeamEventAction] -> ShowS
show :: TeamEventAction -> String
$cshow :: TeamEventAction -> String
showsPrec :: Int -> TeamEventAction -> ShowS
$cshowsPrec :: Int -> TeamEventAction -> ShowS
Show, forall x. Rep TeamEventAction x -> TeamEventAction
forall x. TeamEventAction -> Rep TeamEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TeamEventAction x -> TeamEventAction
$cfrom :: forall x. TeamEventAction -> Rep TeamEventAction x
Generic, Typeable, Typeable TeamEventAction
TeamEventAction -> DataType
TeamEventAction -> Constr
(forall b. Data b => b -> b) -> TeamEventAction -> TeamEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> TeamEventAction -> u
forall u. (forall d. Data d => d -> u) -> TeamEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TeamEventAction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TeamEventAction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> TeamEventAction -> m TeamEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TeamEventAction -> m TeamEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TeamEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TeamEventAction -> c TeamEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TeamEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TeamEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TeamEventAction -> m TeamEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TeamEventAction -> m TeamEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TeamEventAction -> m TeamEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TeamEventAction -> m TeamEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> TeamEventAction -> m TeamEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> TeamEventAction -> m TeamEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> TeamEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> TeamEventAction -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> TeamEventAction -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TeamEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TeamEventAction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TeamEventAction -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TeamEventAction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TeamEventAction -> r
gmapT :: (forall b. Data b => b -> b) -> TeamEventAction -> TeamEventAction
$cgmapT :: (forall b. Data b => b -> b) -> TeamEventAction -> TeamEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TeamEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TeamEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TeamEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TeamEventAction)
dataTypeOf :: TeamEventAction -> DataType
$cdataTypeOf :: TeamEventAction -> DataType
toConstr :: TeamEventAction -> Constr
$ctoConstr :: TeamEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TeamEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TeamEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TeamEventAction -> c TeamEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TeamEventAction -> c TeamEventAction
Data)

instance NFData TeamEventAction where rnf :: TeamEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON TeamEventAction where
  parseJSON :: Value -> Parser TeamEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Team event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"created"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure TeamEventAction
TeamCreatedAction
        Text
"deleted"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure TeamEventAction
TeamDeletedAction
        Text
"edited"        -> forall (f :: * -> *) a. Applicative f => a -> f a
pure TeamEventAction
TeamEditedAction
        Text
"added_to_repository"     -> forall (f :: * -> *) a. Applicative f => a -> f a
pure TeamEventAction
TeamAddedToRepoAction
        Text
"removed_from_repository" -> forall (f :: * -> *) a. Applicative f => a -> f a
pure TeamEventAction
TeamRemovedFromRepoAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> TeamEventAction
TeamActionOther Text
t)

-- | Triggered when an organization's team is created or deleted.

-- Events of this type are not visible in timelines. These events are only used to trigger organization hooks.

-- See <https://developer.github.com/v3/activity/events/types/#teamevent>.

data TeamEvent = TeamEvent
    { TeamEvent -> TeamEventAction
evTeamAction              :: !TeamEventAction
    , TeamEvent -> HookTeam
evTeamTarget              :: !HookTeam
    , TeamEvent -> HookOrganization
evTeamOrganization        :: !HookOrganization
    , TeamEvent -> HookUser
evTeamSender              :: !HookUser
    }
    deriving (TeamEvent -> TeamEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TeamEvent -> TeamEvent -> Bool
$c/= :: TeamEvent -> TeamEvent -> Bool
== :: TeamEvent -> TeamEvent -> Bool
$c== :: TeamEvent -> TeamEvent -> Bool
Eq, Int -> TeamEvent -> ShowS
[TeamEvent] -> ShowS
TeamEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TeamEvent] -> ShowS
$cshowList :: [TeamEvent] -> ShowS
show :: TeamEvent -> String
$cshow :: TeamEvent -> String
showsPrec :: Int -> TeamEvent -> ShowS
$cshowsPrec :: Int -> TeamEvent -> ShowS
Show, Typeable, Typeable TeamEvent
TeamEvent -> DataType
TeamEvent -> Constr
(forall b. Data b => b -> b) -> TeamEvent -> TeamEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> TeamEvent -> u
forall u. (forall d. Data d => d -> u) -> TeamEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TeamEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TeamEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TeamEvent -> m TeamEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TeamEvent -> m TeamEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TeamEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TeamEvent -> c TeamEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TeamEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TeamEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TeamEvent -> m TeamEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TeamEvent -> m TeamEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TeamEvent -> m TeamEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TeamEvent -> m TeamEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TeamEvent -> m TeamEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TeamEvent -> m TeamEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TeamEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TeamEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> TeamEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TeamEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TeamEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TeamEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TeamEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TeamEvent -> r
gmapT :: (forall b. Data b => b -> b) -> TeamEvent -> TeamEvent
$cgmapT :: (forall b. Data b => b -> b) -> TeamEvent -> TeamEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TeamEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TeamEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TeamEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TeamEvent)
dataTypeOf :: TeamEvent -> DataType
$cdataTypeOf :: TeamEvent -> DataType
toConstr :: TeamEvent -> Constr
$ctoConstr :: TeamEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TeamEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TeamEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TeamEvent -> c TeamEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TeamEvent -> c TeamEvent
Data, forall x. Rep TeamEvent x -> TeamEvent
forall x. TeamEvent -> Rep TeamEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TeamEvent x -> TeamEvent
$cfrom :: forall x. TeamEvent -> Rep TeamEvent x
Generic)

instance EventHasSender TeamEvent where senderOfEvent :: TeamEvent -> HookUser
senderOfEvent = TeamEvent -> HookUser
evTeamSender
instance NFData TeamEvent where rnf :: TeamEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


-- | Triggered when a repository is added to a team.

-- Events of this type are not visible in timelines. These events are only used to trigger hooks.

-- See <https://developer.github.com/v3/activity/events/types/#teamaddevent>.

data TeamAddEvent = TeamAddEvent
    { TeamAddEvent -> Maybe HookTeam
evTeamAddTarget           :: !(Maybe HookTeam) -- ^ Older events may not include this in the payload.

    , TeamAddEvent -> HookRepository
evTeamAddRepo             :: !HookRepository
    , TeamAddEvent -> HookOrganization
evTeamAddOrg              :: !HookOrganization
    , TeamAddEvent -> HookUser
evTeamAddSender           :: !HookUser
    }
    deriving (TeamAddEvent -> TeamAddEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TeamAddEvent -> TeamAddEvent -> Bool
$c/= :: TeamAddEvent -> TeamAddEvent -> Bool
== :: TeamAddEvent -> TeamAddEvent -> Bool
$c== :: TeamAddEvent -> TeamAddEvent -> Bool
Eq, Int -> TeamAddEvent -> ShowS
[TeamAddEvent] -> ShowS
TeamAddEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TeamAddEvent] -> ShowS
$cshowList :: [TeamAddEvent] -> ShowS
show :: TeamAddEvent -> String
$cshow :: TeamAddEvent -> String
showsPrec :: Int -> TeamAddEvent -> ShowS
$cshowsPrec :: Int -> TeamAddEvent -> ShowS
Show, Typeable, Typeable TeamAddEvent
TeamAddEvent -> DataType
TeamAddEvent -> Constr
(forall b. Data b => b -> b) -> TeamAddEvent -> TeamAddEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> TeamAddEvent -> u
forall u. (forall d. Data d => d -> u) -> TeamAddEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TeamAddEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TeamAddEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TeamAddEvent -> m TeamAddEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TeamAddEvent -> m TeamAddEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TeamAddEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TeamAddEvent -> c TeamAddEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TeamAddEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TeamAddEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TeamAddEvent -> m TeamAddEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TeamAddEvent -> m TeamAddEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TeamAddEvent -> m TeamAddEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TeamAddEvent -> m TeamAddEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TeamAddEvent -> m TeamAddEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TeamAddEvent -> m TeamAddEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TeamAddEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TeamAddEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> TeamAddEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TeamAddEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TeamAddEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TeamAddEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TeamAddEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TeamAddEvent -> r
gmapT :: (forall b. Data b => b -> b) -> TeamAddEvent -> TeamAddEvent
$cgmapT :: (forall b. Data b => b -> b) -> TeamAddEvent -> TeamAddEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TeamAddEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TeamAddEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TeamAddEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TeamAddEvent)
dataTypeOf :: TeamAddEvent -> DataType
$cdataTypeOf :: TeamAddEvent -> DataType
toConstr :: TeamAddEvent -> Constr
$ctoConstr :: TeamAddEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TeamAddEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TeamAddEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TeamAddEvent -> c TeamAddEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TeamAddEvent -> c TeamAddEvent
Data, forall x. Rep TeamAddEvent x -> TeamAddEvent
forall x. TeamAddEvent -> Rep TeamAddEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TeamAddEvent x -> TeamAddEvent
$cfrom :: forall x. TeamAddEvent -> Rep TeamAddEvent x
Generic)

instance EventHasSender TeamAddEvent where senderOfEvent :: TeamAddEvent -> HookUser
senderOfEvent = TeamAddEvent -> HookUser
evTeamAddSender
instance EventHasRepo TeamAddEvent where repoForEvent :: TeamAddEvent -> HookRepository
repoForEvent = TeamAddEvent -> HookRepository
evTeamAddRepo
instance NFData TeamAddEvent where rnf :: TeamAddEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


data WatchEventAction
  -- | Decodes from "started"

  = WatchStartedAction
  -- | The result of decoding an unknown watch event action type

  | WatchActionOther !Text
  deriving (WatchEventAction -> WatchEventAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WatchEventAction -> WatchEventAction -> Bool
$c/= :: WatchEventAction -> WatchEventAction -> Bool
== :: WatchEventAction -> WatchEventAction -> Bool
$c== :: WatchEventAction -> WatchEventAction -> Bool
Eq, Eq WatchEventAction
WatchEventAction -> WatchEventAction -> Bool
WatchEventAction -> WatchEventAction -> Ordering
WatchEventAction -> WatchEventAction -> WatchEventAction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: WatchEventAction -> WatchEventAction -> WatchEventAction
$cmin :: WatchEventAction -> WatchEventAction -> WatchEventAction
max :: WatchEventAction -> WatchEventAction -> WatchEventAction
$cmax :: WatchEventAction -> WatchEventAction -> WatchEventAction
>= :: WatchEventAction -> WatchEventAction -> Bool
$c>= :: WatchEventAction -> WatchEventAction -> Bool
> :: WatchEventAction -> WatchEventAction -> Bool
$c> :: WatchEventAction -> WatchEventAction -> Bool
<= :: WatchEventAction -> WatchEventAction -> Bool
$c<= :: WatchEventAction -> WatchEventAction -> Bool
< :: WatchEventAction -> WatchEventAction -> Bool
$c< :: WatchEventAction -> WatchEventAction -> Bool
compare :: WatchEventAction -> WatchEventAction -> Ordering
$ccompare :: WatchEventAction -> WatchEventAction -> Ordering
Ord, Int -> WatchEventAction -> ShowS
[WatchEventAction] -> ShowS
WatchEventAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WatchEventAction] -> ShowS
$cshowList :: [WatchEventAction] -> ShowS
show :: WatchEventAction -> String
$cshow :: WatchEventAction -> String
showsPrec :: Int -> WatchEventAction -> ShowS
$cshowsPrec :: Int -> WatchEventAction -> ShowS
Show, forall x. Rep WatchEventAction x -> WatchEventAction
forall x. WatchEventAction -> Rep WatchEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WatchEventAction x -> WatchEventAction
$cfrom :: forall x. WatchEventAction -> Rep WatchEventAction x
Generic, Typeable, Typeable WatchEventAction
WatchEventAction -> DataType
WatchEventAction -> Constr
(forall b. Data b => b -> b)
-> WatchEventAction -> WatchEventAction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> WatchEventAction -> u
forall u. (forall d. Data d => d -> u) -> WatchEventAction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WatchEventAction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WatchEventAction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> WatchEventAction -> m WatchEventAction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> WatchEventAction -> m WatchEventAction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WatchEventAction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WatchEventAction -> c WatchEventAction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WatchEventAction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c WatchEventAction)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> WatchEventAction -> m WatchEventAction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> WatchEventAction -> m WatchEventAction
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> WatchEventAction -> m WatchEventAction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> WatchEventAction -> m WatchEventAction
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> WatchEventAction -> m WatchEventAction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> WatchEventAction -> m WatchEventAction
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> WatchEventAction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> WatchEventAction -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> WatchEventAction -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> WatchEventAction -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WatchEventAction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WatchEventAction -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WatchEventAction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WatchEventAction -> r
gmapT :: (forall b. Data b => b -> b)
-> WatchEventAction -> WatchEventAction
$cgmapT :: (forall b. Data b => b -> b)
-> WatchEventAction -> WatchEventAction
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c WatchEventAction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c WatchEventAction)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WatchEventAction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WatchEventAction)
dataTypeOf :: WatchEventAction -> DataType
$cdataTypeOf :: WatchEventAction -> DataType
toConstr :: WatchEventAction -> Constr
$ctoConstr :: WatchEventAction -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WatchEventAction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WatchEventAction
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WatchEventAction -> c WatchEventAction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WatchEventAction -> c WatchEventAction
Data)

instance NFData WatchEventAction where rnf :: WatchEventAction -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf

instance FromJSON WatchEventAction where
  parseJSON :: Value -> Parser WatchEventAction
parseJSON = forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"Watch event action" forall a b. (a -> b) -> a -> b
$ \Text
t ->
    case Text
t of
        Text
"started"       -> forall (f :: * -> *) a. Applicative f => a -> f a
pure WatchEventAction
WatchStartedAction
        Text
_               -> forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> WatchEventAction
WatchActionOther Text
t)

-- | The WatchEvent is related to starring a repository, not watching.

-- The event’s actor is the user who starred a repository, and the event’s

-- repository is the repository that was starred.

-- See <https://developer.github.com/v3/activity/events/types/#watchevent>.

data WatchEvent = WatchEvent
    { WatchEvent -> WatchEventAction
evWatchAction             :: !WatchEventAction
    , WatchEvent -> HookRepository
evWatchRepo               :: !HookRepository
    , WatchEvent -> HookUser
evWatchSender             :: !HookUser
    }
    deriving (WatchEvent -> WatchEvent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WatchEvent -> WatchEvent -> Bool
$c/= :: WatchEvent -> WatchEvent -> Bool
== :: WatchEvent -> WatchEvent -> Bool
$c== :: WatchEvent -> WatchEvent -> Bool
Eq, Int -> WatchEvent -> ShowS
[WatchEvent] -> ShowS
WatchEvent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WatchEvent] -> ShowS
$cshowList :: [WatchEvent] -> ShowS
show :: WatchEvent -> String
$cshow :: WatchEvent -> String
showsPrec :: Int -> WatchEvent -> ShowS
$cshowsPrec :: Int -> WatchEvent -> ShowS
Show, Typeable, Typeable WatchEvent
WatchEvent -> DataType
WatchEvent -> Constr
(forall b. Data b => b -> b) -> WatchEvent -> WatchEvent
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> WatchEvent -> u
forall u. (forall d. Data d => d -> u) -> WatchEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WatchEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WatchEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> WatchEvent -> m WatchEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WatchEvent -> m WatchEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WatchEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WatchEvent -> c WatchEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WatchEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WatchEvent)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WatchEvent -> m WatchEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WatchEvent -> m WatchEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WatchEvent -> m WatchEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WatchEvent -> m WatchEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> WatchEvent -> m WatchEvent
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> WatchEvent -> m WatchEvent
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> WatchEvent -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> WatchEvent -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> WatchEvent -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> WatchEvent -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WatchEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WatchEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WatchEvent -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WatchEvent -> r
gmapT :: (forall b. Data b => b -> b) -> WatchEvent -> WatchEvent
$cgmapT :: (forall b. Data b => b -> b) -> WatchEvent -> WatchEvent
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WatchEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WatchEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WatchEvent)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WatchEvent)
dataTypeOf :: WatchEvent -> DataType
$cdataTypeOf :: WatchEvent -> DataType
toConstr :: WatchEvent -> Constr
$ctoConstr :: WatchEvent -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WatchEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WatchEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WatchEvent -> c WatchEvent
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WatchEvent -> c WatchEvent
Data, forall x. Rep WatchEvent x -> WatchEvent
forall x. WatchEvent -> Rep WatchEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WatchEvent x -> WatchEvent
$cfrom :: forall x. WatchEvent -> Rep WatchEvent x
Generic)

instance EventHasSender WatchEvent where senderOfEvent :: WatchEvent -> HookUser
senderOfEvent = WatchEvent -> HookUser
evWatchSender
instance EventHasRepo WatchEvent where repoForEvent :: WatchEvent -> HookRepository
repoForEvent = WatchEvent -> HookRepository
evWatchRepo
instance NFData WatchEvent where rnf :: WatchEvent -> ()
rnf = forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf


-- Aeson Instances


instance FromJSON CheckSuiteEvent where
    parseJSON :: Value -> Parser CheckSuiteEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"CheckSuiteEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> CheckSuiteEventAction
-> HookCheckSuite
-> HookRepository
-> Maybe HookOrganization
-> HookUser
-> Maybe HookChecksInstallation
-> CheckSuiteEvent
CheckSuiteEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"check_suite"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"organization"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"installation"

instance FromJSON CheckRunEvent where
    parseJSON :: Value -> Parser CheckRunEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"CheckRunEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> CheckRunEventAction
-> HookCheckRun
-> Maybe HookCheckRunRequestedAction
-> HookRepository
-> Maybe HookOrganization
-> HookUser
-> Maybe HookChecksInstallation
-> CheckRunEvent
CheckRunEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"check_run"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requested_action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"organization"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"installation"

instance FromJSON CommitCommentEvent where
    parseJSON :: Value -> Parser CommitCommentEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"CommitCommentEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> CommitCommentEventAction
-> HookCommitComment
-> HookRepository
-> HookUser
-> CommitCommentEvent
CommitCommentEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"comment"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON CreateEvent where
    parseJSON :: Value -> Parser CreateEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"CreateEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> Text
-> Text
-> Text
-> Text
-> OwnerType
-> HookRepository
-> HookUser
-> CreateEvent
CreateEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"ref"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"ref_type"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"master_branch"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"description"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"pusher_type"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON DeleteEvent where
    parseJSON :: Value -> Parser DeleteEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"DeleteEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> Text
-> Text -> OwnerType -> HookRepository -> HookUser -> DeleteEvent
DeleteEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"ref"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"ref_type"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"pusher_type"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON DeploymentEvent where
    parseJSON :: Value -> Parser DeploymentEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"DeploymentEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> HookDeployment -> HookRepository -> HookUser -> DeploymentEvent
DeploymentEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"deployment"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON DeploymentStatusEvent where
    parseJSON :: Value -> Parser DeploymentStatusEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"DeploymentStatusEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> HookDeploymentStatus
-> HookDeployment
-> HookRepository
-> HookUser
-> DeploymentStatusEvent
DeploymentStatusEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"deployment_status"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"deployment"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON ForkEvent where
    parseJSON :: Value -> Parser ForkEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"ForkEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> HookRepository -> HookRepository -> HookUser -> ForkEvent
ForkEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"forkee"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON GollumEvent where
    parseJSON :: Value -> Parser GollumEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"GollumEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> Vector HookWikiPage -> HookRepository -> HookUser -> GollumEvent
GollumEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"pages"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON InstallationEvent where
    parseJSON :: Value -> Parser InstallationEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"InstallationEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> InstallationEventAction
-> HookInstallation
-> Vector HookRepositorySimple
-> HookUser
-> InstallationEvent
InstallationEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"installation"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"repositories" forall a. Parser (Maybe a) -> a -> Parser a
.!= forall a. Monoid a => a
mempty
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON InstallationRepositoriesEvent where
    parseJSON :: Value -> Parser InstallationRepositoriesEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"InstallationRepositoriesEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> InstallationRepoEventAction
-> HookInstallation
-> Text
-> Vector HookRepositorySimple
-> Vector HookRepositorySimple
-> HookUser
-> InstallationRepositoriesEvent
InstallationRepositoriesEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"installation"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository_selection"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repositories_added"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repositories_removed"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON IssueCommentEvent where
    parseJSON :: Value -> Parser IssueCommentEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"IssueCommentEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> IssueCommentEventAction
-> HookIssue
-> HookIssueComment
-> HookRepository
-> HookUser
-> IssueCommentEvent
IssueCommentEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"issue"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"comment"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON IssuesEvent where
    parseJSON :: Value -> Parser IssuesEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"IssuesEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> IssuesEventAction
-> HookIssue -> HookRepository -> HookUser -> IssuesEvent
IssuesEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"issue"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON LabelEvent where
    parseJSON :: Value -> Parser LabelEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"LabelEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> LabelEventAction
-> HookRepositoryLabel
-> HookRepository
-> Maybe HookOrganization
-> HookUser
-> LabelEvent
LabelEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"label"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"organization"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON MarketplacePurchaseEvent where
    parseJSON :: Value -> Parser MarketplacePurchaseEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"MarketplacePurchaseEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> MarketplacePurchaseEventAction
-> UTCTime
-> HookUser
-> HookMarketplacePurchase
-> Maybe HookMarketplacePurchase
-> MarketplacePurchaseEvent
MarketplacePurchaseEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (ZonedTime -> UTCTime
zonedTimeToUTC forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"effective_date")
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"marketplace_purchase"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"previous_marketplace_purchase"

instance FromJSON MemberEvent where
    parseJSON :: Value -> Parser MemberEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"MemberEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> MemberEventAction
-> HookUser -> HookRepository -> HookUser -> MemberEvent
MemberEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"member"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON MembershipEvent where
    parseJSON :: Value -> Parser MembershipEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"MembershipEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> MembershipEventAction
-> Text
-> HookUser
-> HookTeam
-> HookOrganization
-> HookUser
-> MembershipEvent
MembershipEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"scope"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"member"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"team"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"organization"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON MilestoneEvent where
    parseJSON :: Value -> Parser MilestoneEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"MilestoneEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> MilestoneEventAction
-> HookMilestone
-> HookRepository
-> HookOrganization
-> HookUser
-> MilestoneEvent
MilestoneEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"milestone"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"organization"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON OrganizationEvent where
    parseJSON :: Value -> Parser OrganizationEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"OrganizationEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> OrganizationEventAction
-> Maybe HookOrganizationInvitation
-> Maybe HookOrganizationMembership
-> HookOrganization
-> HookUser
-> OrganizationEvent
OrganizationEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"invitation"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"membership"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"organization"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON OrgBlockEvent where
    parseJSON :: Value -> Parser OrgBlockEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"OrgBlockEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> OrgBlockEventAction
-> HookUser -> HookOrganization -> HookUser -> OrgBlockEvent
OrgBlockEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"blocked_user"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"organization"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON PageBuildEvent where
    parseJSON :: Value -> Parser PageBuildEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"PageBuildEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> Int
-> HookPageBuildResult
-> HookRepository
-> HookUser
-> PageBuildEvent
PageBuildEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"build"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON ProjectCardEvent where
    parseJSON :: Value -> Parser ProjectCardEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"ProjectCardEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> ProjectCardEventAction
-> HookProjectCard
-> HookRepository
-> HookOrganization
-> HookUser
-> ProjectCardEvent
ProjectCardEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"project_card"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"organization"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON ProjectColumnEvent where
    parseJSON :: Value -> Parser ProjectColumnEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"ProjectColumnEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> ProjectColumnEventAction
-> HookProjectColumn
-> HookRepository
-> HookOrganization
-> HookUser
-> ProjectColumnEvent
ProjectColumnEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"project_column"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"organization"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON ProjectEvent where
    parseJSON :: Value -> Parser ProjectEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"ProjectEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> ProjectEventAction
-> HookProject
-> HookRepository
-> HookOrganization
-> HookUser
-> ProjectEvent
ProjectEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"project"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"organization"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON PublicEvent where
    parseJSON :: Value -> Parser PublicEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"PublicEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> HookRepository -> HookUser -> PublicEvent
PublicEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON PullRequestEvent where
    parseJSON :: Value -> Parser PullRequestEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"PullRequestEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> PullRequestEventAction
-> Int
-> HookPullRequest
-> HookRepository
-> HookUser
-> Maybe Int
-> PullRequestEvent
PullRequestEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"number"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"pull_request"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"installation" forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= forall b a. b -> (a -> b) -> Maybe a -> b
maybe (forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Maybe a
Nothing) (forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"id"))

instance FromJSON PullRequestReviewEvent where
    parseJSON :: Value -> Parser PullRequestReviewEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"PullRequestReviewEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> PullRequestReviewEventAction
-> HookPullRequestReview
-> HookPullRequest
-> HookRepository
-> HookUser
-> PullRequestReviewEvent
PullRequestReviewEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"review"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"pull_request"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON PullRequestReviewCommentEvent where
    parseJSON :: Value -> Parser PullRequestReviewCommentEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"PullRequestReviewCommentEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> PullRequestReviewCommentEventAction
-> HookPullRequestReviewComment
-> HookPullRequest
-> HookRepository
-> HookUser
-> PullRequestReviewCommentEvent
PullRequestReviewCommentEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"comment"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"pull_request"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON PushEvent where
    parseJSON :: Value -> Parser PushEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"PushEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> Text
-> Maybe Text
-> Maybe Text
-> Bool
-> Bool
-> Bool
-> Maybe Text
-> URL
-> Maybe (Vector HookCommit)
-> Maybe HookCommit
-> HookRepository
-> Maybe HookOrganization
-> Maybe HookUser
-> PushEvent
PushEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"ref"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"after"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"before"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"created"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"deleted"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"forced"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"base_ref"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"compare"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"commits"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"head_commit"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"organization"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"sender"

instance FromJSON ReleaseEvent where
    parseJSON :: Value -> Parser ReleaseEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"ReleaseEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> ReleaseEventAction
-> HookRelease -> HookRepository -> HookUser -> ReleaseEvent
ReleaseEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"release"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON RepositoryEvent where
    parseJSON :: Value -> Parser RepositoryEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"RepositoryEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> RepositoryEventAction
-> HookRepository
-> Maybe HookOrganization
-> HookUser
-> RepositoryEvent
RepositoryEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"organization"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON StatusEvent where
    parseJSON :: Value -> Parser StatusEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"StatusEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> Int
-> Text
-> Text
-> Maybe URL
-> Text
-> Maybe Text
-> StatusEventState
-> HookCommit
-> UTCTime
-> UTCTime
-> HookRepository
-> HookUser
-> StatusEvent
StatusEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sha"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"name"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"target_url"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"context"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"description"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"state"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"commit"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"created_at"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"updated_at"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON TeamEvent where
    parseJSON :: Value -> Parser TeamEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"TeamEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> TeamEventAction
-> HookTeam -> HookOrganization -> HookUser -> TeamEvent
TeamEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"team"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"organization"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON TeamAddEvent where
    parseJSON :: Value -> Parser TeamAddEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"TeamAddEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> Maybe HookTeam
-> HookRepository -> HookOrganization -> HookUser -> TeamAddEvent
TeamAddEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"team"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"organization"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

instance FromJSON WatchEvent where
    parseJSON :: Value -> Parser WatchEvent
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"WatchEvent" forall a b. (a -> b) -> a -> b
$ \Object
o -> WatchEventAction -> HookRepository -> HookUser -> WatchEvent
WatchEvent
        forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"action"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"