{-
   Ory Hydra API

   Documentation for all of Ory Hydra's APIs. 

   OpenAPI Version: 3.0.3
   Ory Hydra API API version: 
   Contact: hi@ory.sh
   Generated by OpenAPI Generator (https://openapi-generator.tech)
-}

{-|
Module : OryHydra.API.Metadata
-}

{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MonoLocalBinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-}

module OryHydra.API.Metadata where

import OryHydra.Core
import OryHydra.MimeTypes
import OryHydra.Model as M

import qualified Data.Aeson as A
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep)
import qualified Data.Foldable as P
import qualified Data.Map as Map
import qualified Data.Maybe as P
import qualified Data.Proxy as P (Proxy(..))
import qualified Data.Set as Set
import qualified Data.String as P
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.Encoding as TL
import qualified Data.Time as TI
import qualified Network.HTTP.Client.MultipartFormData as NH
import qualified Network.HTTP.Media as ME
import qualified Network.HTTP.Types as NH
import qualified Web.FormUrlEncoded as WH
import qualified Web.HttpApiData as WH

import Data.Text (Text)
import GHC.Base ((<|>))

import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)
import qualified Prelude as P

-- * Operations


-- ** Metadata

-- *** getVersion

-- | @GET \/version@
-- 
-- Return Running Software Version.
-- 
-- This endpoint returns the version of Ory Hydra.  If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set.  Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance.
-- 
getVersion
  :: OryHydraRequest GetVersion MimeNoContent GetVersion200Response MimeJSON
getVersion :: OryHydraRequest
  GetVersion MimeNoContent GetVersion200Response MimeJSON
getVersion =
  forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/version"]

data GetVersion  
-- | @application/json@
instance Produces GetVersion MimeJSON


-- *** isAlive

-- | @GET \/health\/alive@
-- 
-- Check HTTP Server Status
-- 
-- This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working.  If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set.  Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
-- 
isAlive
  :: OryHydraRequest IsAlive MimeNoContent HealthStatus MimeJSON
isAlive :: OryHydraRequest IsAlive MimeNoContent HealthStatus MimeJSON
isAlive =
  forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/health/alive"]

data IsAlive  
-- | @application/json@
instance Produces IsAlive MimeJSON


-- *** isReady

-- | @GET \/health\/ready@
-- 
-- Check HTTP Server and Database Status
-- 
-- This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well.  If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set.  Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance.
-- 
isReady
  :: OryHydraRequest IsReady MimeNoContent IsReady200Response MimeJSON
isReady :: OryHydraRequest IsReady MimeNoContent IsReady200Response MimeJSON
isReady =
  forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/health/ready"]

data IsReady  
-- | @application/json@
instance Produces IsReady MimeJSON