{-|
Module      : Gargantext.Database.Admin.Types.Hyperdata.Prelude
Description :
Copyright   : (c) CNRS, 2017-Present
License     : AGPL + CECILL v3
Maintainer  : team@gargantext.org
Stability   : experimental
Portability : POSIX

-}


module Gargantext.Database.Admin.Types.Hyperdata.Prelude
  ( module Control.Lens 
  , module Data.Aeson
  , module Data.Aeson.TH
  , module Data.Aeson.Types
  , module Data.ByteString.Lazy.Internal
  , module Data.Maybe
  , module Data.Monoid
  , module Data.Swagger
  , module Data.Text
  , module Database.PostgreSQL.Simple.FromField
  , module Database.PostgreSQL.Simple.ToField
  , module GHC.Generics
  , module Gargantext.Core.Utils.Prefix
  , module Gargantext.Database.Prelude
  , module Opaleye
  , module Test.QuickCheck
  , module Test.QuickCheck.Arbitrary
  , Hyperdata
  , Chart(..)
  )
  where

import Control.Lens hiding (elements, (&), (.=), Indexed)
import Data.Aeson
import Data.Aeson.TH (deriveJSON)
import Data.Aeson.Types (emptyObject)
import Data.ByteString.Lazy.Internal (ByteString)
import Data.Maybe (Maybe(..))
import Data.Monoid (mempty)
import Data.Swagger hiding (unwrapUnaryRecords, constructorTagModifier, allNullaryToStringTag, allOf, fieldLabelModifier)
import Data.Text (Text)
import Database.PostgreSQL.Simple.FromField (FromField, fromField)
import Database.PostgreSQL.Simple.ToField (ToField, toField, toJSONField)
import GHC.Generics (Generic)
import Gargantext.Core.Utils.Prefix (unPrefix, unPrefixSwagger, wellNamedSchema)
import Gargantext.Database.Prelude (fromField')
import Gargantext.Prelude
import Opaleye (DefaultFromField, defaultFromField, PGJsonb, fieldQueryRunnerColumn, Nullable)
import Test.QuickCheck (elements)
import Test.QuickCheck.Arbitrary hiding (vector)

------------------------------------------------------------------------
-- Only Hyperdata types should be member of this type class.
class Hyperdata a


data Chart =
    CDocsHistogram
  | CAuthorsPie
  | CInstitutesTree
  | CTermsMetrics
  deriving ((forall x. Chart -> Rep Chart x)
-> (forall x. Rep Chart x -> Chart) -> Generic Chart
forall x. Rep Chart x -> Chart
forall x. Chart -> Rep Chart x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Chart x -> Chart
$cfrom :: forall x. Chart -> Rep Chart x
Generic, Int -> Chart -> ShowS
[Chart] -> ShowS
Chart -> String
(Int -> Chart -> ShowS)
-> (Chart -> String) -> ([Chart] -> ShowS) -> Show Chart
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Chart] -> ShowS
$cshowList :: [Chart] -> ShowS
show :: Chart -> String
$cshow :: Chart -> String
showsPrec :: Int -> Chart -> ShowS
$cshowsPrec :: Int -> Chart -> ShowS
Show, Chart -> Chart -> Bool
(Chart -> Chart -> Bool) -> (Chart -> Chart -> Bool) -> Eq Chart
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Chart -> Chart -> Bool
$c/= :: Chart -> Chart -> Bool
== :: Chart -> Chart -> Bool
$c== :: Chart -> Chart -> Bool
Eq)
instance ToJSON Chart
instance FromJSON Chart
instance ToSchema Chart