{-# 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. RepoKey -> Rep RepoKey x)
-> (forall x. Rep RepoKey x -> RepoKey) -> Generic RepoKey
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
(Int -> RepoKey -> ShowS)
-> (RepoKey -> String) -> ([RepoKey] -> ShowS) -> Show RepoKey
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
(RepoKey -> RepoKey -> Bool)
-> (RepoKey -> RepoKey -> Bool) -> Eq RepoKey
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 -> ()
(RepoKey -> ()) -> NFData RepoKey
forall a. (a -> ()) -> NFData a
rnf :: RepoKey -> ()
$crnf :: RepoKey -> ()
NFData, [RepoKey] -> Encoding
[RepoKey] -> Value
RepoKey -> Encoding
RepoKey -> Value
(RepoKey -> Value)
-> (RepoKey -> Encoding)
-> ([RepoKey] -> Value)
-> ([RepoKey] -> Encoding)
-> ToJSON RepoKey
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
(Value -> Parser RepoKey)
-> (Value -> Parser [RepoKey]) -> FromJSON 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
(Proxy RepoKey -> Declare (Definitions Schema) NamedSchema)
-> ToSchema RepoKey
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)