{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}

module Data.Morpheus.Client.Schema.JSON.TypeRef
  ( TypeRef (..),
  )
where

import Data.Aeson (FromJSON)
import Data.Morpheus.Types.Internal.AST
  ( TypeName,
  )
import Relude

newtype TypeRef = TypeRef {TypeRef -> TypeName
name :: TypeName}
  deriving ((forall x. TypeRef -> Rep TypeRef x)
-> (forall x. Rep TypeRef x -> TypeRef) -> Generic TypeRef
forall x. Rep TypeRef x -> TypeRef
forall x. TypeRef -> Rep TypeRef x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. TypeRef -> Rep TypeRef x
from :: forall x. TypeRef -> Rep TypeRef x
$cto :: forall x. Rep TypeRef x -> TypeRef
to :: forall x. Rep TypeRef x -> TypeRef
Generic, Int -> TypeRef -> ShowS
[TypeRef] -> ShowS
TypeRef -> String
(Int -> TypeRef -> ShowS)
-> (TypeRef -> String) -> ([TypeRef] -> ShowS) -> Show TypeRef
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TypeRef -> ShowS
showsPrec :: Int -> TypeRef -> ShowS
$cshow :: TypeRef -> String
show :: TypeRef -> String
$cshowList :: [TypeRef] -> ShowS
showList :: [TypeRef] -> ShowS
Show, Maybe TypeRef
Value -> Parser [TypeRef]
Value -> Parser TypeRef
(Value -> Parser TypeRef)
-> (Value -> Parser [TypeRef]) -> Maybe TypeRef -> FromJSON TypeRef
forall a.
(Value -> Parser a)
-> (Value -> Parser [a]) -> Maybe a -> FromJSON a
$cparseJSON :: Value -> Parser TypeRef
parseJSON :: Value -> Parser TypeRef
$cparseJSONList :: Value -> Parser [TypeRef]
parseJSONList :: Value -> Parser [TypeRef]
$comittedField :: Maybe TypeRef
omittedField :: Maybe TypeRef
FromJSON)