-----------------------------------------------------------------------------
-- |
-- License     :  BSD-3-Clause
-- Maintainer  :  Oleg Grenrus <oleg.grenrus@iki.fi>
--
module GitHub.Data.Definitions where

import GitHub.Internal.Prelude
import Prelude ()

import Control.Monad       (mfilter)
import Data.Aeson.Types    (Parser)
import Network.HTTP.Client (HttpException)

import qualified Control.Exception as E
import qualified Data.ByteString   as BS
import qualified Data.Text         as T

import GitHub.Data.Id   (Id)
import GitHub.Data.Name (Name)
import GitHub.Data.URL  (URL (..))

-- | Errors have been tagged according to their source, so you can more easily
-- dispatch and handle them.
data Error
    = HTTPError !HttpException -- ^ A HTTP error occurred. The actual caught error is included.
    | ParseError !Text -- ^ An error in the parser itself.
    | JsonError !Text -- ^ The JSON is malformed or unexpected.
    | UserError !Text -- ^ Incorrect input.
    deriving (Int -> Error -> ShowS
[Error] -> ShowS
Error -> String
(Int -> Error -> ShowS)
-> (Error -> String) -> ([Error] -> ShowS) -> Show Error
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Error] -> ShowS
$cshowList :: [Error] -> ShowS
show :: Error -> String
$cshow :: Error -> String
showsPrec :: Int -> Error -> ShowS
$cshowsPrec :: Int -> Error -> ShowS
Show, Typeable)

instance E.Exception Error

-- | Type of the repository owners.
data OwnerType = OwnerUser | OwnerOrganization | OwnerBot
    deriving (OwnerType -> OwnerType -> Bool
(OwnerType -> OwnerType -> Bool)
-> (OwnerType -> OwnerType -> Bool) -> Eq OwnerType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OwnerType -> OwnerType -> Bool
$c/= :: OwnerType -> OwnerType -> Bool
== :: OwnerType -> OwnerType -> Bool
$c== :: OwnerType -> OwnerType -> Bool
Eq, Eq OwnerType
Eq OwnerType
-> (OwnerType -> OwnerType -> Ordering)
-> (OwnerType -> OwnerType -> Bool)
-> (OwnerType -> OwnerType -> Bool)
-> (OwnerType -> OwnerType -> Bool)
-> (OwnerType -> OwnerType -> Bool)
-> (OwnerType -> OwnerType -> OwnerType)
-> (OwnerType -> OwnerType -> OwnerType)
-> Ord OwnerType
OwnerType -> OwnerType -> Bool
OwnerType -> OwnerType -> Ordering
OwnerType -> OwnerType -> OwnerType
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: OwnerType -> OwnerType -> OwnerType
$cmin :: OwnerType -> OwnerType -> OwnerType
max :: OwnerType -> OwnerType -> OwnerType
$cmax :: OwnerType -> OwnerType -> OwnerType
>= :: OwnerType -> OwnerType -> Bool
$c>= :: OwnerType -> OwnerType -> Bool
> :: OwnerType -> OwnerType -> Bool
$c> :: OwnerType -> OwnerType -> Bool
<= :: OwnerType -> OwnerType -> Bool
$c<= :: OwnerType -> OwnerType -> Bool
< :: OwnerType -> OwnerType -> Bool
$c< :: OwnerType -> OwnerType -> Bool
compare :: OwnerType -> OwnerType -> Ordering
$ccompare :: OwnerType -> OwnerType -> Ordering
$cp1Ord :: Eq OwnerType
Ord, Int -> OwnerType
OwnerType -> Int
OwnerType -> [OwnerType]
OwnerType -> OwnerType
OwnerType -> OwnerType -> [OwnerType]
OwnerType -> OwnerType -> OwnerType -> [OwnerType]
(OwnerType -> OwnerType)
-> (OwnerType -> OwnerType)
-> (Int -> OwnerType)
-> (OwnerType -> Int)
-> (OwnerType -> [OwnerType])
-> (OwnerType -> OwnerType -> [OwnerType])
-> (OwnerType -> OwnerType -> [OwnerType])
-> (OwnerType -> OwnerType -> OwnerType -> [OwnerType])
-> Enum OwnerType
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: OwnerType -> OwnerType -> OwnerType -> [OwnerType]
$cenumFromThenTo :: OwnerType -> OwnerType -> OwnerType -> [OwnerType]
enumFromTo :: OwnerType -> OwnerType -> [OwnerType]
$cenumFromTo :: OwnerType -> OwnerType -> [OwnerType]
enumFromThen :: OwnerType -> OwnerType -> [OwnerType]
$cenumFromThen :: OwnerType -> OwnerType -> [OwnerType]
enumFrom :: OwnerType -> [OwnerType]
$cenumFrom :: OwnerType -> [OwnerType]
fromEnum :: OwnerType -> Int
$cfromEnum :: OwnerType -> Int
toEnum :: Int -> OwnerType
$ctoEnum :: Int -> OwnerType
pred :: OwnerType -> OwnerType
$cpred :: OwnerType -> OwnerType
succ :: OwnerType -> OwnerType
$csucc :: OwnerType -> OwnerType
Enum, OwnerType
OwnerType -> OwnerType -> Bounded OwnerType
forall a. a -> a -> Bounded a
maxBound :: OwnerType
$cmaxBound :: OwnerType
minBound :: OwnerType
$cminBound :: OwnerType
Bounded, Int -> OwnerType -> ShowS
[OwnerType] -> ShowS
OwnerType -> String
(Int -> OwnerType -> ShowS)
-> (OwnerType -> String)
-> ([OwnerType] -> ShowS)
-> Show OwnerType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OwnerType] -> ShowS
$cshowList :: [OwnerType] -> ShowS
show :: OwnerType -> String
$cshow :: OwnerType -> String
showsPrec :: Int -> OwnerType -> ShowS
$cshowsPrec :: Int -> OwnerType -> ShowS
Show, ReadPrec [OwnerType]
ReadPrec OwnerType
Int -> ReadS OwnerType
ReadS [OwnerType]
(Int -> ReadS OwnerType)
-> ReadS [OwnerType]
-> ReadPrec OwnerType
-> ReadPrec [OwnerType]
-> Read OwnerType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OwnerType]
$creadListPrec :: ReadPrec [OwnerType]
readPrec :: ReadPrec OwnerType
$creadPrec :: ReadPrec OwnerType
readList :: ReadS [OwnerType]
$creadList :: ReadS [OwnerType]
readsPrec :: Int -> ReadS OwnerType
$creadsPrec :: Int -> ReadS OwnerType
Read, (forall x. OwnerType -> Rep OwnerType x)
-> (forall x. Rep OwnerType x -> OwnerType) -> Generic OwnerType
forall x. Rep OwnerType x -> OwnerType
forall x. OwnerType -> Rep OwnerType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OwnerType x -> OwnerType
$cfrom :: forall x. OwnerType -> Rep OwnerType x
Generic, Typeable, Typeable OwnerType
DataType
Constr
Typeable OwnerType
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> OwnerType -> c OwnerType)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c OwnerType)
-> (OwnerType -> Constr)
-> (OwnerType -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c OwnerType))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OwnerType))
-> ((forall b. Data b => b -> b) -> OwnerType -> OwnerType)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> OwnerType -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> OwnerType -> r)
-> (forall u. (forall d. Data d => d -> u) -> OwnerType -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> OwnerType -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> OwnerType -> m OwnerType)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> OwnerType -> m OwnerType)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> OwnerType -> m OwnerType)
-> Data OwnerType
OwnerType -> DataType
OwnerType -> Constr
(forall b. Data b => b -> b) -> OwnerType -> OwnerType
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OwnerType -> c OwnerType
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OwnerType
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) -> OwnerType -> u
forall u. (forall d. Data d => d -> u) -> OwnerType -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OwnerType -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OwnerType -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OwnerType -> m OwnerType
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OwnerType -> m OwnerType
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OwnerType
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OwnerType -> c OwnerType
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OwnerType)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OwnerType)
$cOwnerBot :: Constr
$cOwnerOrganization :: Constr
$cOwnerUser :: Constr
$tOwnerType :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> OwnerType -> m OwnerType
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OwnerType -> m OwnerType
gmapMp :: (forall d. Data d => d -> m d) -> OwnerType -> m OwnerType
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OwnerType -> m OwnerType
gmapM :: (forall d. Data d => d -> m d) -> OwnerType -> m OwnerType
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OwnerType -> m OwnerType
gmapQi :: Int -> (forall d. Data d => d -> u) -> OwnerType -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> OwnerType -> u
gmapQ :: (forall d. Data d => d -> u) -> OwnerType -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> OwnerType -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OwnerType -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OwnerType -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OwnerType -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OwnerType -> r
gmapT :: (forall b. Data b => b -> b) -> OwnerType -> OwnerType
$cgmapT :: (forall b. Data b => b -> b) -> OwnerType -> OwnerType
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OwnerType)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OwnerType)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c OwnerType)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OwnerType)
dataTypeOf :: OwnerType -> DataType
$cdataTypeOf :: OwnerType -> DataType
toConstr :: OwnerType -> Constr
$ctoConstr :: OwnerType -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OwnerType
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OwnerType
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OwnerType -> c OwnerType
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OwnerType -> c OwnerType
$cp1Data :: Typeable OwnerType
Data)

instance NFData OwnerType
instance Binary OwnerType

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

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

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

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

-- | Sometimes we don't know the type of the owner, e.g. in 'Repo'
data SimpleOwner = SimpleOwner
    { SimpleOwner -> Id Owner
simpleOwnerId        :: !(Id Owner)
    , SimpleOwner -> Name Owner
simpleOwnerLogin     :: !(Name Owner)
    , SimpleOwner -> URL
simpleOwnerUrl       :: !URL
    , SimpleOwner -> URL
simpleOwnerAvatarUrl :: !URL
    , SimpleOwner -> OwnerType
simpleOwnerType      :: !OwnerType
    }
    deriving (Int -> SimpleOwner -> ShowS
[SimpleOwner] -> ShowS
SimpleOwner -> String
(Int -> SimpleOwner -> ShowS)
-> (SimpleOwner -> String)
-> ([SimpleOwner] -> ShowS)
-> Show SimpleOwner
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SimpleOwner] -> ShowS
$cshowList :: [SimpleOwner] -> ShowS
show :: SimpleOwner -> String
$cshow :: SimpleOwner -> String
showsPrec :: Int -> SimpleOwner -> ShowS
$cshowsPrec :: Int -> SimpleOwner -> ShowS
Show, Typeable SimpleOwner
DataType
Constr
Typeable SimpleOwner
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> SimpleOwner -> c SimpleOwner)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SimpleOwner)
-> (SimpleOwner -> Constr)
-> (SimpleOwner -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SimpleOwner))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SimpleOwner))
-> ((forall b. Data b => b -> b) -> SimpleOwner -> SimpleOwner)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SimpleOwner -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SimpleOwner -> r)
-> (forall u. (forall d. Data d => d -> u) -> SimpleOwner -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> SimpleOwner -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> SimpleOwner -> m SimpleOwner)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SimpleOwner -> m SimpleOwner)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SimpleOwner -> m SimpleOwner)
-> Data SimpleOwner
SimpleOwner -> DataType
SimpleOwner -> Constr
(forall b. Data b => b -> b) -> SimpleOwner -> SimpleOwner
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SimpleOwner -> c SimpleOwner
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SimpleOwner
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) -> SimpleOwner -> u
forall u. (forall d. Data d => d -> u) -> SimpleOwner -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SimpleOwner -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SimpleOwner -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SimpleOwner -> m SimpleOwner
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SimpleOwner -> m SimpleOwner
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SimpleOwner
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SimpleOwner -> c SimpleOwner
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SimpleOwner)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SimpleOwner)
$cSimpleOwner :: Constr
$tSimpleOwner :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> SimpleOwner -> m SimpleOwner
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SimpleOwner -> m SimpleOwner
gmapMp :: (forall d. Data d => d -> m d) -> SimpleOwner -> m SimpleOwner
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SimpleOwner -> m SimpleOwner
gmapM :: (forall d. Data d => d -> m d) -> SimpleOwner -> m SimpleOwner
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SimpleOwner -> m SimpleOwner
gmapQi :: Int -> (forall d. Data d => d -> u) -> SimpleOwner -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SimpleOwner -> u
gmapQ :: (forall d. Data d => d -> u) -> SimpleOwner -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SimpleOwner -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SimpleOwner -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SimpleOwner -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SimpleOwner -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SimpleOwner -> r
gmapT :: (forall b. Data b => b -> b) -> SimpleOwner -> SimpleOwner
$cgmapT :: (forall b. Data b => b -> b) -> SimpleOwner -> SimpleOwner
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SimpleOwner)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SimpleOwner)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c SimpleOwner)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SimpleOwner)
dataTypeOf :: SimpleOwner -> DataType
$cdataTypeOf :: SimpleOwner -> DataType
toConstr :: SimpleOwner -> Constr
$ctoConstr :: SimpleOwner -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SimpleOwner
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SimpleOwner
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SimpleOwner -> c SimpleOwner
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SimpleOwner -> c SimpleOwner
$cp1Data :: Typeable SimpleOwner
Data, Typeable, SimpleOwner -> SimpleOwner -> Bool
(SimpleOwner -> SimpleOwner -> Bool)
-> (SimpleOwner -> SimpleOwner -> Bool) -> Eq SimpleOwner
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SimpleOwner -> SimpleOwner -> Bool
$c/= :: SimpleOwner -> SimpleOwner -> Bool
== :: SimpleOwner -> SimpleOwner -> Bool
$c== :: SimpleOwner -> SimpleOwner -> Bool
Eq, Eq SimpleOwner
Eq SimpleOwner
-> (SimpleOwner -> SimpleOwner -> Ordering)
-> (SimpleOwner -> SimpleOwner -> Bool)
-> (SimpleOwner -> SimpleOwner -> Bool)
-> (SimpleOwner -> SimpleOwner -> Bool)
-> (SimpleOwner -> SimpleOwner -> Bool)
-> (SimpleOwner -> SimpleOwner -> SimpleOwner)
-> (SimpleOwner -> SimpleOwner -> SimpleOwner)
-> Ord SimpleOwner
SimpleOwner -> SimpleOwner -> Bool
SimpleOwner -> SimpleOwner -> Ordering
SimpleOwner -> SimpleOwner -> SimpleOwner
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SimpleOwner -> SimpleOwner -> SimpleOwner
$cmin :: SimpleOwner -> SimpleOwner -> SimpleOwner
max :: SimpleOwner -> SimpleOwner -> SimpleOwner
$cmax :: SimpleOwner -> SimpleOwner -> SimpleOwner
>= :: SimpleOwner -> SimpleOwner -> Bool
$c>= :: SimpleOwner -> SimpleOwner -> Bool
> :: SimpleOwner -> SimpleOwner -> Bool
$c> :: SimpleOwner -> SimpleOwner -> Bool
<= :: SimpleOwner -> SimpleOwner -> Bool
$c<= :: SimpleOwner -> SimpleOwner -> Bool
< :: SimpleOwner -> SimpleOwner -> Bool
$c< :: SimpleOwner -> SimpleOwner -> Bool
compare :: SimpleOwner -> SimpleOwner -> Ordering
$ccompare :: SimpleOwner -> SimpleOwner -> Ordering
$cp1Ord :: Eq SimpleOwner
Ord, (forall x. SimpleOwner -> Rep SimpleOwner x)
-> (forall x. Rep SimpleOwner x -> SimpleOwner)
-> Generic SimpleOwner
forall x. Rep SimpleOwner x -> SimpleOwner
forall x. SimpleOwner -> Rep SimpleOwner x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SimpleOwner x -> SimpleOwner
$cfrom :: forall x. SimpleOwner -> Rep SimpleOwner x
Generic)

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

data User = User
    { User -> Id User
userId          :: !(Id User)
    , User -> Name User
userLogin       :: !(Name User)
    , User -> Maybe Text
userName        :: !(Maybe Text)
    , User -> OwnerType
userType        :: !OwnerType  -- ^ Should always be 'OwnerUser' or 'OwnerBot'
    , User -> UTCTime
userCreatedAt   :: !UTCTime
    , User -> Int
userPublicGists :: !Int
    , User -> URL
userAvatarUrl   :: !URL
    , User -> Int
userFollowers   :: !Int
    , User -> Int
userFollowing   :: !Int
    , User -> Maybe Bool
userHireable    :: !(Maybe Bool)
    , User -> Maybe Text
userBlog        :: !(Maybe Text)
    , User -> Maybe Text
userBio         :: !(Maybe Text)
    , User -> Int
userPublicRepos :: !Int
    , User -> Maybe Text
userLocation    :: !(Maybe Text)
    , User -> Maybe Text
userCompany     :: !(Maybe Text)
    , User -> Maybe Text
userEmail       :: !(Maybe Text)
    , User -> URL
userUrl         :: !URL
    , User -> URL
userHtmlUrl     :: !URL
    }
    deriving (Int -> User -> ShowS
[User] -> ShowS
User -> String
(Int -> User -> ShowS)
-> (User -> String) -> ([User] -> ShowS) -> Show User
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [User] -> ShowS
$cshowList :: [User] -> ShowS
show :: User -> String
$cshow :: User -> String
showsPrec :: Int -> User -> ShowS
$cshowsPrec :: Int -> User -> ShowS
Show, Typeable User
DataType
Constr
Typeable User
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> User -> c User)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c User)
-> (User -> Constr)
-> (User -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c User))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c User))
-> ((forall b. Data b => b -> b) -> User -> User)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> User -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> User -> r)
-> (forall u. (forall d. Data d => d -> u) -> User -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> User -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> User -> m User)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> User -> m User)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> User -> m User)
-> Data User
User -> DataType
User -> Constr
(forall b. Data b => b -> b) -> User -> User
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> User -> c User
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c User
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) -> User -> u
forall u. (forall d. Data d => d -> u) -> User -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> User -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> User -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> User -> m User
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> User -> m User
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c User
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> User -> c User
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c User)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c User)
$cUser :: Constr
$tUser :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> User -> m User
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> User -> m User
gmapMp :: (forall d. Data d => d -> m d) -> User -> m User
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> User -> m User
gmapM :: (forall d. Data d => d -> m d) -> User -> m User
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> User -> m User
gmapQi :: Int -> (forall d. Data d => d -> u) -> User -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> User -> u
gmapQ :: (forall d. Data d => d -> u) -> User -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> User -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> User -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> User -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> User -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> User -> r
gmapT :: (forall b. Data b => b -> b) -> User -> User
$cgmapT :: (forall b. Data b => b -> b) -> User -> User
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c User)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c User)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c User)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c User)
dataTypeOf :: User -> DataType
$cdataTypeOf :: User -> DataType
toConstr :: User -> Constr
$ctoConstr :: User -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c User
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c User
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> User -> c User
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> User -> c User
$cp1Data :: Typeable User
Data, Typeable, User -> User -> Bool
(User -> User -> Bool) -> (User -> User -> Bool) -> Eq User
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: User -> User -> Bool
$c/= :: User -> User -> Bool
== :: User -> User -> Bool
$c== :: User -> User -> Bool
Eq, Eq User
Eq User
-> (User -> User -> Ordering)
-> (User -> User -> Bool)
-> (User -> User -> Bool)
-> (User -> User -> Bool)
-> (User -> User -> Bool)
-> (User -> User -> User)
-> (User -> User -> User)
-> Ord User
User -> User -> Bool
User -> User -> Ordering
User -> User -> User
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: User -> User -> User
$cmin :: User -> User -> User
max :: User -> User -> User
$cmax :: User -> User -> User
>= :: User -> User -> Bool
$c>= :: User -> User -> Bool
> :: User -> User -> Bool
$c> :: User -> User -> Bool
<= :: User -> User -> Bool
$c<= :: User -> User -> Bool
< :: User -> User -> Bool
$c< :: User -> User -> Bool
compare :: User -> User -> Ordering
$ccompare :: User -> User -> Ordering
$cp1Ord :: Eq User
Ord, (forall x. User -> Rep User x)
-> (forall x. Rep User x -> User) -> Generic User
forall x. Rep User x -> User
forall x. User -> Rep User x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep User x -> User
$cfrom :: forall x. User -> Rep User x
Generic)

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

data Organization = Organization
    { Organization -> Id Organization
organizationId          :: !(Id Organization)
    , Organization -> Name Organization
organizationLogin       :: !(Name Organization)
    , Organization -> Maybe Text
organizationName        :: !(Maybe Text)
    , Organization -> OwnerType
organizationType        :: !OwnerType  -- ^ Should always be 'OwnerOrganization'
    , Organization -> Maybe Text
organizationBlog        :: !(Maybe Text)
    , Organization -> Maybe Text
organizationLocation    :: !(Maybe Text)
    , Organization -> Int
organizationFollowers   :: !Int
    , Organization -> Maybe Text
organizationCompany     :: !(Maybe Text)
    , Organization -> URL
organizationAvatarUrl   :: !URL
    , Organization -> Int
organizationPublicGists :: !Int
    , Organization -> URL
organizationHtmlUrl     :: !URL
    , Organization -> Maybe Text
organizationEmail       :: !(Maybe Text)
    , Organization -> Int
organizationFollowing   :: !Int
    , Organization -> Int
organizationPublicRepos :: !Int
    , Organization -> URL
organizationUrl         :: !URL
    , Organization -> UTCTime
organizationCreatedAt   :: !UTCTime
    }
    deriving (Int -> Organization -> ShowS
[Organization] -> ShowS
Organization -> String
(Int -> Organization -> ShowS)
-> (Organization -> String)
-> ([Organization] -> ShowS)
-> Show Organization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Organization] -> ShowS
$cshowList :: [Organization] -> ShowS
show :: Organization -> String
$cshow :: Organization -> String
showsPrec :: Int -> Organization -> ShowS
$cshowsPrec :: Int -> Organization -> ShowS
Show, Typeable Organization
DataType
Constr
Typeable Organization
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Organization -> c Organization)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Organization)
-> (Organization -> Constr)
-> (Organization -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Organization))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Organization))
-> ((forall b. Data b => b -> b) -> Organization -> Organization)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Organization -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Organization -> r)
-> (forall u. (forall d. Data d => d -> u) -> Organization -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Organization -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Organization -> m Organization)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Organization -> m Organization)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Organization -> m Organization)
-> Data Organization
Organization -> DataType
Organization -> Constr
(forall b. Data b => b -> b) -> Organization -> Organization
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Organization -> c Organization
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Organization
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) -> Organization -> u
forall u. (forall d. Data d => d -> u) -> Organization -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Organization -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Organization -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Organization -> m Organization
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Organization -> m Organization
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Organization
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Organization -> c Organization
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Organization)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Organization)
$cOrganization :: Constr
$tOrganization :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Organization -> m Organization
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Organization -> m Organization
gmapMp :: (forall d. Data d => d -> m d) -> Organization -> m Organization
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Organization -> m Organization
gmapM :: (forall d. Data d => d -> m d) -> Organization -> m Organization
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Organization -> m Organization
gmapQi :: Int -> (forall d. Data d => d -> u) -> Organization -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Organization -> u
gmapQ :: (forall d. Data d => d -> u) -> Organization -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Organization -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Organization -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Organization -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Organization -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Organization -> r
gmapT :: (forall b. Data b => b -> b) -> Organization -> Organization
$cgmapT :: (forall b. Data b => b -> b) -> Organization -> Organization
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Organization)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Organization)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Organization)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Organization)
dataTypeOf :: Organization -> DataType
$cdataTypeOf :: Organization -> DataType
toConstr :: Organization -> Constr
$ctoConstr :: Organization -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Organization
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Organization
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Organization -> c Organization
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Organization -> c Organization
$cp1Data :: Typeable Organization
Data, Typeable, Organization -> Organization -> Bool
(Organization -> Organization -> Bool)
-> (Organization -> Organization -> Bool) -> Eq Organization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Organization -> Organization -> Bool
$c/= :: Organization -> Organization -> Bool
== :: Organization -> Organization -> Bool
$c== :: Organization -> Organization -> Bool
Eq, Eq Organization
Eq Organization
-> (Organization -> Organization -> Ordering)
-> (Organization -> Organization -> Bool)
-> (Organization -> Organization -> Bool)
-> (Organization -> Organization -> Bool)
-> (Organization -> Organization -> Bool)
-> (Organization -> Organization -> Organization)
-> (Organization -> Organization -> Organization)
-> Ord Organization
Organization -> Organization -> Bool
Organization -> Organization -> Ordering
Organization -> Organization -> Organization
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Organization -> Organization -> Organization
$cmin :: Organization -> Organization -> Organization
max :: Organization -> Organization -> Organization
$cmax :: Organization -> Organization -> Organization
>= :: Organization -> Organization -> Bool
$c>= :: Organization -> Organization -> Bool
> :: Organization -> Organization -> Bool
$c> :: Organization -> Organization -> Bool
<= :: Organization -> Organization -> Bool
$c<= :: Organization -> Organization -> Bool
< :: Organization -> Organization -> Bool
$c< :: Organization -> Organization -> Bool
compare :: Organization -> Organization -> Ordering
$ccompare :: Organization -> Organization -> Ordering
$cp1Ord :: Eq Organization
Ord, (forall x. Organization -> Rep Organization x)
-> (forall x. Rep Organization x -> Organization)
-> Generic Organization
forall x. Rep Organization x -> Organization
forall x. Organization -> Rep Organization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Organization x -> Organization
$cfrom :: forall x. Organization -> Rep Organization x
Generic)

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

-- | In practice you can't have concrete values of 'Owner'.
newtype Owner = Owner (Either User Organization)
    deriving (Int -> Owner -> ShowS
[Owner] -> ShowS
Owner -> String
(Int -> Owner -> ShowS)
-> (Owner -> String) -> ([Owner] -> ShowS) -> Show Owner
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Owner] -> ShowS
$cshowList :: [Owner] -> ShowS
show :: Owner -> String
$cshow :: Owner -> String
showsPrec :: Int -> Owner -> ShowS
$cshowsPrec :: Int -> Owner -> ShowS
Show, Typeable Owner
DataType
Constr
Typeable Owner
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Owner -> c Owner)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Owner)
-> (Owner -> Constr)
-> (Owner -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Owner))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Owner))
-> ((forall b. Data b => b -> b) -> Owner -> Owner)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Owner -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Owner -> r)
-> (forall u. (forall d. Data d => d -> u) -> Owner -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Owner -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Owner -> m Owner)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Owner -> m Owner)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Owner -> m Owner)
-> Data Owner
Owner -> DataType
Owner -> Constr
(forall b. Data b => b -> b) -> Owner -> Owner
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Owner -> c Owner
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Owner
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) -> Owner -> u
forall u. (forall d. Data d => d -> u) -> Owner -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Owner -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Owner -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Owner -> m Owner
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Owner -> m Owner
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Owner
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Owner -> c Owner
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Owner)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Owner)
$cOwner :: Constr
$tOwner :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Owner -> m Owner
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Owner -> m Owner
gmapMp :: (forall d. Data d => d -> m d) -> Owner -> m Owner
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Owner -> m Owner
gmapM :: (forall d. Data d => d -> m d) -> Owner -> m Owner
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Owner -> m Owner
gmapQi :: Int -> (forall d. Data d => d -> u) -> Owner -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Owner -> u
gmapQ :: (forall d. Data d => d -> u) -> Owner -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Owner -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Owner -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Owner -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Owner -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Owner -> r
gmapT :: (forall b. Data b => b -> b) -> Owner -> Owner
$cgmapT :: (forall b. Data b => b -> b) -> Owner -> Owner
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Owner)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Owner)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Owner)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Owner)
dataTypeOf :: Owner -> DataType
$cdataTypeOf :: Owner -> DataType
toConstr :: Owner -> Constr
$ctoConstr :: Owner -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Owner
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Owner
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Owner -> c Owner
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Owner -> c Owner
$cp1Data :: Typeable Owner
Data, Typeable, Owner -> Owner -> Bool
(Owner -> Owner -> Bool) -> (Owner -> Owner -> Bool) -> Eq Owner
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Owner -> Owner -> Bool
$c/= :: Owner -> Owner -> Bool
== :: Owner -> Owner -> Bool
$c== :: Owner -> Owner -> Bool
Eq, Eq Owner
Eq Owner
-> (Owner -> Owner -> Ordering)
-> (Owner -> Owner -> Bool)
-> (Owner -> Owner -> Bool)
-> (Owner -> Owner -> Bool)
-> (Owner -> Owner -> Bool)
-> (Owner -> Owner -> Owner)
-> (Owner -> Owner -> Owner)
-> Ord Owner
Owner -> Owner -> Bool
Owner -> Owner -> Ordering
Owner -> Owner -> Owner
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Owner -> Owner -> Owner
$cmin :: Owner -> Owner -> Owner
max :: Owner -> Owner -> Owner
$cmax :: Owner -> Owner -> Owner
>= :: Owner -> Owner -> Bool
$c>= :: Owner -> Owner -> Bool
> :: Owner -> Owner -> Bool
$c> :: Owner -> Owner -> Bool
<= :: Owner -> Owner -> Bool
$c<= :: Owner -> Owner -> Bool
< :: Owner -> Owner -> Bool
$c< :: Owner -> Owner -> Bool
compare :: Owner -> Owner -> Ordering
$ccompare :: Owner -> Owner -> Ordering
$cp1Ord :: Eq Owner
Ord, (forall x. Owner -> Rep Owner x)
-> (forall x. Rep Owner x -> Owner) -> Generic Owner
forall x. Rep Owner x -> Owner
forall x. Owner -> Rep Owner x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Owner x -> Owner
$cfrom :: forall x. Owner -> Rep Owner x
Generic)

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

fromOwner :: Owner -> Either User Organization
fromOwner :: Owner -> Either User Organization
fromOwner (Owner Either User Organization
owner) = Either User Organization
owner

-- JSON instances

instance FromJSON OwnerType where
    parseJSON :: Value -> Parser OwnerType
parseJSON = String -> (Text -> Parser OwnerType) -> Value -> Parser OwnerType
forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"OwnerType" ((Text -> Parser OwnerType) -> Value -> Parser OwnerType)
-> (Text -> Parser OwnerType) -> Value -> Parser OwnerType
forall a b. (a -> b) -> a -> b
$ \Text
t -> case Text -> Text
T.toLower Text
t of
        Text
"user"         -> OwnerType -> Parser OwnerType
forall (f :: * -> *) a. Applicative f => a -> f a
pure (OwnerType -> Parser OwnerType) -> OwnerType -> Parser OwnerType
forall a b. (a -> b) -> a -> b
$ OwnerType
OwnerUser
        Text
"organization" -> OwnerType -> Parser OwnerType
forall (f :: * -> *) a. Applicative f => a -> f a
pure (OwnerType -> Parser OwnerType) -> OwnerType -> Parser OwnerType
forall a b. (a -> b) -> a -> b
$ OwnerType
OwnerOrganization
        Text
"bot"          -> OwnerType -> Parser OwnerType
forall (f :: * -> *) a. Applicative f => a -> f a
pure (OwnerType -> Parser OwnerType) -> OwnerType -> Parser OwnerType
forall a b. (a -> b) -> a -> b
$ OwnerType
OwnerBot
        Text
_              -> String -> Parser OwnerType
forall (m :: * -> *) a. MonadFail m => String -> m a
fail (String -> Parser OwnerType) -> String -> Parser OwnerType
forall a b. (a -> b) -> a -> b
$ String
"Unknown OwnerType: " String -> ShowS
forall a. Semigroup a => a -> a -> a
<> Text -> String
T.unpack Text
t

instance FromJSON SimpleUser where
    parseJSON :: Value -> Parser SimpleUser
parseJSON = String
-> (Object -> Parser SimpleUser) -> Value -> Parser SimpleUser
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"SimpleUser" ((Object -> Parser SimpleUser) -> Value -> Parser SimpleUser)
-> (Object -> Parser SimpleUser) -> Value -> Parser SimpleUser
forall a b. (a -> b) -> a -> b
$ \Object
obj -> do
        Id User -> Name User -> URL -> URL -> SimpleUser
SimpleUser
            (Id User -> Name User -> URL -> URL -> SimpleUser)
-> Parser (Id User)
-> Parser (Name User -> URL -> URL -> SimpleUser)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
obj Object -> Key -> Parser (Id User)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
            Parser (Name User -> URL -> URL -> SimpleUser)
-> Parser (Name User) -> Parser (URL -> URL -> SimpleUser)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Name User)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"login"
            Parser (URL -> URL -> SimpleUser)
-> Parser URL -> Parser (URL -> SimpleUser)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"avatar_url"
            Parser (URL -> SimpleUser) -> Parser URL -> Parser SimpleUser
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"url"

instance FromJSON SimpleOrganization where
    parseJSON :: Value -> Parser SimpleOrganization
parseJSON = String
-> (Object -> Parser SimpleOrganization)
-> Value
-> Parser SimpleOrganization
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"SimpleOrganization" ((Object -> Parser SimpleOrganization)
 -> Value -> Parser SimpleOrganization)
-> (Object -> Parser SimpleOrganization)
-> Value
-> Parser SimpleOrganization
forall a b. (a -> b) -> a -> b
$ \Object
obj ->
        Id Organization
-> Name Organization -> URL -> URL -> SimpleOrganization
SimpleOrganization
            (Id Organization
 -> Name Organization -> URL -> URL -> SimpleOrganization)
-> Parser (Id Organization)
-> Parser (Name Organization -> URL -> URL -> SimpleOrganization)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
obj Object -> Key -> Parser (Id Organization)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
            Parser (Name Organization -> URL -> URL -> SimpleOrganization)
-> Parser (Name Organization)
-> Parser (URL -> URL -> SimpleOrganization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Name Organization)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"login"
            Parser (URL -> URL -> SimpleOrganization)
-> Parser URL -> Parser (URL -> SimpleOrganization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"url"
            Parser (URL -> SimpleOrganization)
-> Parser URL -> Parser SimpleOrganization
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"avatar_url"

instance FromJSON SimpleOwner where
    parseJSON :: Value -> Parser SimpleOwner
parseJSON = String
-> (Object -> Parser SimpleOwner) -> Value -> Parser SimpleOwner
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"SimpleOwner" ((Object -> Parser SimpleOwner) -> Value -> Parser SimpleOwner)
-> (Object -> Parser SimpleOwner) -> Value -> Parser SimpleOwner
forall a b. (a -> b) -> a -> b
$ \Object
obj -> do
        Id Owner -> Name Owner -> URL -> URL -> OwnerType -> SimpleOwner
SimpleOwner
            (Id Owner -> Name Owner -> URL -> URL -> OwnerType -> SimpleOwner)
-> Parser (Id Owner)
-> Parser (Name Owner -> URL -> URL -> OwnerType -> SimpleOwner)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
obj Object -> Key -> Parser (Id Owner)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
            Parser (Name Owner -> URL -> URL -> OwnerType -> SimpleOwner)
-> Parser (Name Owner)
-> Parser (URL -> URL -> OwnerType -> SimpleOwner)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Name Owner)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"login"
            Parser (URL -> URL -> OwnerType -> SimpleOwner)
-> Parser URL -> Parser (URL -> OwnerType -> SimpleOwner)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"url"
            Parser (URL -> OwnerType -> SimpleOwner)
-> Parser URL -> Parser (OwnerType -> SimpleOwner)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"avatar_url"
            Parser (OwnerType -> SimpleOwner)
-> Parser OwnerType -> Parser SimpleOwner
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser OwnerType
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"type"

parseUser :: Object -> Parser User
parseUser :: Object -> Parser User
parseUser Object
obj = Id User
-> Name User
-> Maybe Text
-> OwnerType
-> UTCTime
-> Int
-> URL
-> Int
-> Int
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> URL
-> URL
-> User
User
    (Id User
 -> Name User
 -> Maybe Text
 -> OwnerType
 -> UTCTime
 -> Int
 -> URL
 -> Int
 -> Int
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> URL
 -> URL
 -> User)
-> Parser (Id User)
-> Parser
     (Name User
      -> Maybe Text
      -> OwnerType
      -> UTCTime
      -> Int
      -> URL
      -> Int
      -> Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> URL
      -> URL
      -> User)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
obj Object -> Key -> Parser (Id User)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
    Parser
  (Name User
   -> Maybe Text
   -> OwnerType
   -> UTCTime
   -> Int
   -> URL
   -> Int
   -> Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> URL
   -> URL
   -> User)
-> Parser (Name User)
-> Parser
     (Maybe Text
      -> OwnerType
      -> UTCTime
      -> Int
      -> URL
      -> Int
      -> Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> URL
      -> URL
      -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Name User)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"login"
    Parser
  (Maybe Text
   -> OwnerType
   -> UTCTime
   -> Int
   -> URL
   -> Int
   -> Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> URL
   -> URL
   -> User)
-> Parser (Maybe Text)
-> Parser
     (OwnerType
      -> UTCTime
      -> Int
      -> URL
      -> Int
      -> Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> URL
      -> URL
      -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name"
    Parser
  (OwnerType
   -> UTCTime
   -> Int
   -> URL
   -> Int
   -> Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> URL
   -> URL
   -> User)
-> Parser OwnerType
-> Parser
     (UTCTime
      -> Int
      -> URL
      -> Int
      -> Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> URL
      -> URL
      -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser OwnerType
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"type"
    Parser
  (UTCTime
   -> Int
   -> URL
   -> Int
   -> Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> URL
   -> URL
   -> User)
-> Parser UTCTime
-> Parser
     (Int
      -> URL
      -> Int
      -> Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> URL
      -> URL
      -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser UTCTime
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"created_at"
    Parser
  (Int
   -> URL
   -> Int
   -> Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> URL
   -> URL
   -> User)
-> Parser Int
-> Parser
     (URL
      -> Int
      -> Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> URL
      -> URL
      -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"public_gists"
    Parser
  (URL
   -> Int
   -> Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> URL
   -> URL
   -> User)
-> Parser URL
-> Parser
     (Int
      -> Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> URL
      -> URL
      -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"avatar_url"
    Parser
  (Int
   -> Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> URL
   -> URL
   -> User)
-> Parser Int
-> Parser
     (Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> URL
      -> URL
      -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"followers"
    Parser
  (Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> URL
   -> URL
   -> User)
-> Parser Int
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> URL
      -> URL
      -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"following"
    Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> URL
   -> URL
   -> User)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> URL
      -> URL
      -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"hireable"
    Parser
  (Maybe Text
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> URL
   -> URL
   -> User)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> URL
      -> URL
      -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"blog"
    Parser
  (Maybe Text
   -> Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> URL
   -> URL
   -> User)
-> Parser (Maybe Text)
-> Parser
     (Int
      -> Maybe Text -> Maybe Text -> Maybe Text -> URL -> URL -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"bio"
    Parser
  (Int
   -> Maybe Text -> Maybe Text -> Maybe Text -> URL -> URL -> User)
-> Parser Int
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> URL -> URL -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"public_repos"
    Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> URL -> URL -> User)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> URL -> URL -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"location"
    Parser (Maybe Text -> Maybe Text -> URL -> URL -> User)
-> Parser (Maybe Text) -> Parser (Maybe Text -> URL -> URL -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"company"
    Parser (Maybe Text -> URL -> URL -> User)
-> Parser (Maybe Text) -> Parser (URL -> URL -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"email"
    Parser (URL -> URL -> User) -> Parser URL -> Parser (URL -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"url"
    Parser (URL -> User) -> Parser URL -> Parser User
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"html_url"

parseOrganization :: Object -> Parser Organization
parseOrganization :: Object -> Parser Organization
parseOrganization Object
obj = Id Organization
-> Name Organization
-> Maybe Text
-> OwnerType
-> Maybe Text
-> Maybe Text
-> Int
-> Maybe Text
-> URL
-> Int
-> URL
-> Maybe Text
-> Int
-> Int
-> URL
-> UTCTime
-> Organization
Organization
    (Id Organization
 -> Name Organization
 -> Maybe Text
 -> OwnerType
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> Maybe Text
 -> URL
 -> Int
 -> URL
 -> Maybe Text
 -> Int
 -> Int
 -> URL
 -> UTCTime
 -> Organization)
-> Parser (Id Organization)
-> Parser
     (Name Organization
      -> Maybe Text
      -> OwnerType
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> URL
      -> Int
      -> URL
      -> Maybe Text
      -> Int
      -> Int
      -> URL
      -> UTCTime
      -> Organization)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
obj Object -> Key -> Parser (Id Organization)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
    Parser
  (Name Organization
   -> Maybe Text
   -> OwnerType
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> URL
   -> Int
   -> URL
   -> Maybe Text
   -> Int
   -> Int
   -> URL
   -> UTCTime
   -> Organization)
-> Parser (Name Organization)
-> Parser
     (Maybe Text
      -> OwnerType
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> URL
      -> Int
      -> URL
      -> Maybe Text
      -> Int
      -> Int
      -> URL
      -> UTCTime
      -> Organization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Name Organization)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"login"
    Parser
  (Maybe Text
   -> OwnerType
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> URL
   -> Int
   -> URL
   -> Maybe Text
   -> Int
   -> Int
   -> URL
   -> UTCTime
   -> Organization)
-> Parser (Maybe Text)
-> Parser
     (OwnerType
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> URL
      -> Int
      -> URL
      -> Maybe Text
      -> Int
      -> Int
      -> URL
      -> UTCTime
      -> Organization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name"
    Parser
  (OwnerType
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> URL
   -> Int
   -> URL
   -> Maybe Text
   -> Int
   -> Int
   -> URL
   -> UTCTime
   -> Organization)
-> Parser OwnerType
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Int
      -> Maybe Text
      -> URL
      -> Int
      -> URL
      -> Maybe Text
      -> Int
      -> Int
      -> URL
      -> UTCTime
      -> Organization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser OwnerType
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"type"
    Parser
  (Maybe Text
   -> Maybe Text
   -> Int
   -> Maybe Text
   -> URL
   -> Int
   -> URL
   -> Maybe Text
   -> Int
   -> Int
   -> URL
   -> UTCTime
   -> Organization)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Int
      -> Maybe Text
      -> URL
      -> Int
      -> URL
      -> Maybe Text
      -> Int
      -> Int
      -> URL
      -> UTCTime
      -> Organization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"blog"
    Parser
  (Maybe Text
   -> Int
   -> Maybe Text
   -> URL
   -> Int
   -> URL
   -> Maybe Text
   -> Int
   -> Int
   -> URL
   -> UTCTime
   -> Organization)
-> Parser (Maybe Text)
-> Parser
     (Int
      -> Maybe Text
      -> URL
      -> Int
      -> URL
      -> Maybe Text
      -> Int
      -> Int
      -> URL
      -> UTCTime
      -> Organization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"location"
    Parser
  (Int
   -> Maybe Text
   -> URL
   -> Int
   -> URL
   -> Maybe Text
   -> Int
   -> Int
   -> URL
   -> UTCTime
   -> Organization)
-> Parser Int
-> Parser
     (Maybe Text
      -> URL
      -> Int
      -> URL
      -> Maybe Text
      -> Int
      -> Int
      -> URL
      -> UTCTime
      -> Organization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"followers"
    Parser
  (Maybe Text
   -> URL
   -> Int
   -> URL
   -> Maybe Text
   -> Int
   -> Int
   -> URL
   -> UTCTime
   -> Organization)
-> Parser (Maybe Text)
-> Parser
     (URL
      -> Int
      -> URL
      -> Maybe Text
      -> Int
      -> Int
      -> URL
      -> UTCTime
      -> Organization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"company"
    Parser
  (URL
   -> Int
   -> URL
   -> Maybe Text
   -> Int
   -> Int
   -> URL
   -> UTCTime
   -> Organization)
-> Parser URL
-> Parser
     (Int
      -> URL
      -> Maybe Text
      -> Int
      -> Int
      -> URL
      -> UTCTime
      -> Organization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"avatar_url"
    Parser
  (Int
   -> URL
   -> Maybe Text
   -> Int
   -> Int
   -> URL
   -> UTCTime
   -> Organization)
-> Parser Int
-> Parser
     (URL -> Maybe Text -> Int -> Int -> URL -> UTCTime -> Organization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"public_gists"
    Parser
  (URL -> Maybe Text -> Int -> Int -> URL -> UTCTime -> Organization)
-> Parser URL
-> Parser
     (Maybe Text -> Int -> Int -> URL -> UTCTime -> Organization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"html_url"
    Parser (Maybe Text -> Int -> Int -> URL -> UTCTime -> Organization)
-> Parser (Maybe Text)
-> Parser (Int -> Int -> URL -> UTCTime -> Organization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"email"
    Parser (Int -> Int -> URL -> UTCTime -> Organization)
-> Parser Int -> Parser (Int -> URL -> UTCTime -> Organization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"following"
    Parser (Int -> URL -> UTCTime -> Organization)
-> Parser Int -> Parser (URL -> UTCTime -> Organization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"public_repos"
    Parser (URL -> UTCTime -> Organization)
-> Parser URL -> Parser (UTCTime -> Organization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"url"
    Parser (UTCTime -> Organization)
-> Parser UTCTime -> Parser Organization
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
obj Object -> Key -> Parser UTCTime
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"created_at"

instance FromJSON User where
    parseJSON :: Value -> Parser User
parseJSON = (User -> Bool) -> Parser User -> Parser User
forall (m :: * -> *) a. MonadPlus m => (a -> Bool) -> m a -> m a
mfilter ((OwnerType -> OwnerType -> Bool
forall a. Eq a => a -> a -> Bool
/= OwnerType
OwnerOrganization) (OwnerType -> Bool) -> (User -> OwnerType) -> User -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. User -> OwnerType
userType) (Parser User -> Parser User)
-> (Value -> Parser User) -> Value -> Parser User
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> (Object -> Parser User) -> Value -> Parser User
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"User" Object -> Parser User
parseUser

instance FromJSON Organization where
    parseJSON :: Value -> Parser Organization
parseJSON = String
-> (Object -> Parser Organization) -> Value -> Parser Organization
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"Organization" Object -> Parser Organization
parseOrganization

instance FromJSON Owner where
    parseJSON :: Value -> Parser Owner
parseJSON = String -> (Object -> Parser Owner) -> Value -> Parser Owner
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"Owner" ((Object -> Parser Owner) -> Value -> Parser Owner)
-> (Object -> Parser Owner) -> Value -> Parser Owner
forall a b. (a -> b) -> a -> b
$ \Object
obj -> do
        OwnerType
t <- Object
obj Object -> Key -> Parser OwnerType
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"type"
        case OwnerType
t of
            OwnerType
OwnerUser         -> Either User Organization -> Owner
Owner (Either User Organization -> Owner)
-> (User -> Either User Organization) -> User -> Owner
forall b c a. (b -> c) -> (a -> b) -> a -> c
. User -> Either User Organization
forall a b. a -> Either a b
Left (User -> Owner) -> Parser User -> Parser Owner
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object -> Parser User
parseUser Object
obj
            OwnerType
OwnerBot          -> Either User Organization -> Owner
Owner (Either User Organization -> Owner)
-> (User -> Either User Organization) -> User -> Owner
forall b c a. (b -> c) -> (a -> b) -> a -> c
. User -> Either User Organization
forall a b. a -> Either a b
Left (User -> Owner) -> Parser User -> Parser Owner
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object -> Parser User
parseUser Object
obj
            OwnerType
OwnerOrganization -> Either User Organization -> Owner
Owner (Either User Organization -> Owner)
-> (Organization -> Either User Organization)
-> Organization
-> Owner
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Organization -> Either User Organization
forall a b. b -> Either a b
Right (Organization -> Owner) -> Parser Organization -> Parser Owner
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object -> Parser Organization
parseOrganization Object
obj

-- | Filter members returned in the list.
data OrgMemberFilter
    = OrgMemberFilter2faDisabled  -- ^ Members without two-factor authentication enabled. Available for organization owners.
    | OrgMemberFilterAll          -- ^ All members the authenticated user can see.
    deriving (Int -> OrgMemberFilter -> ShowS
[OrgMemberFilter] -> ShowS
OrgMemberFilter -> String
(Int -> OrgMemberFilter -> ShowS)
-> (OrgMemberFilter -> String)
-> ([OrgMemberFilter] -> ShowS)
-> Show OrgMemberFilter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrgMemberFilter] -> ShowS
$cshowList :: [OrgMemberFilter] -> ShowS
show :: OrgMemberFilter -> String
$cshow :: OrgMemberFilter -> String
showsPrec :: Int -> OrgMemberFilter -> ShowS
$cshowsPrec :: Int -> OrgMemberFilter -> ShowS
Show, OrgMemberFilter -> OrgMemberFilter -> Bool
(OrgMemberFilter -> OrgMemberFilter -> Bool)
-> (OrgMemberFilter -> OrgMemberFilter -> Bool)
-> Eq OrgMemberFilter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrgMemberFilter -> OrgMemberFilter -> Bool
$c/= :: OrgMemberFilter -> OrgMemberFilter -> Bool
== :: OrgMemberFilter -> OrgMemberFilter -> Bool
$c== :: OrgMemberFilter -> OrgMemberFilter -> Bool
Eq, Eq OrgMemberFilter
Eq OrgMemberFilter
-> (OrgMemberFilter -> OrgMemberFilter -> Ordering)
-> (OrgMemberFilter -> OrgMemberFilter -> Bool)
-> (OrgMemberFilter -> OrgMemberFilter -> Bool)
-> (OrgMemberFilter -> OrgMemberFilter -> Bool)
-> (OrgMemberFilter -> OrgMemberFilter -> Bool)
-> (OrgMemberFilter -> OrgMemberFilter -> OrgMemberFilter)
-> (OrgMemberFilter -> OrgMemberFilter -> OrgMemberFilter)
-> Ord OrgMemberFilter
OrgMemberFilter -> OrgMemberFilter -> Bool
OrgMemberFilter -> OrgMemberFilter -> Ordering
OrgMemberFilter -> OrgMemberFilter -> OrgMemberFilter
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: OrgMemberFilter -> OrgMemberFilter -> OrgMemberFilter
$cmin :: OrgMemberFilter -> OrgMemberFilter -> OrgMemberFilter
max :: OrgMemberFilter -> OrgMemberFilter -> OrgMemberFilter
$cmax :: OrgMemberFilter -> OrgMemberFilter -> OrgMemberFilter
>= :: OrgMemberFilter -> OrgMemberFilter -> Bool
$c>= :: OrgMemberFilter -> OrgMemberFilter -> Bool
> :: OrgMemberFilter -> OrgMemberFilter -> Bool
$c> :: OrgMemberFilter -> OrgMemberFilter -> Bool
<= :: OrgMemberFilter -> OrgMemberFilter -> Bool
$c<= :: OrgMemberFilter -> OrgMemberFilter -> Bool
< :: OrgMemberFilter -> OrgMemberFilter -> Bool
$c< :: OrgMemberFilter -> OrgMemberFilter -> Bool
compare :: OrgMemberFilter -> OrgMemberFilter -> Ordering
$ccompare :: OrgMemberFilter -> OrgMemberFilter -> Ordering
$cp1Ord :: Eq OrgMemberFilter
Ord, Int -> OrgMemberFilter
OrgMemberFilter -> Int
OrgMemberFilter -> [OrgMemberFilter]
OrgMemberFilter -> OrgMemberFilter
OrgMemberFilter -> OrgMemberFilter -> [OrgMemberFilter]
OrgMemberFilter
-> OrgMemberFilter -> OrgMemberFilter -> [OrgMemberFilter]
(OrgMemberFilter -> OrgMemberFilter)
-> (OrgMemberFilter -> OrgMemberFilter)
-> (Int -> OrgMemberFilter)
-> (OrgMemberFilter -> Int)
-> (OrgMemberFilter -> [OrgMemberFilter])
-> (OrgMemberFilter -> OrgMemberFilter -> [OrgMemberFilter])
-> (OrgMemberFilter -> OrgMemberFilter -> [OrgMemberFilter])
-> (OrgMemberFilter
    -> OrgMemberFilter -> OrgMemberFilter -> [OrgMemberFilter])
-> Enum OrgMemberFilter
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: OrgMemberFilter
-> OrgMemberFilter -> OrgMemberFilter -> [OrgMemberFilter]
$cenumFromThenTo :: OrgMemberFilter
-> OrgMemberFilter -> OrgMemberFilter -> [OrgMemberFilter]
enumFromTo :: OrgMemberFilter -> OrgMemberFilter -> [OrgMemberFilter]
$cenumFromTo :: OrgMemberFilter -> OrgMemberFilter -> [OrgMemberFilter]
enumFromThen :: OrgMemberFilter -> OrgMemberFilter -> [OrgMemberFilter]
$cenumFromThen :: OrgMemberFilter -> OrgMemberFilter -> [OrgMemberFilter]
enumFrom :: OrgMemberFilter -> [OrgMemberFilter]
$cenumFrom :: OrgMemberFilter -> [OrgMemberFilter]
fromEnum :: OrgMemberFilter -> Int
$cfromEnum :: OrgMemberFilter -> Int
toEnum :: Int -> OrgMemberFilter
$ctoEnum :: Int -> OrgMemberFilter
pred :: OrgMemberFilter -> OrgMemberFilter
$cpred :: OrgMemberFilter -> OrgMemberFilter
succ :: OrgMemberFilter -> OrgMemberFilter
$csucc :: OrgMemberFilter -> OrgMemberFilter
Enum, OrgMemberFilter
OrgMemberFilter -> OrgMemberFilter -> Bounded OrgMemberFilter
forall a. a -> a -> Bounded a
maxBound :: OrgMemberFilter
$cmaxBound :: OrgMemberFilter
minBound :: OrgMemberFilter
$cminBound :: OrgMemberFilter
Bounded, Typeable, Typeable OrgMemberFilter
DataType
Constr
Typeable OrgMemberFilter
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> OrgMemberFilter -> c OrgMemberFilter)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c OrgMemberFilter)
-> (OrgMemberFilter -> Constr)
-> (OrgMemberFilter -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c OrgMemberFilter))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c OrgMemberFilter))
-> ((forall b. Data b => b -> b)
    -> OrgMemberFilter -> OrgMemberFilter)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> OrgMemberFilter -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> OrgMemberFilter -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> OrgMemberFilter -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> OrgMemberFilter -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> OrgMemberFilter -> m OrgMemberFilter)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> OrgMemberFilter -> m OrgMemberFilter)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> OrgMemberFilter -> m OrgMemberFilter)
-> Data OrgMemberFilter
OrgMemberFilter -> DataType
OrgMemberFilter -> Constr
(forall b. Data b => b -> b) -> OrgMemberFilter -> OrgMemberFilter
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrgMemberFilter -> c OrgMemberFilter
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrgMemberFilter
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) -> OrgMemberFilter -> u
forall u. (forall d. Data d => d -> u) -> OrgMemberFilter -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrgMemberFilter -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrgMemberFilter -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> OrgMemberFilter -> m OrgMemberFilter
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrgMemberFilter -> m OrgMemberFilter
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrgMemberFilter
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrgMemberFilter -> c OrgMemberFilter
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrgMemberFilter)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrgMemberFilter)
$cOrgMemberFilterAll :: Constr
$cOrgMemberFilter2faDisabled :: Constr
$tOrgMemberFilter :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> OrgMemberFilter -> m OrgMemberFilter
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrgMemberFilter -> m OrgMemberFilter
gmapMp :: (forall d. Data d => d -> m d)
-> OrgMemberFilter -> m OrgMemberFilter
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> OrgMemberFilter -> m OrgMemberFilter
gmapM :: (forall d. Data d => d -> m d)
-> OrgMemberFilter -> m OrgMemberFilter
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> OrgMemberFilter -> m OrgMemberFilter
gmapQi :: Int -> (forall d. Data d => d -> u) -> OrgMemberFilter -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> OrgMemberFilter -> u
gmapQ :: (forall d. Data d => d -> u) -> OrgMemberFilter -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> OrgMemberFilter -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrgMemberFilter -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrgMemberFilter -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrgMemberFilter -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrgMemberFilter -> r
gmapT :: (forall b. Data b => b -> b) -> OrgMemberFilter -> OrgMemberFilter
$cgmapT :: (forall b. Data b => b -> b) -> OrgMemberFilter -> OrgMemberFilter
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrgMemberFilter)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrgMemberFilter)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c OrgMemberFilter)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrgMemberFilter)
dataTypeOf :: OrgMemberFilter -> DataType
$cdataTypeOf :: OrgMemberFilter -> DataType
toConstr :: OrgMemberFilter -> Constr
$ctoConstr :: OrgMemberFilter -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrgMemberFilter
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrgMemberFilter
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrgMemberFilter -> c OrgMemberFilter
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrgMemberFilter -> c OrgMemberFilter
$cp1Data :: Typeable OrgMemberFilter
Data, (forall x. OrgMemberFilter -> Rep OrgMemberFilter x)
-> (forall x. Rep OrgMemberFilter x -> OrgMemberFilter)
-> Generic OrgMemberFilter
forall x. Rep OrgMemberFilter x -> OrgMemberFilter
forall x. OrgMemberFilter -> Rep OrgMemberFilter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OrgMemberFilter x -> OrgMemberFilter
$cfrom :: forall x. OrgMemberFilter -> Rep OrgMemberFilter x
Generic)

-- | Filter members returned by their role.
data OrgMemberRole
    = OrgMemberRoleAll     -- ^ All members of the organization, regardless of role.
    | OrgMemberRoleAdmin   -- ^ Organization owners.
    | OrgMemberRoleMember  -- ^ Non-owner organization members.
    deriving (Int -> OrgMemberRole -> ShowS
[OrgMemberRole] -> ShowS
OrgMemberRole -> String
(Int -> OrgMemberRole -> ShowS)
-> (OrgMemberRole -> String)
-> ([OrgMemberRole] -> ShowS)
-> Show OrgMemberRole
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrgMemberRole] -> ShowS
$cshowList :: [OrgMemberRole] -> ShowS
show :: OrgMemberRole -> String
$cshow :: OrgMemberRole -> String
showsPrec :: Int -> OrgMemberRole -> ShowS
$cshowsPrec :: Int -> OrgMemberRole -> ShowS
Show, OrgMemberRole -> OrgMemberRole -> Bool
(OrgMemberRole -> OrgMemberRole -> Bool)
-> (OrgMemberRole -> OrgMemberRole -> Bool) -> Eq OrgMemberRole
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrgMemberRole -> OrgMemberRole -> Bool
$c/= :: OrgMemberRole -> OrgMemberRole -> Bool
== :: OrgMemberRole -> OrgMemberRole -> Bool
$c== :: OrgMemberRole -> OrgMemberRole -> Bool
Eq, Eq OrgMemberRole
Eq OrgMemberRole
-> (OrgMemberRole -> OrgMemberRole -> Ordering)
-> (OrgMemberRole -> OrgMemberRole -> Bool)
-> (OrgMemberRole -> OrgMemberRole -> Bool)
-> (OrgMemberRole -> OrgMemberRole -> Bool)
-> (OrgMemberRole -> OrgMemberRole -> Bool)
-> (OrgMemberRole -> OrgMemberRole -> OrgMemberRole)
-> (OrgMemberRole -> OrgMemberRole -> OrgMemberRole)
-> Ord OrgMemberRole
OrgMemberRole -> OrgMemberRole -> Bool
OrgMemberRole -> OrgMemberRole -> Ordering
OrgMemberRole -> OrgMemberRole -> OrgMemberRole
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: OrgMemberRole -> OrgMemberRole -> OrgMemberRole
$cmin :: OrgMemberRole -> OrgMemberRole -> OrgMemberRole
max :: OrgMemberRole -> OrgMemberRole -> OrgMemberRole
$cmax :: OrgMemberRole -> OrgMemberRole -> OrgMemberRole
>= :: OrgMemberRole -> OrgMemberRole -> Bool
$c>= :: OrgMemberRole -> OrgMemberRole -> Bool
> :: OrgMemberRole -> OrgMemberRole -> Bool
$c> :: OrgMemberRole -> OrgMemberRole -> Bool
<= :: OrgMemberRole -> OrgMemberRole -> Bool
$c<= :: OrgMemberRole -> OrgMemberRole -> Bool
< :: OrgMemberRole -> OrgMemberRole -> Bool
$c< :: OrgMemberRole -> OrgMemberRole -> Bool
compare :: OrgMemberRole -> OrgMemberRole -> Ordering
$ccompare :: OrgMemberRole -> OrgMemberRole -> Ordering
$cp1Ord :: Eq OrgMemberRole
Ord, Int -> OrgMemberRole
OrgMemberRole -> Int
OrgMemberRole -> [OrgMemberRole]
OrgMemberRole -> OrgMemberRole
OrgMemberRole -> OrgMemberRole -> [OrgMemberRole]
OrgMemberRole -> OrgMemberRole -> OrgMemberRole -> [OrgMemberRole]
(OrgMemberRole -> OrgMemberRole)
-> (OrgMemberRole -> OrgMemberRole)
-> (Int -> OrgMemberRole)
-> (OrgMemberRole -> Int)
-> (OrgMemberRole -> [OrgMemberRole])
-> (OrgMemberRole -> OrgMemberRole -> [OrgMemberRole])
-> (OrgMemberRole -> OrgMemberRole -> [OrgMemberRole])
-> (OrgMemberRole
    -> OrgMemberRole -> OrgMemberRole -> [OrgMemberRole])
-> Enum OrgMemberRole
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: OrgMemberRole -> OrgMemberRole -> OrgMemberRole -> [OrgMemberRole]
$cenumFromThenTo :: OrgMemberRole -> OrgMemberRole -> OrgMemberRole -> [OrgMemberRole]
enumFromTo :: OrgMemberRole -> OrgMemberRole -> [OrgMemberRole]
$cenumFromTo :: OrgMemberRole -> OrgMemberRole -> [OrgMemberRole]
enumFromThen :: OrgMemberRole -> OrgMemberRole -> [OrgMemberRole]
$cenumFromThen :: OrgMemberRole -> OrgMemberRole -> [OrgMemberRole]
enumFrom :: OrgMemberRole -> [OrgMemberRole]
$cenumFrom :: OrgMemberRole -> [OrgMemberRole]
fromEnum :: OrgMemberRole -> Int
$cfromEnum :: OrgMemberRole -> Int
toEnum :: Int -> OrgMemberRole
$ctoEnum :: Int -> OrgMemberRole
pred :: OrgMemberRole -> OrgMemberRole
$cpred :: OrgMemberRole -> OrgMemberRole
succ :: OrgMemberRole -> OrgMemberRole
$csucc :: OrgMemberRole -> OrgMemberRole
Enum, OrgMemberRole
OrgMemberRole -> OrgMemberRole -> Bounded OrgMemberRole
forall a. a -> a -> Bounded a
maxBound :: OrgMemberRole
$cmaxBound :: OrgMemberRole
minBound :: OrgMemberRole
$cminBound :: OrgMemberRole
Bounded, Typeable, Typeable OrgMemberRole
DataType
Constr
Typeable OrgMemberRole
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> OrgMemberRole -> c OrgMemberRole)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c OrgMemberRole)
-> (OrgMemberRole -> Constr)
-> (OrgMemberRole -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c OrgMemberRole))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c OrgMemberRole))
-> ((forall b. Data b => b -> b) -> OrgMemberRole -> OrgMemberRole)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> OrgMemberRole -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> OrgMemberRole -> r)
-> (forall u. (forall d. Data d => d -> u) -> OrgMemberRole -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> OrgMemberRole -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> OrgMemberRole -> m OrgMemberRole)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> OrgMemberRole -> m OrgMemberRole)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> OrgMemberRole -> m OrgMemberRole)
-> Data OrgMemberRole
OrgMemberRole -> DataType
OrgMemberRole -> Constr
(forall b. Data b => b -> b) -> OrgMemberRole -> OrgMemberRole
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrgMemberRole -> c OrgMemberRole
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrgMemberRole
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) -> OrgMemberRole -> u
forall u. (forall d. Data d => d -> u) -> OrgMemberRole -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrgMemberRole -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrgMemberRole -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OrgMemberRole -> m OrgMemberRole
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OrgMemberRole -> m OrgMemberRole
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrgMemberRole
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrgMemberRole -> c OrgMemberRole
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrgMemberRole)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrgMemberRole)
$cOrgMemberRoleMember :: Constr
$cOrgMemberRoleAdmin :: Constr
$cOrgMemberRoleAll :: Constr
$tOrgMemberRole :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> OrgMemberRole -> m OrgMemberRole
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OrgMemberRole -> m OrgMemberRole
gmapMp :: (forall d. Data d => d -> m d) -> OrgMemberRole -> m OrgMemberRole
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OrgMemberRole -> m OrgMemberRole
gmapM :: (forall d. Data d => d -> m d) -> OrgMemberRole -> m OrgMemberRole
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OrgMemberRole -> m OrgMemberRole
gmapQi :: Int -> (forall d. Data d => d -> u) -> OrgMemberRole -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> OrgMemberRole -> u
gmapQ :: (forall d. Data d => d -> u) -> OrgMemberRole -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> OrgMemberRole -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrgMemberRole -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrgMemberRole -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrgMemberRole -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrgMemberRole -> r
gmapT :: (forall b. Data b => b -> b) -> OrgMemberRole -> OrgMemberRole
$cgmapT :: (forall b. Data b => b -> b) -> OrgMemberRole -> OrgMemberRole
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrgMemberRole)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c OrgMemberRole)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c OrgMemberRole)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrgMemberRole)
dataTypeOf :: OrgMemberRole -> DataType
$cdataTypeOf :: OrgMemberRole -> DataType
toConstr :: OrgMemberRole -> Constr
$ctoConstr :: OrgMemberRole -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrgMemberRole
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrgMemberRole
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrgMemberRole -> c OrgMemberRole
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrgMemberRole -> c OrgMemberRole
$cp1Data :: Typeable OrgMemberRole
Data, (forall x. OrgMemberRole -> Rep OrgMemberRole x)
-> (forall x. Rep OrgMemberRole x -> OrgMemberRole)
-> Generic OrgMemberRole
forall x. Rep OrgMemberRole x -> OrgMemberRole
forall x. OrgMemberRole -> Rep OrgMemberRole x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OrgMemberRole x -> OrgMemberRole
$cfrom :: forall x. OrgMemberRole -> Rep OrgMemberRole x
Generic)

-- | Request query string
type QueryString = [(BS.ByteString, Maybe BS.ByteString)]

-- | Count of elements
type Count = Int

-------------------------------------------------------------------------------
-- IssueNumber
-------------------------------------------------------------------------------

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

unIssueNumber :: IssueNumber -> Int
unIssueNumber :: IssueNumber -> Int
unIssueNumber (IssueNumber Int
i) = Int
i

instance Hashable IssueNumber
instance Binary IssueNumber

instance NFData IssueNumber where
    rnf :: IssueNumber -> ()
rnf (IssueNumber Int
s) = Int -> ()
forall a. NFData a => a -> ()
rnf Int
s

instance FromJSON IssueNumber where
    parseJSON :: Value -> Parser IssueNumber
parseJSON = (Int -> IssueNumber) -> Parser Int -> Parser IssueNumber
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Int -> IssueNumber
IssueNumber (Parser Int -> Parser IssueNumber)
-> (Value -> Parser Int) -> Value -> Parser IssueNumber
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Value -> Parser Int
forall a. FromJSON a => Value -> Parser a
parseJSON

instance ToJSON IssueNumber where
    toJSON :: IssueNumber -> Value
toJSON = Int -> Value
forall a. ToJSON a => a -> Value
toJSON (Int -> Value) -> (IssueNumber -> Int) -> IssueNumber -> Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. IssueNumber -> Int
unIssueNumber

-------------------------------------------------------------------------------
-- IssueLabel
-------------------------------------------------------------------------------

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

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

instance FromJSON IssueLabel where
    parseJSON :: Value -> Parser IssueLabel
parseJSON = String
-> (Object -> Parser IssueLabel) -> Value -> Parser IssueLabel
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"IssueLabel" ((Object -> Parser IssueLabel) -> Value -> Parser IssueLabel)
-> (Object -> Parser IssueLabel) -> Value -> Parser IssueLabel
forall a b. (a -> b) -> a -> b
$ \Object
o -> Text -> URL -> Name IssueLabel -> Maybe Text -> IssueLabel
IssueLabel
        (Text -> URL -> Name IssueLabel -> Maybe Text -> IssueLabel)
-> Parser Text
-> Parser (URL -> Name IssueLabel -> Maybe Text -> IssueLabel)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"color"
        Parser (URL -> Name IssueLabel -> Maybe Text -> IssueLabel)
-> Parser URL
-> Parser (Name IssueLabel -> Maybe Text -> IssueLabel)
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 (Maybe a)
.:? Key
"url" Parser (Maybe URL) -> URL -> Parser URL
forall a. Parser (Maybe a) -> a -> Parser a
.!= Text -> URL
URL Text
"" -- in events there aren't URL
        Parser (Name IssueLabel -> Maybe Text -> IssueLabel)
-> Parser (Name IssueLabel) -> Parser (Maybe Text -> IssueLabel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Name IssueLabel)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"name"
        Parser (Maybe Text -> IssueLabel)
-> Parser (Maybe Text) -> Parser IssueLabel
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
"description"


-------------------------------------------------------------------------------
-- NewIssueLabel
-------------------------------------------------------------------------------

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

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


instance ToJSON NewIssueLabel where
    toJSON :: NewIssueLabel -> Value
toJSON (NewIssueLabel Text
color Name NewIssueLabel
lblName Maybe Text
lblDesc) = [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
"name" Key -> Name NewIssueLabel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Name NewIssueLabel
lblName
        , Key
"color" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
color
        , Key
"description" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
lblDesc
        ]
        where
            notNull :: (a, Value) -> Bool
notNull (a
_, Value
Null) = Bool
False
            notNull (a
_, Value
_)    = Bool
True



-------------------------------------------------------------------------------
-- UpdateIssueLabel
-------------------------------------------------------------------------------

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

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


instance ToJSON UpdateIssueLabel where
    toJSON :: UpdateIssueLabel -> Value
toJSON (UpdateIssueLabel Text
color Name UpdateIssueLabel
lblName Maybe Text
lblDesc) = [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
"new_name" Key -> Name UpdateIssueLabel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Name UpdateIssueLabel
lblName
        , Key
"color" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
color
        , Key
"description" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
lblDesc
        ]
        where
            notNull :: (a, Value) -> Bool
notNull (a
_, Value
Null) = Bool
False
            notNull (a
_, Value
_)    = Bool
True