module Network.Google.FreebaseSearch.Types.Sum where
import Network.Google.Prelude
data FreebaseSearchFormat
= AC
| Classic
| Entity
| Guids
| Ids
| Mids
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable FreebaseSearchFormat
instance FromText FreebaseSearchFormat where
fromText = \case
"ac" -> Just AC
"classic" -> Just Classic
"entity" -> Just Entity
"guids" -> Just Guids
"ids" -> Just Ids
"mids" -> Just Mids
_ -> Nothing
instance ToText FreebaseSearchFormat where
toText = \case
AC -> "ac"
Classic -> "classic"
Entity -> "entity"
Guids -> "guids"
Ids -> "ids"
Mids -> "mids"
instance FromJSON FreebaseSearchFormat where
parseJSON = parseJSONText "FreebaseSearchFormat"
instance ToJSON FreebaseSearchFormat where
toJSON = toJSONText
data FreebaseSearchScoring
= FSSEntity
| FSSFreebase
| FSSSchema
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable FreebaseSearchScoring
instance FromText FreebaseSearchScoring where
fromText = \case
"entity" -> Just FSSEntity
"freebase" -> Just FSSFreebase
"schema" -> Just FSSSchema
_ -> Nothing
instance ToText FreebaseSearchScoring where
toText = \case
FSSEntity -> "entity"
FSSFreebase -> "freebase"
FSSSchema -> "schema"
instance FromJSON FreebaseSearchScoring where
parseJSON = parseJSONText "FreebaseSearchScoring"
instance ToJSON FreebaseSearchScoring where
toJSON = toJSONText
data FreebaseSearchEncode
= HTML
| Off
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable FreebaseSearchEncode
instance FromText FreebaseSearchEncode where
fromText = \case
"html" -> Just HTML
"off" -> Just Off
_ -> Nothing
instance ToText FreebaseSearchEncode where
toText = \case
HTML -> "html"
Off -> "off"
instance FromJSON FreebaseSearchEncode where
parseJSON = parseJSONText "FreebaseSearchEncode"
instance ToJSON FreebaseSearchEncode where
toJSON = toJSONText
data FreebaseSearchHelp
= Langs
| MAppings
| Predicates
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable FreebaseSearchHelp
instance FromText FreebaseSearchHelp where
fromText = \case
"langs" -> Just Langs
"mappings" -> Just MAppings
"predicates" -> Just Predicates
_ -> Nothing
instance ToText FreebaseSearchHelp where
toText = \case
Langs -> "langs"
MAppings -> "mappings"
Predicates -> "predicates"
instance FromJSON FreebaseSearchHelp where
parseJSON = parseJSONText "FreebaseSearchHelp"
instance ToJSON FreebaseSearchHelp where
toJSON = toJSONText
data FreebaseSearchSpell
= Always
| NoResults
| NoSpelling
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable FreebaseSearchSpell
instance FromText FreebaseSearchSpell where
fromText = \case
"always" -> Just Always
"no_results" -> Just NoResults
"no_spelling" -> Just NoSpelling
_ -> Nothing
instance ToText FreebaseSearchSpell where
toText = \case
Always -> "always"
NoResults -> "no_results"
NoSpelling -> "no_spelling"
instance FromJSON FreebaseSearchSpell where
parseJSON = parseJSONText "FreebaseSearchSpell"
instance ToJSON FreebaseSearchSpell where
toJSON = toJSONText