{-# LANGUAGE DeriveAnyClass #-}

module Hercules.API.Forge.Forge where

import Hercules.API.Prelude

-- | A source hosting site (example github for github.com) used for
-- source code, permissions, CI statuses, ...
data Forge = Forge
  { Forge -> Id Forge
id :: Id Forge,
    Forge -> Name Forge
slug :: Name Forge,
    Forge -> Text
displayName :: Text,
    Forge -> Text
typ :: Text,
    Forge -> Maybe Text
newInstallationURL :: Maybe Text,
    -- | Does the requesting user have admin permissions?
    Forge -> Maybe Bool
adminPermission :: Maybe Bool
  }
  deriving (forall x. Rep Forge x -> Forge
forall x. Forge -> Rep Forge x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Forge x -> Forge
$cfrom :: forall x. Forge -> Rep Forge x
Generic, Int -> Forge -> ShowS
[Forge] -> ShowS
Forge -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Forge] -> ShowS
$cshowList :: [Forge] -> ShowS
show :: Forge -> String
$cshow :: Forge -> String
showsPrec :: Int -> Forge -> ShowS
$cshowsPrec :: Int -> Forge -> ShowS
Show, Forge -> Forge -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Forge -> Forge -> Bool
$c/= :: Forge -> Forge -> Bool
== :: Forge -> Forge -> Bool
$c== :: Forge -> Forge -> Bool
Eq, Forge -> ()
forall a. (a -> ()) -> NFData a
rnf :: Forge -> ()
$crnf :: Forge -> ()
NFData, [Forge] -> Encoding
[Forge] -> Value
Forge -> Encoding
Forge -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Forge] -> Encoding
$ctoEncodingList :: [Forge] -> Encoding
toJSONList :: [Forge] -> Value
$ctoJSONList :: [Forge] -> Value
toEncoding :: Forge -> Encoding
$ctoEncoding :: Forge -> Encoding
toJSON :: Forge -> Value
$ctoJSON :: Forge -> Value
ToJSON, Value -> Parser [Forge]
Value -> Parser Forge
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Forge]
$cparseJSONList :: Value -> Parser [Forge]
parseJSON :: Value -> Parser Forge
$cparseJSON :: Value -> Parser Forge
FromJSON, Proxy Forge -> Declare (Definitions Schema) NamedSchema
forall a.
(Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a
declareNamedSchema :: Proxy Forge -> Declare (Definitions Schema) NamedSchema
$cdeclareNamedSchema :: Proxy Forge -> Declare (Definitions Schema) NamedSchema
ToSchema)