{-# LANGUAGE DeriveAnyClass #-}

module Hercules.API.Repos.RepoKey where

import Hercules.API.Prelude
import Hercules.API.Projects.Project (Project)

data RepoKey = RepoKey
  { RepoKey -> Text
siteName :: Text,
    RepoKey -> Text
ownerName :: Text,
    RepoKey -> Text
repoName :: Text,
    RepoKey -> Maybe (Id Project)
projectId :: Maybe (Id Project)
  }
  deriving (forall x. Rep RepoKey x -> RepoKey
forall x. RepoKey -> Rep RepoKey x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RepoKey x -> RepoKey
$cfrom :: forall x. RepoKey -> Rep RepoKey x
Generic, Int -> RepoKey -> ShowS
[RepoKey] -> ShowS
RepoKey -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RepoKey] -> ShowS
$cshowList :: [RepoKey] -> ShowS
show :: RepoKey -> String
$cshow :: RepoKey -> String
showsPrec :: Int -> RepoKey -> ShowS
$cshowsPrec :: Int -> RepoKey -> ShowS
Show, RepoKey -> RepoKey -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RepoKey -> RepoKey -> Bool
$c/= :: RepoKey -> RepoKey -> Bool
== :: RepoKey -> RepoKey -> Bool
$c== :: RepoKey -> RepoKey -> Bool
Eq, RepoKey -> ()
forall a. (a -> ()) -> NFData a
rnf :: RepoKey -> ()
$crnf :: RepoKey -> ()
NFData, [RepoKey] -> Encoding
[RepoKey] -> Value
RepoKey -> Encoding
RepoKey -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [RepoKey] -> Encoding
$ctoEncodingList :: [RepoKey] -> Encoding
toJSONList :: [RepoKey] -> Value
$ctoJSONList :: [RepoKey] -> Value
toEncoding :: RepoKey -> Encoding
$ctoEncoding :: RepoKey -> Encoding
toJSON :: RepoKey -> Value
$ctoJSON :: RepoKey -> Value
ToJSON, Value -> Parser [RepoKey]
Value -> Parser RepoKey
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [RepoKey]
$cparseJSONList :: Value -> Parser [RepoKey]
parseJSON :: Value -> Parser RepoKey
$cparseJSON :: Value -> Parser RepoKey
FromJSON, Proxy RepoKey -> Declare (Definitions Schema) NamedSchema
forall a.
(Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a
declareNamedSchema :: Proxy RepoKey -> Declare (Definitions Schema) NamedSchema
$cdeclareNamedSchema :: Proxy RepoKey -> Declare (Definitions Schema) NamedSchema
ToSchema)