{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards   #-}
{-# LANGUAGE StrictData        #-}
module GitHub.Types.Events.PushEvent where

import           Data.Aeson                (FromJSON (..), ToJSON (..), object)
import           Data.Aeson.Types          (Value (..), (.:), (.:?), (.=))
import           Data.Text                 (Text)
import           Test.QuickCheck.Arbitrary (Arbitrary (..))

import           GitHub.Types.Base
import           GitHub.Types.Event


data PushEvent = PushEvent
    { PushEvent -> Maybe Installation
pushEventInstallation    :: Maybe Installation
    , PushEvent -> Organization
pushEventOrganization    :: Organization
    , PushEvent -> Repository
pushEventRepository      :: Repository
    , PushEvent -> User
pushEventSender          :: User

    , PushEvent -> Text
pushEventAfter           :: Text
    , PushEvent -> Maybe Text
pushEventBaseRef         :: Maybe Text
    , PushEvent -> Text
pushEventBefore          :: Text
    , PushEvent -> [PushCommit]
pushEventCommits         :: [PushCommit]
    , PushEvent -> Text
pushEventCompare         :: Text
    , PushEvent -> Bool
pushEventCreated         :: Bool
    , PushEvent -> Bool
pushEventDeleted         :: Bool
    , PushEvent -> Maybe [PushCommit]
pushEventDistinctCommits :: Maybe [PushCommit]
    , PushEvent -> Bool
pushEventForced          :: Bool
    , PushEvent -> Maybe PushCommit
pushEventHeadCommit      :: Maybe PushCommit
    , PushEvent -> UserRef
pushEventPusher          :: UserRef
    , PushEvent -> Text
pushEventRef             :: Text
    , PushEvent -> Maybe Text
pushEventRefName         :: Maybe Text
    } deriving (PushEvent -> PushEvent -> Bool
(PushEvent -> PushEvent -> Bool)
-> (PushEvent -> PushEvent -> Bool) -> Eq PushEvent
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
(Int -> PushEvent -> ShowS)
-> (PushEvent -> String)
-> ([PushEvent] -> ShowS)
-> Show PushEvent
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, ReadPrec [PushEvent]
ReadPrec PushEvent
Int -> ReadS PushEvent
ReadS [PushEvent]
(Int -> ReadS PushEvent)
-> ReadS [PushEvent]
-> ReadPrec PushEvent
-> ReadPrec [PushEvent]
-> Read PushEvent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PushEvent]
$creadListPrec :: ReadPrec [PushEvent]
readPrec :: ReadPrec PushEvent
$creadPrec :: ReadPrec PushEvent
readList :: ReadS [PushEvent]
$creadList :: ReadS [PushEvent]
readsPrec :: Int -> ReadS PushEvent
$creadsPrec :: Int -> ReadS PushEvent
Read)

instance Event PushEvent where
    typeName :: TypeName PushEvent
typeName = Text -> TypeName PushEvent
forall a. Text -> TypeName a
TypeName Text
"PushEvent"
    eventName :: EventName PushEvent
eventName = Text -> EventName PushEvent
forall a. Text -> EventName a
EventName Text
"push"

instance FromJSON PushEvent where
    parseJSON :: Value -> Parser PushEvent
parseJSON (Object Object
x) = Maybe Installation
-> Organization
-> Repository
-> User
-> Text
-> Maybe Text
-> Text
-> [PushCommit]
-> Text
-> Bool
-> Bool
-> Maybe [PushCommit]
-> Bool
-> Maybe PushCommit
-> UserRef
-> Text
-> Maybe Text
-> PushEvent
PushEvent
        (Maybe Installation
 -> Organization
 -> Repository
 -> User
 -> Text
 -> Maybe Text
 -> Text
 -> [PushCommit]
 -> Text
 -> Bool
 -> Bool
 -> Maybe [PushCommit]
 -> Bool
 -> Maybe PushCommit
 -> UserRef
 -> Text
 -> Maybe Text
 -> PushEvent)
-> Parser (Maybe Installation)
-> Parser
     (Organization
      -> Repository
      -> User
      -> Text
      -> Maybe Text
      -> Text
      -> [PushCommit]
      -> Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
x Object -> Key -> Parser (Maybe Installation)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"installation"
        Parser
  (Organization
   -> Repository
   -> User
   -> Text
   -> Maybe Text
   -> Text
   -> [PushCommit]
   -> Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Parser Organization
-> Parser
     (Repository
      -> User
      -> Text
      -> Maybe Text
      -> Text
      -> [PushCommit]
      -> Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser Organization
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"organization"
        Parser
  (Repository
   -> User
   -> Text
   -> Maybe Text
   -> Text
   -> [PushCommit]
   -> Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Parser Repository
-> Parser
     (User
      -> Text
      -> Maybe Text
      -> Text
      -> [PushCommit]
      -> Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser Repository
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository"
        Parser
  (User
   -> Text
   -> Maybe Text
   -> Text
   -> [PushCommit]
   -> Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Parser User
-> Parser
     (Text
      -> Maybe Text
      -> Text
      -> [PushCommit]
      -> Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser User
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sender"

        Parser
  (Text
   -> Maybe Text
   -> Text
   -> [PushCommit]
   -> Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Parser Text
-> Parser
     (Maybe Text
      -> Text
      -> [PushCommit]
      -> Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"after"
        Parser
  (Maybe Text
   -> Text
   -> [PushCommit]
   -> Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> [PushCommit]
      -> Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"base_ref"
        Parser
  (Text
   -> [PushCommit]
   -> Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Parser Text
-> Parser
     ([PushCommit]
      -> Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"before"
        Parser
  ([PushCommit]
   -> Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Parser [PushCommit]
-> Parser
     (Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser [PushCommit]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"commits"
        Parser
  (Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Parser Text
-> Parser
     (Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"compare"
        Parser
  (Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Parser Bool
-> Parser
     (Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"created"
        Parser
  (Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Parser Bool
-> Parser
     (Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"deleted"
        Parser
  (Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Parser (Maybe [PushCommit])
-> Parser
     (Bool
      -> Maybe PushCommit -> UserRef -> Text -> Maybe Text -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser (Maybe [PushCommit])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"distinct_commits"
        Parser
  (Bool
   -> Maybe PushCommit -> UserRef -> Text -> Maybe Text -> PushEvent)
-> Parser Bool
-> Parser
     (Maybe PushCommit -> UserRef -> Text -> Maybe Text -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"forced"
        Parser
  (Maybe PushCommit -> UserRef -> Text -> Maybe Text -> PushEvent)
-> Parser (Maybe PushCommit)
-> Parser (UserRef -> Text -> Maybe Text -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser (Maybe PushCommit)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"head_commit"
        Parser (UserRef -> Text -> Maybe Text -> PushEvent)
-> Parser UserRef -> Parser (Text -> Maybe Text -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser UserRef
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"pusher"
        Parser (Text -> Maybe Text -> PushEvent)
-> Parser Text -> Parser (Maybe Text -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"ref"
        Parser (Maybe Text -> PushEvent)
-> Parser (Maybe Text) -> Parser PushEvent
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
x Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ref_name"

    parseJSON Value
_ = String -> Parser PushEvent
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"PushEvent"

instance ToJSON PushEvent where
    toJSON :: PushEvent -> Value
toJSON PushEvent{Bool
[PushCommit]
Maybe [PushCommit]
Maybe Text
Maybe Installation
Maybe PushCommit
Text
Organization
User
UserRef
Repository
pushEventRefName :: Maybe Text
pushEventRef :: Text
pushEventPusher :: UserRef
pushEventHeadCommit :: Maybe PushCommit
pushEventForced :: Bool
pushEventDistinctCommits :: Maybe [PushCommit]
pushEventDeleted :: Bool
pushEventCreated :: Bool
pushEventCompare :: Text
pushEventCommits :: [PushCommit]
pushEventBefore :: Text
pushEventBaseRef :: Maybe Text
pushEventAfter :: Text
pushEventSender :: User
pushEventRepository :: Repository
pushEventOrganization :: Organization
pushEventInstallation :: Maybe Installation
pushEventRefName :: PushEvent -> Maybe Text
pushEventRef :: PushEvent -> Text
pushEventPusher :: PushEvent -> UserRef
pushEventHeadCommit :: PushEvent -> Maybe PushCommit
pushEventForced :: PushEvent -> Bool
pushEventDistinctCommits :: PushEvent -> Maybe [PushCommit]
pushEventDeleted :: PushEvent -> Bool
pushEventCreated :: PushEvent -> Bool
pushEventCompare :: PushEvent -> Text
pushEventCommits :: PushEvent -> [PushCommit]
pushEventBefore :: PushEvent -> Text
pushEventBaseRef :: PushEvent -> Maybe Text
pushEventAfter :: PushEvent -> Text
pushEventSender :: PushEvent -> User
pushEventRepository :: PushEvent -> Repository
pushEventOrganization :: PushEvent -> Organization
pushEventInstallation :: PushEvent -> Maybe Installation
..} = [Pair] -> Value
object
        [ Key
"installation"     Key -> Maybe Installation -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Installation
pushEventInstallation
        , Key
"organization"     Key -> Organization -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Organization
pushEventOrganization
        , Key
"repository"       Key -> Repository -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Repository
pushEventRepository
        , Key
"sender"           Key -> User -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= User
pushEventSender

        , Key
"after"            Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pushEventAfter
        , Key
"base_ref"         Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
pushEventBaseRef
        , Key
"before"           Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pushEventBefore
        , Key
"commits"          Key -> [PushCommit] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [PushCommit]
pushEventCommits
        , Key
"compare"          Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pushEventCompare
        , Key
"created"          Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bool
pushEventCreated
        , Key
"deleted"          Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bool
pushEventDeleted
        , Key
"distinct_commits" Key -> Maybe [PushCommit] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [PushCommit]
pushEventDistinctCommits
        , Key
"forced"           Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bool
pushEventForced
        , Key
"head_commit"      Key -> Maybe PushCommit -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe PushCommit
pushEventHeadCommit
        , Key
"pusher"           Key -> UserRef -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= UserRef
pushEventPusher
        , Key
"ref"              Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pushEventRef
        , Key
"ref_name"         Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
pushEventRefName
        ]


instance Arbitrary PushEvent where
    arbitrary :: Gen PushEvent
arbitrary = Maybe Installation
-> Organization
-> Repository
-> User
-> Text
-> Maybe Text
-> Text
-> [PushCommit]
-> Text
-> Bool
-> Bool
-> Maybe [PushCommit]
-> Bool
-> Maybe PushCommit
-> UserRef
-> Text
-> Maybe Text
-> PushEvent
PushEvent
        (Maybe Installation
 -> Organization
 -> Repository
 -> User
 -> Text
 -> Maybe Text
 -> Text
 -> [PushCommit]
 -> Text
 -> Bool
 -> Bool
 -> Maybe [PushCommit]
 -> Bool
 -> Maybe PushCommit
 -> UserRef
 -> Text
 -> Maybe Text
 -> PushEvent)
-> Gen (Maybe Installation)
-> Gen
     (Organization
      -> Repository
      -> User
      -> Text
      -> Maybe Text
      -> Text
      -> [PushCommit]
      -> Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Maybe Installation)
forall a. Arbitrary a => Gen a
arbitrary
        Gen
  (Organization
   -> Repository
   -> User
   -> Text
   -> Maybe Text
   -> Text
   -> [PushCommit]
   -> Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Gen Organization
-> Gen
     (Repository
      -> User
      -> Text
      -> Maybe Text
      -> Text
      -> [PushCommit]
      -> Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen Organization
forall a. Arbitrary a => Gen a
arbitrary
        Gen
  (Repository
   -> User
   -> Text
   -> Maybe Text
   -> Text
   -> [PushCommit]
   -> Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Gen Repository
-> Gen
     (User
      -> Text
      -> Maybe Text
      -> Text
      -> [PushCommit]
      -> Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen Repository
forall a. Arbitrary a => Gen a
arbitrary
        Gen
  (User
   -> Text
   -> Maybe Text
   -> Text
   -> [PushCommit]
   -> Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Gen User
-> Gen
     (Text
      -> Maybe Text
      -> Text
      -> [PushCommit]
      -> Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen User
forall a. Arbitrary a => Gen a
arbitrary

        Gen
  (Text
   -> Maybe Text
   -> Text
   -> [PushCommit]
   -> Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Gen Text
-> Gen
     (Maybe Text
      -> Text
      -> [PushCommit]
      -> Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen Text
forall a. Arbitrary a => Gen a
arbitrary
        Gen
  (Maybe Text
   -> Text
   -> [PushCommit]
   -> Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Gen (Maybe Text)
-> Gen
     (Text
      -> [PushCommit]
      -> Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (Maybe Text)
forall a. Arbitrary a => Gen a
arbitrary
        Gen
  (Text
   -> [PushCommit]
   -> Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Gen Text
-> Gen
     ([PushCommit]
      -> Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen Text
forall a. Arbitrary a => Gen a
arbitrary
        Gen
  ([PushCommit]
   -> Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Gen [PushCommit]
-> Gen
     (Text
      -> Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen [PushCommit]
forall a. Arbitrary a => Gen a
arbitrary
        Gen
  (Text
   -> Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Gen Text
-> Gen
     (Bool
      -> Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen Text
forall a. Arbitrary a => Gen a
arbitrary
        Gen
  (Bool
   -> Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Gen Bool
-> Gen
     (Bool
      -> Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen Bool
forall a. Arbitrary a => Gen a
arbitrary
        Gen
  (Bool
   -> Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Gen Bool
-> Gen
     (Maybe [PushCommit]
      -> Bool
      -> Maybe PushCommit
      -> UserRef
      -> Text
      -> Maybe Text
      -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen Bool
forall a. Arbitrary a => Gen a
arbitrary
        Gen
  (Maybe [PushCommit]
   -> Bool
   -> Maybe PushCommit
   -> UserRef
   -> Text
   -> Maybe Text
   -> PushEvent)
-> Gen (Maybe [PushCommit])
-> Gen
     (Bool
      -> Maybe PushCommit -> UserRef -> Text -> Maybe Text -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (Maybe [PushCommit])
forall a. Arbitrary a => Gen a
arbitrary
        Gen
  (Bool
   -> Maybe PushCommit -> UserRef -> Text -> Maybe Text -> PushEvent)
-> Gen Bool
-> Gen
     (Maybe PushCommit -> UserRef -> Text -> Maybe Text -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen Bool
forall a. Arbitrary a => Gen a
arbitrary
        Gen
  (Maybe PushCommit -> UserRef -> Text -> Maybe Text -> PushEvent)
-> Gen (Maybe PushCommit)
-> Gen (UserRef -> Text -> Maybe Text -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (Maybe PushCommit)
forall a. Arbitrary a => Gen a
arbitrary
        Gen (UserRef -> Text -> Maybe Text -> PushEvent)
-> Gen UserRef -> Gen (Text -> Maybe Text -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen UserRef
forall a. Arbitrary a => Gen a
arbitrary
        Gen (Text -> Maybe Text -> PushEvent)
-> Gen Text -> Gen (Maybe Text -> PushEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen Text
forall a. Arbitrary a => Gen a
arbitrary
        Gen (Maybe Text -> PushEvent) -> Gen (Maybe Text) -> Gen PushEvent
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (Maybe Text)
forall a. Arbitrary a => Gen a
arbitrary