{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}

module Hercules.API.Forge where

import Hercules.API.Forge.Forge (Forge)
import Hercules.API.Prelude
import Servant.API

data ForgeResourceGroup auth f = ForgeResourceGroup
  { forall auth f.
ForgeResourceGroup auth f
-> f :- (Summary "Get the forge." :> (auth :> Get '[JSON] Forge))
get ::
      f
        :- Summary ("Get the forge.")
          :> auth
          :> Get '[JSON] Forge,
    forall auth f.
ForgeResourceGroup auth f
-> f
   :- (Summary "Delete the forge."
       :> (auth :> Delete '[JSON] NoContent))
delete ::
      f
        :- Summary ("Delete the forge.")
          :> auth
          :> Delete '[JSON] NoContent
  }
  deriving (forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall auth f x.
Rep (ForgeResourceGroup auth f) x -> ForgeResourceGroup auth f
forall auth f x.
ForgeResourceGroup auth f -> Rep (ForgeResourceGroup auth f) x
$cto :: forall auth f x.
Rep (ForgeResourceGroup auth f) x -> ForgeResourceGroup auth f
$cfrom :: forall auth f x.
ForgeResourceGroup auth f -> Rep (ForgeResourceGroup auth f) x
Generic)

data ForgeAPI auth f = ForgeAPI
  { forall auth f.
ForgeAPI auth f
-> f
   :- Substitute
        ("forges" :> (Capture "forgeId" (Id Forge) :> Placeholder))
        (ToServantApi (ForgeResourceGroup auth))
forgeById ::
      f
        :- Substitute
             ("forges" :> Capture "forgeId" (Id Forge) :> Placeholder)
             (ToServantApi (ForgeResourceGroup auth)),
    forall auth f.
ForgeAPI auth f
-> f
   :- Substitute
        ("forge" :> (Capture "forgeName" (Name Forge) :> Placeholder))
        (ToServantApi (ForgeResourceGroup auth))
forgeByName ::
      f
        :- Substitute
             ( "forge"
                 :> Capture "forgeName" (Name Forge)
                 :> Placeholder
             )
             (ToServantApi (ForgeResourceGroup auth))
  }
  deriving (forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall auth f x. Rep (ForgeAPI auth f) x -> ForgeAPI auth f
forall auth f x. ForgeAPI auth f -> Rep (ForgeAPI auth f) x
$cto :: forall auth f x. Rep (ForgeAPI auth f) x -> ForgeAPI auth f
$cfrom :: forall auth f x. ForgeAPI auth f -> Rep (ForgeAPI auth f) x
Generic)