module GitHub.Data.Issues where

import GitHub.Data.Definitions
import GitHub.Data.Id           (Id)
import GitHub.Data.Milestone    (Milestone)
import GitHub.Data.Name         (Name)
import GitHub.Data.Options      (IssueState, IssueStateReason)
import GitHub.Data.PullRequests
import GitHub.Data.URL          (URL)
import GitHub.Internal.Prelude
import Prelude                  ()

import qualified Data.Text as T

data Issue = Issue
    { Issue -> Maybe UTCTime
issueClosedAt    :: !(Maybe UTCTime)
    , Issue -> UTCTime
issueUpdatedAt   :: !UTCTime
    , Issue -> URL
issueEventsUrl   :: !URL
    , Issue -> Maybe URL
issueHtmlUrl     :: !(Maybe URL)
    , Issue -> Maybe SimpleUser
issueClosedBy    :: !(Maybe SimpleUser)
    , Issue -> Vector IssueLabel
issueLabels      :: !(Vector IssueLabel)
    , Issue -> IssueNumber
issueNumber      :: !IssueNumber
    , Issue -> Vector SimpleUser
issueAssignees   :: !(Vector SimpleUser)
    , Issue -> SimpleUser
issueUser        :: !SimpleUser
    , Issue -> Text
issueTitle       :: !Text
    , Issue -> Maybe PullRequestReference
issuePullRequest :: !(Maybe PullRequestReference)
    , Issue -> URL
issueUrl         :: !URL
    , Issue -> UTCTime
issueCreatedAt   :: !UTCTime
    , Issue -> Maybe Text
issueBody        :: !(Maybe Text)
    , Issue -> IssueState
issueState       :: !IssueState
    , Issue -> Id Issue
issueId          :: !(Id Issue)
    , Issue -> Int
issueComments    :: !Int
    , Issue -> Maybe Milestone
issueMilestone   :: !(Maybe Milestone)
    , Issue -> Maybe IssueStateReason
issueStateReason :: !(Maybe IssueStateReason)
    }
  deriving (Int -> Issue -> ShowS
[Issue] -> ShowS
Issue -> String
(Int -> Issue -> ShowS)
-> (Issue -> String) -> ([Issue] -> ShowS) -> Show Issue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Issue -> ShowS
showsPrec :: Int -> Issue -> ShowS
$cshow :: Issue -> String
show :: Issue -> String
$cshowList :: [Issue] -> ShowS
showList :: [Issue] -> ShowS
Show, Typeable Issue
Typeable Issue =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Issue -> c Issue)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Issue)
-> (Issue -> Constr)
-> (Issue -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Issue))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Issue))
-> ((forall b. Data b => b -> b) -> Issue -> Issue)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Issue -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Issue -> r)
-> (forall u. (forall d. Data d => d -> u) -> Issue -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Issue -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Issue -> m Issue)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Issue -> m Issue)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Issue -> m Issue)
-> Data Issue
Issue -> Constr
Issue -> DataType
(forall b. Data b => b -> b) -> Issue -> Issue
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) -> Issue -> u
forall u. (forall d. Data d => d -> u) -> Issue -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Issue -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Issue -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Issue -> m Issue
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Issue -> m Issue
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Issue
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Issue -> c Issue
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Issue)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Issue)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Issue -> c Issue
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Issue -> c Issue
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Issue
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Issue
$ctoConstr :: Issue -> Constr
toConstr :: Issue -> Constr
$cdataTypeOf :: Issue -> DataType
dataTypeOf :: Issue -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Issue)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Issue)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Issue)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Issue)
$cgmapT :: (forall b. Data b => b -> b) -> Issue -> Issue
gmapT :: (forall b. Data b => b -> b) -> Issue -> Issue
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Issue -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Issue -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Issue -> r
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Issue -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Issue -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Issue -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Issue -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Issue -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Issue -> m Issue
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Issue -> m Issue
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Issue -> m Issue
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Issue -> m Issue
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Issue -> m Issue
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Issue -> m Issue
Data, Typeable, Issue -> Issue -> Bool
(Issue -> Issue -> Bool) -> (Issue -> Issue -> Bool) -> Eq Issue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Issue -> Issue -> Bool
== :: Issue -> Issue -> Bool
$c/= :: Issue -> Issue -> Bool
/= :: Issue -> Issue -> Bool
Eq, Eq Issue
Eq Issue =>
(Issue -> Issue -> Ordering)
-> (Issue -> Issue -> Bool)
-> (Issue -> Issue -> Bool)
-> (Issue -> Issue -> Bool)
-> (Issue -> Issue -> Bool)
-> (Issue -> Issue -> Issue)
-> (Issue -> Issue -> Issue)
-> Ord Issue
Issue -> Issue -> Bool
Issue -> Issue -> Ordering
Issue -> Issue -> Issue
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
$ccompare :: Issue -> Issue -> Ordering
compare :: Issue -> Issue -> Ordering
$c< :: Issue -> Issue -> Bool
< :: Issue -> Issue -> Bool
$c<= :: Issue -> Issue -> Bool
<= :: Issue -> Issue -> Bool
$c> :: Issue -> Issue -> Bool
> :: Issue -> Issue -> Bool
$c>= :: Issue -> Issue -> Bool
>= :: Issue -> Issue -> Bool
$cmax :: Issue -> Issue -> Issue
max :: Issue -> Issue -> Issue
$cmin :: Issue -> Issue -> Issue
min :: Issue -> Issue -> Issue
Ord, (forall x. Issue -> Rep Issue x)
-> (forall x. Rep Issue x -> Issue) -> Generic Issue
forall x. Rep Issue x -> Issue
forall x. Issue -> Rep Issue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Issue -> Rep Issue x
from :: forall x. Issue -> Rep Issue x
$cto :: forall x. Rep Issue x -> Issue
to :: forall x. Rep Issue x -> Issue
Generic)

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

data NewIssue = NewIssue
    { NewIssue -> Text
newIssueTitle     :: !Text
    , NewIssue -> Maybe Text
newIssueBody      :: !(Maybe Text)
    , NewIssue -> Vector (Name User)
newIssueAssignees :: !(Vector (Name User))
    , NewIssue -> Maybe (Id Milestone)
newIssueMilestone :: !(Maybe (Id Milestone))
    , NewIssue -> Maybe (Vector (Name IssueLabel))
newIssueLabels    :: !(Maybe (Vector (Name IssueLabel)))
    }
  deriving (Int -> NewIssue -> ShowS
[NewIssue] -> ShowS
NewIssue -> String
(Int -> NewIssue -> ShowS)
-> (NewIssue -> String) -> ([NewIssue] -> ShowS) -> Show NewIssue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NewIssue -> ShowS
showsPrec :: Int -> NewIssue -> ShowS
$cshow :: NewIssue -> String
show :: NewIssue -> String
$cshowList :: [NewIssue] -> ShowS
showList :: [NewIssue] -> ShowS
Show, Typeable NewIssue
Typeable NewIssue =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> NewIssue -> c NewIssue)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c NewIssue)
-> (NewIssue -> Constr)
-> (NewIssue -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c NewIssue))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewIssue))
-> ((forall b. Data b => b -> b) -> NewIssue -> NewIssue)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> NewIssue -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> NewIssue -> r)
-> (forall u. (forall d. Data d => d -> u) -> NewIssue -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> NewIssue -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> NewIssue -> m NewIssue)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> NewIssue -> m NewIssue)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> NewIssue -> m NewIssue)
-> Data NewIssue
NewIssue -> Constr
NewIssue -> DataType
(forall b. Data b => b -> b) -> NewIssue -> NewIssue
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) -> NewIssue -> u
forall u. (forall d. Data d => d -> u) -> NewIssue -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NewIssue -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NewIssue -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NewIssue -> m NewIssue
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NewIssue -> m NewIssue
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NewIssue
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NewIssue -> c NewIssue
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NewIssue)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewIssue)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NewIssue -> c NewIssue
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NewIssue -> c NewIssue
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NewIssue
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NewIssue
$ctoConstr :: NewIssue -> Constr
toConstr :: NewIssue -> Constr
$cdataTypeOf :: NewIssue -> DataType
dataTypeOf :: NewIssue -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NewIssue)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NewIssue)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewIssue)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewIssue)
$cgmapT :: (forall b. Data b => b -> b) -> NewIssue -> NewIssue
gmapT :: (forall b. Data b => b -> b) -> NewIssue -> NewIssue
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NewIssue -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NewIssue -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NewIssue -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NewIssue -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NewIssue -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> NewIssue -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NewIssue -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NewIssue -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NewIssue -> m NewIssue
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NewIssue -> m NewIssue
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NewIssue -> m NewIssue
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NewIssue -> m NewIssue
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NewIssue -> m NewIssue
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NewIssue -> m NewIssue
Data, Typeable, NewIssue -> NewIssue -> Bool
(NewIssue -> NewIssue -> Bool)
-> (NewIssue -> NewIssue -> Bool) -> Eq NewIssue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NewIssue -> NewIssue -> Bool
== :: NewIssue -> NewIssue -> Bool
$c/= :: NewIssue -> NewIssue -> Bool
/= :: NewIssue -> NewIssue -> Bool
Eq, Eq NewIssue
Eq NewIssue =>
(NewIssue -> NewIssue -> Ordering)
-> (NewIssue -> NewIssue -> Bool)
-> (NewIssue -> NewIssue -> Bool)
-> (NewIssue -> NewIssue -> Bool)
-> (NewIssue -> NewIssue -> Bool)
-> (NewIssue -> NewIssue -> NewIssue)
-> (NewIssue -> NewIssue -> NewIssue)
-> Ord NewIssue
NewIssue -> NewIssue -> Bool
NewIssue -> NewIssue -> Ordering
NewIssue -> NewIssue -> NewIssue
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
$ccompare :: NewIssue -> NewIssue -> Ordering
compare :: NewIssue -> NewIssue -> Ordering
$c< :: NewIssue -> NewIssue -> Bool
< :: NewIssue -> NewIssue -> Bool
$c<= :: NewIssue -> NewIssue -> Bool
<= :: NewIssue -> NewIssue -> Bool
$c> :: NewIssue -> NewIssue -> Bool
> :: NewIssue -> NewIssue -> Bool
$c>= :: NewIssue -> NewIssue -> Bool
>= :: NewIssue -> NewIssue -> Bool
$cmax :: NewIssue -> NewIssue -> NewIssue
max :: NewIssue -> NewIssue -> NewIssue
$cmin :: NewIssue -> NewIssue -> NewIssue
min :: NewIssue -> NewIssue -> NewIssue
Ord, (forall x. NewIssue -> Rep NewIssue x)
-> (forall x. Rep NewIssue x -> NewIssue) -> Generic NewIssue
forall x. Rep NewIssue x -> NewIssue
forall x. NewIssue -> Rep NewIssue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. NewIssue -> Rep NewIssue x
from :: forall x. NewIssue -> Rep NewIssue x
$cto :: forall x. Rep NewIssue x -> NewIssue
to :: forall x. Rep NewIssue x -> NewIssue
Generic)

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

data EditIssue = EditIssue
    { EditIssue -> Maybe Text
editIssueTitle     :: !(Maybe Text)
    , EditIssue -> Maybe Text
editIssueBody      :: !(Maybe Text)
    , EditIssue -> Maybe (Vector (Name User))
editIssueAssignees :: !(Maybe (Vector (Name User)))
    , EditIssue -> Maybe IssueState
editIssueState     :: !(Maybe IssueState)
    , EditIssue -> Maybe (Id Milestone)
editIssueMilestone :: !(Maybe (Id Milestone))
    , EditIssue -> Maybe (Vector (Name IssueLabel))
editIssueLabels    :: !(Maybe (Vector (Name IssueLabel)))
    }
  deriving  (Int -> EditIssue -> ShowS
[EditIssue] -> ShowS
EditIssue -> String
(Int -> EditIssue -> ShowS)
-> (EditIssue -> String)
-> ([EditIssue] -> ShowS)
-> Show EditIssue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EditIssue -> ShowS
showsPrec :: Int -> EditIssue -> ShowS
$cshow :: EditIssue -> String
show :: EditIssue -> String
$cshowList :: [EditIssue] -> ShowS
showList :: [EditIssue] -> ShowS
Show, Typeable EditIssue
Typeable EditIssue =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> EditIssue -> c EditIssue)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c EditIssue)
-> (EditIssue -> Constr)
-> (EditIssue -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c EditIssue))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EditIssue))
-> ((forall b. Data b => b -> b) -> EditIssue -> EditIssue)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> EditIssue -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> EditIssue -> r)
-> (forall u. (forall d. Data d => d -> u) -> EditIssue -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> EditIssue -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> EditIssue -> m EditIssue)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EditIssue -> m EditIssue)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EditIssue -> m EditIssue)
-> Data EditIssue
EditIssue -> Constr
EditIssue -> DataType
(forall b. Data b => b -> b) -> EditIssue -> EditIssue
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) -> EditIssue -> u
forall u. (forall d. Data d => d -> u) -> EditIssue -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EditIssue -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EditIssue -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> EditIssue -> m EditIssue
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> EditIssue -> m EditIssue
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EditIssue
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EditIssue -> c EditIssue
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EditIssue)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EditIssue)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EditIssue -> c EditIssue
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EditIssue -> c EditIssue
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EditIssue
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EditIssue
$ctoConstr :: EditIssue -> Constr
toConstr :: EditIssue -> Constr
$cdataTypeOf :: EditIssue -> DataType
dataTypeOf :: EditIssue -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EditIssue)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EditIssue)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EditIssue)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EditIssue)
$cgmapT :: (forall b. Data b => b -> b) -> EditIssue -> EditIssue
gmapT :: (forall b. Data b => b -> b) -> EditIssue -> EditIssue
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EditIssue -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EditIssue -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EditIssue -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EditIssue -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> EditIssue -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> EditIssue -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> EditIssue -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> EditIssue -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> EditIssue -> m EditIssue
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> EditIssue -> m EditIssue
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> EditIssue -> m EditIssue
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> EditIssue -> m EditIssue
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> EditIssue -> m EditIssue
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> EditIssue -> m EditIssue
Data, Typeable, EditIssue -> EditIssue -> Bool
(EditIssue -> EditIssue -> Bool)
-> (EditIssue -> EditIssue -> Bool) -> Eq EditIssue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EditIssue -> EditIssue -> Bool
== :: EditIssue -> EditIssue -> Bool
$c/= :: EditIssue -> EditIssue -> Bool
/= :: EditIssue -> EditIssue -> Bool
Eq, Eq EditIssue
Eq EditIssue =>
(EditIssue -> EditIssue -> Ordering)
-> (EditIssue -> EditIssue -> Bool)
-> (EditIssue -> EditIssue -> Bool)
-> (EditIssue -> EditIssue -> Bool)
-> (EditIssue -> EditIssue -> Bool)
-> (EditIssue -> EditIssue -> EditIssue)
-> (EditIssue -> EditIssue -> EditIssue)
-> Ord EditIssue
EditIssue -> EditIssue -> Bool
EditIssue -> EditIssue -> Ordering
EditIssue -> EditIssue -> EditIssue
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
$ccompare :: EditIssue -> EditIssue -> Ordering
compare :: EditIssue -> EditIssue -> Ordering
$c< :: EditIssue -> EditIssue -> Bool
< :: EditIssue -> EditIssue -> Bool
$c<= :: EditIssue -> EditIssue -> Bool
<= :: EditIssue -> EditIssue -> Bool
$c> :: EditIssue -> EditIssue -> Bool
> :: EditIssue -> EditIssue -> Bool
$c>= :: EditIssue -> EditIssue -> Bool
>= :: EditIssue -> EditIssue -> Bool
$cmax :: EditIssue -> EditIssue -> EditIssue
max :: EditIssue -> EditIssue -> EditIssue
$cmin :: EditIssue -> EditIssue -> EditIssue
min :: EditIssue -> EditIssue -> EditIssue
Ord, (forall x. EditIssue -> Rep EditIssue x)
-> (forall x. Rep EditIssue x -> EditIssue) -> Generic EditIssue
forall x. Rep EditIssue x -> EditIssue
forall x. EditIssue -> Rep EditIssue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. EditIssue -> Rep EditIssue x
from :: forall x. EditIssue -> Rep EditIssue x
$cto :: forall x. Rep EditIssue x -> EditIssue
to :: forall x. Rep EditIssue x -> EditIssue
Generic)

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

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

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

-- | See <https://developer.github.com/v3/issues/events/#events-1>
data EventType
    = Mentioned             -- ^ The actor was @mentioned in an issue body.
    | Subscribed            -- ^ The actor subscribed to receive notifications for an issue.
    | Unsubscribed          -- ^ The issue was unsubscribed from by the actor.
    | Referenced            -- ^ The issue was referenced from a commit message. The commit_id attribute is the commit SHA1 of where that happened.
    | Merged                -- ^ The issue was merged by the actor. The commit_id attribute is the SHA1 of the HEAD commit that was merged.
    | Assigned              -- ^ The issue was assigned to the actor.
    | Closed                -- ^ The issue was closed by the actor. When the commit_id is present, it identifies the commit that closed the issue using “closes / fixes #NN” syntax.
    | Reopened              -- ^ The issue was reopened by the actor.
    | ActorUnassigned       -- ^ The issue was unassigned to the actor
    | Labeled               -- ^ A label was added to the issue.
    | Unlabeled             -- ^ A label was removed from the issue.
    | Milestoned            -- ^ The issue was added to a milestone.
    | Demilestoned          -- ^ The issue was removed from a milestone.
    | Renamed               -- ^ The issue title was changed.
    | Locked                -- ^ The issue was locked by the actor.
    | Unlocked              -- ^ The issue was unlocked by the actor.
    | HeadRefDeleted        -- ^ The pull request’s branch was deleted.
    | HeadRefRestored       -- ^ The pull request’s branch was restored.
    | ReviewRequested       -- ^ The actor requested review from the subject on this pull request.
    | ReviewDismissed       -- ^ The actor dismissed a review from the pull request.
    | ReviewRequestRemoved  -- ^ The actor removed the review request for the subject on this pull request.
    | MarkedAsDuplicate     -- ^ A user with write permissions marked an issue as a duplicate of another issue or a pull request as a duplicate of another pull request.
    | UnmarkedAsDuplicate   -- ^ An issue that a user had previously marked as a duplicate of another issue is no longer considered a duplicate, or a pull request that a user had previously marked as a duplicate of another pull request is no longer considered a duplicate.
    | AddedToProject        -- ^ The issue was added to a project board.
    | MovedColumnsInProject -- ^ The issue was moved between columns in a project board.
    | RemovedFromProject    -- ^ The issue was removed from a project board.
    | ConvertedNoteToIssue  -- ^ The issue was created by converting a note in a project board to an issue.
  deriving (Int -> EventType -> ShowS
[EventType] -> ShowS
EventType -> String
(Int -> EventType -> ShowS)
-> (EventType -> String)
-> ([EventType] -> ShowS)
-> Show EventType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EventType -> ShowS
showsPrec :: Int -> EventType -> ShowS
$cshow :: EventType -> String
show :: EventType -> String
$cshowList :: [EventType] -> ShowS
showList :: [EventType] -> ShowS
Show, Typeable EventType
Typeable EventType =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> EventType -> c EventType)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c EventType)
-> (EventType -> Constr)
-> (EventType -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c EventType))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EventType))
-> ((forall b. Data b => b -> b) -> EventType -> EventType)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> EventType -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> EventType -> r)
-> (forall u. (forall d. Data d => d -> u) -> EventType -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> EventType -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> EventType -> m EventType)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EventType -> m EventType)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EventType -> m EventType)
-> Data EventType
EventType -> Constr
EventType -> DataType
(forall b. Data b => b -> b) -> EventType -> EventType
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) -> EventType -> u
forall u. (forall d. Data d => d -> u) -> EventType -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EventType -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EventType -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> EventType -> m EventType
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> EventType -> m EventType
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EventType
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EventType -> c EventType
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EventType)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EventType)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EventType -> c EventType
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EventType -> c EventType
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EventType
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EventType
$ctoConstr :: EventType -> Constr
toConstr :: EventType -> Constr
$cdataTypeOf :: EventType -> DataType
dataTypeOf :: EventType -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EventType)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EventType)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EventType)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EventType)
$cgmapT :: (forall b. Data b => b -> b) -> EventType -> EventType
gmapT :: (forall b. Data b => b -> b) -> EventType -> EventType
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EventType -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EventType -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EventType -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EventType -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> EventType -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> EventType -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> EventType -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> EventType -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> EventType -> m EventType
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> EventType -> m EventType
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> EventType -> m EventType
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> EventType -> m EventType
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> EventType -> m EventType
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> EventType -> m EventType
Data, Int -> EventType
EventType -> Int
EventType -> [EventType]
EventType -> EventType
EventType -> EventType -> [EventType]
EventType -> EventType -> EventType -> [EventType]
(EventType -> EventType)
-> (EventType -> EventType)
-> (Int -> EventType)
-> (EventType -> Int)
-> (EventType -> [EventType])
-> (EventType -> EventType -> [EventType])
-> (EventType -> EventType -> [EventType])
-> (EventType -> EventType -> EventType -> [EventType])
-> Enum EventType
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: EventType -> EventType
succ :: EventType -> EventType
$cpred :: EventType -> EventType
pred :: EventType -> EventType
$ctoEnum :: Int -> EventType
toEnum :: Int -> EventType
$cfromEnum :: EventType -> Int
fromEnum :: EventType -> Int
$cenumFrom :: EventType -> [EventType]
enumFrom :: EventType -> [EventType]
$cenumFromThen :: EventType -> EventType -> [EventType]
enumFromThen :: EventType -> EventType -> [EventType]
$cenumFromTo :: EventType -> EventType -> [EventType]
enumFromTo :: EventType -> EventType -> [EventType]
$cenumFromThenTo :: EventType -> EventType -> EventType -> [EventType]
enumFromThenTo :: EventType -> EventType -> EventType -> [EventType]
Enum, EventType
EventType -> EventType -> Bounded EventType
forall a. a -> a -> Bounded a
$cminBound :: EventType
minBound :: EventType
$cmaxBound :: EventType
maxBound :: EventType
Bounded, Typeable, EventType -> EventType -> Bool
(EventType -> EventType -> Bool)
-> (EventType -> EventType -> Bool) -> Eq EventType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EventType -> EventType -> Bool
== :: EventType -> EventType -> Bool
$c/= :: EventType -> EventType -> Bool
/= :: EventType -> EventType -> Bool
Eq, Eq EventType
Eq EventType =>
(EventType -> EventType -> Ordering)
-> (EventType -> EventType -> Bool)
-> (EventType -> EventType -> Bool)
-> (EventType -> EventType -> Bool)
-> (EventType -> EventType -> Bool)
-> (EventType -> EventType -> EventType)
-> (EventType -> EventType -> EventType)
-> Ord EventType
EventType -> EventType -> Bool
EventType -> EventType -> Ordering
EventType -> EventType -> EventType
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
$ccompare :: EventType -> EventType -> Ordering
compare :: EventType -> EventType -> Ordering
$c< :: EventType -> EventType -> Bool
< :: EventType -> EventType -> Bool
$c<= :: EventType -> EventType -> Bool
<= :: EventType -> EventType -> Bool
$c> :: EventType -> EventType -> Bool
> :: EventType -> EventType -> Bool
$c>= :: EventType -> EventType -> Bool
>= :: EventType -> EventType -> Bool
$cmax :: EventType -> EventType -> EventType
max :: EventType -> EventType -> EventType
$cmin :: EventType -> EventType -> EventType
min :: EventType -> EventType -> EventType
Ord, (forall x. EventType -> Rep EventType x)
-> (forall x. Rep EventType x -> EventType) -> Generic EventType
forall x. Rep EventType x -> EventType
forall x. EventType -> Rep EventType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. EventType -> Rep EventType x
from :: forall x. EventType -> Rep EventType x
$cto :: forall x. Rep EventType x -> EventType
to :: forall x. Rep EventType x -> EventType
Generic)

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

-- | Issue event
data IssueEvent = IssueEvent
    { IssueEvent -> SimpleUser
issueEventActor     :: !SimpleUser
    , IssueEvent -> EventType
issueEventType      :: !EventType
    , IssueEvent -> Maybe Text
issueEventCommitId  :: !(Maybe Text)
    , IssueEvent -> URL
issueEventUrl       :: !URL
    , IssueEvent -> UTCTime
issueEventCreatedAt :: !UTCTime
    , IssueEvent -> Int
issueEventId        :: !Int
    , IssueEvent -> Maybe Issue
issueEventIssue     :: !(Maybe Issue)
    , IssueEvent -> Maybe IssueLabel
issueEventLabel     :: !(Maybe IssueLabel)
    }
  deriving (Int -> IssueEvent -> ShowS
[IssueEvent] -> ShowS
IssueEvent -> String
(Int -> IssueEvent -> ShowS)
-> (IssueEvent -> String)
-> ([IssueEvent] -> ShowS)
-> Show IssueEvent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IssueEvent -> ShowS
showsPrec :: Int -> IssueEvent -> ShowS
$cshow :: IssueEvent -> String
show :: IssueEvent -> String
$cshowList :: [IssueEvent] -> ShowS
showList :: [IssueEvent] -> ShowS
Show, Typeable IssueEvent
Typeable IssueEvent =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> IssueEvent -> c IssueEvent)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c IssueEvent)
-> (IssueEvent -> Constr)
-> (IssueEvent -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c IssueEvent))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c IssueEvent))
-> ((forall b. Data b => b -> b) -> IssueEvent -> IssueEvent)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> IssueEvent -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> IssueEvent -> r)
-> (forall u. (forall d. Data d => d -> u) -> IssueEvent -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> IssueEvent -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> IssueEvent -> m IssueEvent)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> IssueEvent -> m IssueEvent)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> IssueEvent -> m IssueEvent)
-> Data IssueEvent
IssueEvent -> Constr
IssueEvent -> DataType
(forall b. Data b => b -> b) -> IssueEvent -> IssueEvent
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) -> IssueEvent -> u
forall u. (forall d. Data d => d -> u) -> IssueEvent -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IssueEvent -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IssueEvent -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> IssueEvent -> m IssueEvent
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IssueEvent -> m IssueEvent
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssueEvent
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IssueEvent -> c IssueEvent
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssueEvent)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IssueEvent)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IssueEvent -> c IssueEvent
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IssueEvent -> c IssueEvent
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssueEvent
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IssueEvent
$ctoConstr :: IssueEvent -> Constr
toConstr :: IssueEvent -> Constr
$cdataTypeOf :: IssueEvent -> DataType
dataTypeOf :: IssueEvent -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssueEvent)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IssueEvent)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IssueEvent)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IssueEvent)
$cgmapT :: (forall b. Data b => b -> b) -> IssueEvent -> IssueEvent
gmapT :: (forall b. Data b => b -> b) -> IssueEvent -> IssueEvent
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IssueEvent -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IssueEvent -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IssueEvent -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IssueEvent -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> IssueEvent -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> IssueEvent -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> IssueEvent -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> IssueEvent -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> IssueEvent -> m IssueEvent
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> IssueEvent -> m IssueEvent
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IssueEvent -> m IssueEvent
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IssueEvent -> m IssueEvent
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IssueEvent -> m IssueEvent
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> IssueEvent -> m IssueEvent
Data, Typeable, IssueEvent -> IssueEvent -> Bool
(IssueEvent -> IssueEvent -> Bool)
-> (IssueEvent -> IssueEvent -> Bool) -> Eq IssueEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IssueEvent -> IssueEvent -> Bool
== :: IssueEvent -> IssueEvent -> Bool
$c/= :: IssueEvent -> IssueEvent -> Bool
/= :: IssueEvent -> IssueEvent -> Bool
Eq, Eq IssueEvent
Eq IssueEvent =>
(IssueEvent -> IssueEvent -> Ordering)
-> (IssueEvent -> IssueEvent -> Bool)
-> (IssueEvent -> IssueEvent -> Bool)
-> (IssueEvent -> IssueEvent -> Bool)
-> (IssueEvent -> IssueEvent -> Bool)
-> (IssueEvent -> IssueEvent -> IssueEvent)
-> (IssueEvent -> IssueEvent -> IssueEvent)
-> Ord IssueEvent
IssueEvent -> IssueEvent -> Bool
IssueEvent -> IssueEvent -> Ordering
IssueEvent -> IssueEvent -> IssueEvent
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
$ccompare :: IssueEvent -> IssueEvent -> Ordering
compare :: IssueEvent -> IssueEvent -> Ordering
$c< :: IssueEvent -> IssueEvent -> Bool
< :: IssueEvent -> IssueEvent -> Bool
$c<= :: IssueEvent -> IssueEvent -> Bool
<= :: IssueEvent -> IssueEvent -> Bool
$c> :: IssueEvent -> IssueEvent -> Bool
> :: IssueEvent -> IssueEvent -> Bool
$c>= :: IssueEvent -> IssueEvent -> Bool
>= :: IssueEvent -> IssueEvent -> Bool
$cmax :: IssueEvent -> IssueEvent -> IssueEvent
max :: IssueEvent -> IssueEvent -> IssueEvent
$cmin :: IssueEvent -> IssueEvent -> IssueEvent
min :: IssueEvent -> IssueEvent -> IssueEvent
Ord, (forall x. IssueEvent -> Rep IssueEvent x)
-> (forall x. Rep IssueEvent x -> IssueEvent) -> Generic IssueEvent
forall x. Rep IssueEvent x -> IssueEvent
forall x. IssueEvent -> Rep IssueEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. IssueEvent -> Rep IssueEvent x
from :: forall x. IssueEvent -> Rep IssueEvent x
$cto :: forall x. Rep IssueEvent x -> IssueEvent
to :: forall x. Rep IssueEvent x -> IssueEvent
Generic)

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

instance FromJSON IssueEvent where
    parseJSON :: Value -> Parser IssueEvent
parseJSON = String
-> (Object -> Parser IssueEvent) -> Value -> Parser IssueEvent
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"Event" ((Object -> Parser IssueEvent) -> Value -> Parser IssueEvent)
-> (Object -> Parser IssueEvent) -> Value -> Parser IssueEvent
forall a b. (a -> b) -> a -> b
$ \Object
o -> SimpleUser
-> EventType
-> Maybe Text
-> URL
-> UTCTime
-> Int
-> Maybe Issue
-> Maybe IssueLabel
-> IssueEvent
IssueEvent
        (SimpleUser
 -> EventType
 -> Maybe Text
 -> URL
 -> UTCTime
 -> Int
 -> Maybe Issue
 -> Maybe IssueLabel
 -> IssueEvent)
-> Parser SimpleUser
-> Parser
     (EventType
      -> Maybe Text
      -> URL
      -> UTCTime
      -> Int
      -> Maybe Issue
      -> Maybe IssueLabel
      -> IssueEvent)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser SimpleUser
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"actor"
        Parser
  (EventType
   -> Maybe Text
   -> URL
   -> UTCTime
   -> Int
   -> Maybe Issue
   -> Maybe IssueLabel
   -> IssueEvent)
-> Parser EventType
-> Parser
     (Maybe Text
      -> URL
      -> UTCTime
      -> Int
      -> Maybe Issue
      -> Maybe IssueLabel
      -> IssueEvent)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser EventType
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"event"
        Parser
  (Maybe Text
   -> URL
   -> UTCTime
   -> Int
   -> Maybe Issue
   -> Maybe IssueLabel
   -> IssueEvent)
-> Parser (Maybe Text)
-> Parser
     (URL
      -> UTCTime -> Int -> Maybe Issue -> Maybe IssueLabel -> IssueEvent)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"commit_id"
        Parser
  (URL
   -> UTCTime -> Int -> Maybe Issue -> Maybe IssueLabel -> IssueEvent)
-> Parser URL
-> Parser
     (UTCTime -> Int -> Maybe Issue -> Maybe IssueLabel -> IssueEvent)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"url"
        Parser
  (UTCTime -> Int -> Maybe Issue -> Maybe IssueLabel -> IssueEvent)
-> Parser UTCTime
-> Parser (Int -> Maybe Issue -> Maybe IssueLabel -> IssueEvent)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser UTCTime
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"created_at"
        Parser (Int -> Maybe Issue -> Maybe IssueLabel -> IssueEvent)
-> Parser Int
-> Parser (Maybe Issue -> Maybe IssueLabel -> IssueEvent)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
        Parser (Maybe Issue -> Maybe IssueLabel -> IssueEvent)
-> Parser (Maybe Issue) -> Parser (Maybe IssueLabel -> IssueEvent)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Maybe Issue)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"issue"
        Parser (Maybe IssueLabel -> IssueEvent)
-> Parser (Maybe IssueLabel) -> Parser IssueEvent
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Maybe IssueLabel)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"label"

instance FromJSON EventType where
    parseJSON :: Value -> Parser EventType
parseJSON = String -> (Text -> Parser EventType) -> Value -> Parser EventType
forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"EventType" ((Text -> Parser EventType) -> Value -> Parser EventType)
-> (Text -> Parser EventType) -> Value -> Parser EventType
forall a b. (a -> b) -> a -> b
$ \Text
t -> case Text -> Text
T.toLower Text
t of
        Text
"closed"                   -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Closed
        Text
"reopened"                 -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Reopened
        Text
"subscribed"               -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Subscribed
        Text
"merged"                   -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Merged
        Text
"referenced"               -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Referenced
        Text
"mentioned"                -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Mentioned
        Text
"assigned"                 -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Assigned
        Text
"unassigned"               -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
ActorUnassigned
        Text
"labeled"                  -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Labeled
        Text
"unlabeled"                -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Unlabeled
        Text
"milestoned"               -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Milestoned
        Text
"demilestoned"             -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Demilestoned
        Text
"renamed"                  -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Renamed
        Text
"locked"                   -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Locked
        Text
"unlocked"                 -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Unlocked
        Text
"head_ref_deleted"         -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
HeadRefDeleted
        Text
"head_ref_restored"        -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
HeadRefRestored
        Text
"review_requested"         -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
ReviewRequested
        Text
"review_dismissed"         -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
ReviewDismissed
        Text
"review_request_removed"   -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
ReviewRequestRemoved
        Text
"marked_as_duplicate"      -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
MarkedAsDuplicate
        Text
"unmarked_as_duplicate"    -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
UnmarkedAsDuplicate
        Text
"added_to_project"         -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
AddedToProject
        Text
"moved_columns_in_project" -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
MovedColumnsInProject
        Text
"removed_from_project"     -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
RemovedFromProject
        Text
"converted_note_to_issue"  -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
ConvertedNoteToIssue
        Text
"unsubscribed"             -> EventType -> Parser EventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EventType
Unsubscribed -- not in api docs list
        Text
_                          -> String -> Parser EventType
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail (String -> Parser EventType) -> String -> Parser EventType
forall a b. (a -> b) -> a -> b
$ String
"Unknown EventType: " String -> ShowS
forall a. Semigroup a => a -> a -> a
<> Text -> String
T.unpack Text
t

instance FromJSON IssueComment where
    parseJSON :: Value -> Parser IssueComment
parseJSON = String
-> (Object -> Parser IssueComment) -> Value -> Parser IssueComment
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"IssueComment" ((Object -> Parser IssueComment) -> Value -> Parser IssueComment)
-> (Object -> Parser IssueComment) -> Value -> Parser IssueComment
forall a b. (a -> b) -> a -> b
$ \Object
o -> UTCTime
-> SimpleUser
-> URL
-> URL
-> UTCTime
-> Text
-> Int
-> IssueComment
IssueComment
        (UTCTime
 -> SimpleUser
 -> URL
 -> URL
 -> UTCTime
 -> Text
 -> Int
 -> IssueComment)
-> Parser UTCTime
-> Parser
     (SimpleUser
      -> URL -> URL -> UTCTime -> Text -> Int -> IssueComment)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser UTCTime
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"updated_at"
        Parser
  (SimpleUser
   -> URL -> URL -> UTCTime -> Text -> Int -> IssueComment)
-> Parser SimpleUser
-> Parser (URL -> URL -> UTCTime -> Text -> Int -> IssueComment)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser SimpleUser
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"user"
        Parser (URL -> URL -> UTCTime -> Text -> Int -> IssueComment)
-> Parser URL
-> Parser (URL -> UTCTime -> Text -> Int -> IssueComment)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"url"
        Parser (URL -> UTCTime -> Text -> Int -> IssueComment)
-> Parser URL -> Parser (UTCTime -> Text -> Int -> IssueComment)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"html_url"
        Parser (UTCTime -> Text -> Int -> IssueComment)
-> Parser UTCTime -> Parser (Text -> Int -> IssueComment)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser UTCTime
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"created_at"
        Parser (Text -> Int -> IssueComment)
-> Parser Text -> Parser (Int -> IssueComment)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"body"
        Parser (Int -> IssueComment) -> Parser Int -> Parser IssueComment
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"

instance FromJSON Issue where
    parseJSON :: Value -> Parser Issue
parseJSON = String -> (Object -> Parser Issue) -> Value -> Parser Issue
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"Issue" ((Object -> Parser Issue) -> Value -> Parser Issue)
-> (Object -> Parser Issue) -> Value -> Parser Issue
forall a b. (a -> b) -> a -> b
$ \Object
o -> Maybe UTCTime
-> UTCTime
-> URL
-> Maybe URL
-> Maybe SimpleUser
-> Vector IssueLabel
-> IssueNumber
-> Vector SimpleUser
-> SimpleUser
-> Text
-> Maybe PullRequestReference
-> URL
-> UTCTime
-> Maybe Text
-> IssueState
-> Id Issue
-> Int
-> Maybe Milestone
-> Maybe IssueStateReason
-> Issue
Issue
        (Maybe UTCTime
 -> UTCTime
 -> URL
 -> Maybe URL
 -> Maybe SimpleUser
 -> Vector IssueLabel
 -> IssueNumber
 -> Vector SimpleUser
 -> SimpleUser
 -> Text
 -> Maybe PullRequestReference
 -> URL
 -> UTCTime
 -> Maybe Text
 -> IssueState
 -> Id Issue
 -> Int
 -> Maybe Milestone
 -> Maybe IssueStateReason
 -> Issue)
-> Parser (Maybe UTCTime)
-> Parser
     (UTCTime
      -> URL
      -> Maybe URL
      -> Maybe SimpleUser
      -> Vector IssueLabel
      -> IssueNumber
      -> Vector SimpleUser
      -> SimpleUser
      -> Text
      -> Maybe PullRequestReference
      -> URL
      -> UTCTime
      -> Maybe Text
      -> IssueState
      -> Id Issue
      -> Int
      -> Maybe Milestone
      -> Maybe IssueStateReason
      -> Issue)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser (Maybe UTCTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"closed_at"
        Parser
  (UTCTime
   -> URL
   -> Maybe URL
   -> Maybe SimpleUser
   -> Vector IssueLabel
   -> IssueNumber
   -> Vector SimpleUser
   -> SimpleUser
   -> Text
   -> Maybe PullRequestReference
   -> URL
   -> UTCTime
   -> Maybe Text
   -> IssueState
   -> Id Issue
   -> Int
   -> Maybe Milestone
   -> Maybe IssueStateReason
   -> Issue)
-> Parser UTCTime
-> Parser
     (URL
      -> Maybe URL
      -> Maybe SimpleUser
      -> Vector IssueLabel
      -> IssueNumber
      -> Vector SimpleUser
      -> SimpleUser
      -> Text
      -> Maybe PullRequestReference
      -> URL
      -> UTCTime
      -> Maybe Text
      -> IssueState
      -> Id Issue
      -> Int
      -> Maybe Milestone
      -> Maybe IssueStateReason
      -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser UTCTime
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"updated_at"
        Parser
  (URL
   -> Maybe URL
   -> Maybe SimpleUser
   -> Vector IssueLabel
   -> IssueNumber
   -> Vector SimpleUser
   -> SimpleUser
   -> Text
   -> Maybe PullRequestReference
   -> URL
   -> UTCTime
   -> Maybe Text
   -> IssueState
   -> Id Issue
   -> Int
   -> Maybe Milestone
   -> Maybe IssueStateReason
   -> Issue)
-> Parser URL
-> Parser
     (Maybe URL
      -> Maybe SimpleUser
      -> Vector IssueLabel
      -> IssueNumber
      -> Vector SimpleUser
      -> SimpleUser
      -> Text
      -> Maybe PullRequestReference
      -> URL
      -> UTCTime
      -> Maybe Text
      -> IssueState
      -> Id Issue
      -> Int
      -> Maybe Milestone
      -> Maybe IssueStateReason
      -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"events_url"
        Parser
  (Maybe URL
   -> Maybe SimpleUser
   -> Vector IssueLabel
   -> IssueNumber
   -> Vector SimpleUser
   -> SimpleUser
   -> Text
   -> Maybe PullRequestReference
   -> URL
   -> UTCTime
   -> Maybe Text
   -> IssueState
   -> Id Issue
   -> Int
   -> Maybe Milestone
   -> Maybe IssueStateReason
   -> Issue)
-> Parser (Maybe URL)
-> Parser
     (Maybe SimpleUser
      -> Vector IssueLabel
      -> IssueNumber
      -> Vector SimpleUser
      -> SimpleUser
      -> Text
      -> Maybe PullRequestReference
      -> URL
      -> UTCTime
      -> Maybe Text
      -> IssueState
      -> Id Issue
      -> Int
      -> Maybe Milestone
      -> Maybe IssueStateReason
      -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Maybe URL)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"html_url"
        Parser
  (Maybe SimpleUser
   -> Vector IssueLabel
   -> IssueNumber
   -> Vector SimpleUser
   -> SimpleUser
   -> Text
   -> Maybe PullRequestReference
   -> URL
   -> UTCTime
   -> Maybe Text
   -> IssueState
   -> Id Issue
   -> Int
   -> Maybe Milestone
   -> Maybe IssueStateReason
   -> Issue)
-> Parser (Maybe SimpleUser)
-> Parser
     (Vector IssueLabel
      -> IssueNumber
      -> Vector SimpleUser
      -> SimpleUser
      -> Text
      -> Maybe PullRequestReference
      -> URL
      -> UTCTime
      -> Maybe Text
      -> IssueState
      -> Id Issue
      -> Int
      -> Maybe Milestone
      -> Maybe IssueStateReason
      -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Maybe SimpleUser)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"closed_by"
        Parser
  (Vector IssueLabel
   -> IssueNumber
   -> Vector SimpleUser
   -> SimpleUser
   -> Text
   -> Maybe PullRequestReference
   -> URL
   -> UTCTime
   -> Maybe Text
   -> IssueState
   -> Id Issue
   -> Int
   -> Maybe Milestone
   -> Maybe IssueStateReason
   -> Issue)
-> Parser (Vector IssueLabel)
-> Parser
     (IssueNumber
      -> Vector SimpleUser
      -> SimpleUser
      -> Text
      -> Maybe PullRequestReference
      -> URL
      -> UTCTime
      -> Maybe Text
      -> IssueState
      -> Id Issue
      -> Int
      -> Maybe Milestone
      -> Maybe IssueStateReason
      -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Vector IssueLabel)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"labels"
        Parser
  (IssueNumber
   -> Vector SimpleUser
   -> SimpleUser
   -> Text
   -> Maybe PullRequestReference
   -> URL
   -> UTCTime
   -> Maybe Text
   -> IssueState
   -> Id Issue
   -> Int
   -> Maybe Milestone
   -> Maybe IssueStateReason
   -> Issue)
-> Parser IssueNumber
-> Parser
     (Vector SimpleUser
      -> SimpleUser
      -> Text
      -> Maybe PullRequestReference
      -> URL
      -> UTCTime
      -> Maybe Text
      -> IssueState
      -> Id Issue
      -> Int
      -> Maybe Milestone
      -> Maybe IssueStateReason
      -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser IssueNumber
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"number"
        Parser
  (Vector SimpleUser
   -> SimpleUser
   -> Text
   -> Maybe PullRequestReference
   -> URL
   -> UTCTime
   -> Maybe Text
   -> IssueState
   -> Id Issue
   -> Int
   -> Maybe Milestone
   -> Maybe IssueStateReason
   -> Issue)
-> Parser (Vector SimpleUser)
-> Parser
     (SimpleUser
      -> Text
      -> Maybe PullRequestReference
      -> URL
      -> UTCTime
      -> Maybe Text
      -> IssueState
      -> Id Issue
      -> Int
      -> Maybe Milestone
      -> Maybe IssueStateReason
      -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Vector SimpleUser)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"assignees"
        Parser
  (SimpleUser
   -> Text
   -> Maybe PullRequestReference
   -> URL
   -> UTCTime
   -> Maybe Text
   -> IssueState
   -> Id Issue
   -> Int
   -> Maybe Milestone
   -> Maybe IssueStateReason
   -> Issue)
-> Parser SimpleUser
-> Parser
     (Text
      -> Maybe PullRequestReference
      -> URL
      -> UTCTime
      -> Maybe Text
      -> IssueState
      -> Id Issue
      -> Int
      -> Maybe Milestone
      -> Maybe IssueStateReason
      -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser SimpleUser
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"user"
        Parser
  (Text
   -> Maybe PullRequestReference
   -> URL
   -> UTCTime
   -> Maybe Text
   -> IssueState
   -> Id Issue
   -> Int
   -> Maybe Milestone
   -> Maybe IssueStateReason
   -> Issue)
-> Parser Text
-> Parser
     (Maybe PullRequestReference
      -> URL
      -> UTCTime
      -> Maybe Text
      -> IssueState
      -> Id Issue
      -> Int
      -> Maybe Milestone
      -> Maybe IssueStateReason
      -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"title"
        Parser
  (Maybe PullRequestReference
   -> URL
   -> UTCTime
   -> Maybe Text
   -> IssueState
   -> Id Issue
   -> Int
   -> Maybe Milestone
   -> Maybe IssueStateReason
   -> Issue)
-> Parser (Maybe PullRequestReference)
-> Parser
     (URL
      -> UTCTime
      -> Maybe Text
      -> IssueState
      -> Id Issue
      -> Int
      -> Maybe Milestone
      -> Maybe IssueStateReason
      -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Maybe PullRequestReference)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"pull_request"
        Parser
  (URL
   -> UTCTime
   -> Maybe Text
   -> IssueState
   -> Id Issue
   -> Int
   -> Maybe Milestone
   -> Maybe IssueStateReason
   -> Issue)
-> Parser URL
-> Parser
     (UTCTime
      -> Maybe Text
      -> IssueState
      -> Id Issue
      -> Int
      -> Maybe Milestone
      -> Maybe IssueStateReason
      -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"url"
        Parser
  (UTCTime
   -> Maybe Text
   -> IssueState
   -> Id Issue
   -> Int
   -> Maybe Milestone
   -> Maybe IssueStateReason
   -> Issue)
-> Parser UTCTime
-> Parser
     (Maybe Text
      -> IssueState
      -> Id Issue
      -> Int
      -> Maybe Milestone
      -> Maybe IssueStateReason
      -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser UTCTime
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"created_at"
        Parser
  (Maybe Text
   -> IssueState
   -> Id Issue
   -> Int
   -> Maybe Milestone
   -> Maybe IssueStateReason
   -> Issue)
-> Parser (Maybe Text)
-> Parser
     (IssueState
      -> Id Issue
      -> Int
      -> Maybe Milestone
      -> Maybe IssueStateReason
      -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"body"
        Parser
  (IssueState
   -> Id Issue
   -> Int
   -> Maybe Milestone
   -> Maybe IssueStateReason
   -> Issue)
-> Parser IssueState
-> Parser
     (Id Issue
      -> Int -> Maybe Milestone -> Maybe IssueStateReason -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser IssueState
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"state"
        Parser
  (Id Issue
   -> Int -> Maybe Milestone -> Maybe IssueStateReason -> Issue)
-> Parser (Id Issue)
-> Parser
     (Int -> Maybe Milestone -> Maybe IssueStateReason -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Id Issue)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
        Parser (Int -> Maybe Milestone -> Maybe IssueStateReason -> Issue)
-> Parser Int
-> Parser (Maybe Milestone -> Maybe IssueStateReason -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"comments"
        Parser (Maybe Milestone -> Maybe IssueStateReason -> Issue)
-> Parser (Maybe Milestone)
-> Parser (Maybe IssueStateReason -> Issue)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Maybe Milestone)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"milestone"
        Parser (Maybe IssueStateReason -> Issue)
-> Parser (Maybe IssueStateReason) -> Parser Issue
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Maybe IssueStateReason)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"state_reason"

instance ToJSON NewIssue where
    toJSON :: NewIssue -> Value
toJSON (NewIssue Text
t Maybe Text
b Vector (Name User)
a Maybe (Id Milestone)
m Maybe (Vector (Name IssueLabel))
ls) = [Pair] -> Value
object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$ (Pair -> Bool) -> [Pair] -> [Pair]
forall a. (a -> Bool) -> [a] -> [a]
filter Pair -> Bool
forall {a}. (a, Value) -> Bool
notNull
        [ Key
"title"     Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
.= Text
t
        , Key
"body"      Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
.= Maybe Text
b
        , Key
"assignees" Key -> Vector (Name User) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
.= Vector (Name User)
a
        , Key
"milestone" Key -> Maybe (Id Milestone) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
.= Maybe (Id Milestone)
m
        , Key
"labels"    Key -> Maybe (Vector (Name IssueLabel)) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
.= Maybe (Vector (Name IssueLabel))
ls
        ]
      where
        notNull :: (a, Value) -> Bool
notNull (a
_, Value
Null) = Bool
False
        notNull (a
_, Value
_)    = Bool
True

instance ToJSON EditIssue where
    toJSON :: EditIssue -> Value
toJSON (EditIssue Maybe Text
t Maybe Text
b Maybe (Vector (Name User))
a Maybe IssueState
s Maybe (Id Milestone)
m Maybe (Vector (Name IssueLabel))
ls) = [Pair] -> Value
object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$ (Pair -> Bool) -> [Pair] -> [Pair]
forall a. (a -> Bool) -> [a] -> [a]
filter Pair -> Bool
forall {a}. (a, Value) -> Bool
notNull
        [ Key
"title"     Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
.= Maybe Text
t
        , Key
"body"      Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
.= Maybe Text
b
        , Key
"assignees" Key -> Maybe (Vector (Name User)) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
.= Maybe (Vector (Name User))
a
        , Key
"state"     Key -> Maybe IssueState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
.= Maybe IssueState
s
        , Key
"milestone" Key -> Maybe (Id Milestone) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
.= Maybe (Id Milestone)
m
        , Key
"labels"    Key -> Maybe (Vector (Name IssueLabel)) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
.= Maybe (Vector (Name IssueLabel))
ls
        ]
      where
        notNull :: (a, Value) -> Bool
notNull (a
_, Value
Null) = Bool
False
        notNull (a
_, Value
_)    = Bool
True