{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.CommentAnalyzer.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data Xgafv
= X1
| X2
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable Xgafv
instance FromHttpApiData Xgafv where
parseQueryParam = \case
"1" -> Right X1
"2" -> Right X2
x -> Left ("Unable to parse Xgafv from: " <> x)
instance ToHttpApiData Xgafv where
toQueryParam = \case
X1 -> "1"
X2 -> "2"
instance FromJSON Xgafv where
parseJSON = parseJSONText "Xgafv"
instance ToJSON Xgafv where
toJSON = toJSONText
data ScoreType
= ScoreTypeUnspecified
| Probability
| StdDevScore
| Percentile
| Raw
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ScoreType
instance FromHttpApiData ScoreType where
parseQueryParam = \case
"SCORE_TYPE_UNSPECIFIED" -> Right ScoreTypeUnspecified
"PROBABILITY" -> Right Probability
"STD_DEV_SCORE" -> Right StdDevScore
"PERCENTILE" -> Right Percentile
"RAW" -> Right Raw
x -> Left ("Unable to parse ScoreType from: " <> x)
instance ToHttpApiData ScoreType where
toQueryParam = \case
ScoreTypeUnspecified -> "SCORE_TYPE_UNSPECIFIED"
Probability -> "PROBABILITY"
StdDevScore -> "STD_DEV_SCORE"
Percentile -> "PERCENTILE"
Raw -> "RAW"
instance FromJSON ScoreType where
parseJSON = parseJSONText "ScoreType"
instance ToJSON ScoreType where
toJSON = toJSONText
data AttributeParametersScoreType
= APSTScoreTypeUnspecified
| APSTProbability
| APSTStdDevScore
| APSTPercentile
| APSTRaw
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable AttributeParametersScoreType
instance FromHttpApiData AttributeParametersScoreType where
parseQueryParam = \case
"SCORE_TYPE_UNSPECIFIED" -> Right APSTScoreTypeUnspecified
"PROBABILITY" -> Right APSTProbability
"STD_DEV_SCORE" -> Right APSTStdDevScore
"PERCENTILE" -> Right APSTPercentile
"RAW" -> Right APSTRaw
x -> Left ("Unable to parse AttributeParametersScoreType from: " <> x)
instance ToHttpApiData AttributeParametersScoreType where
toQueryParam = \case
APSTScoreTypeUnspecified -> "SCORE_TYPE_UNSPECIFIED"
APSTProbability -> "PROBABILITY"
APSTStdDevScore -> "STD_DEV_SCORE"
APSTPercentile -> "PERCENTILE"
APSTRaw -> "RAW"
instance FromJSON AttributeParametersScoreType where
parseJSON = parseJSONText "AttributeParametersScoreType"
instance ToJSON AttributeParametersScoreType where
toJSON = toJSONText
data TextEntryType
= TextTypeUnspecified
| PlainText
| HTML
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable TextEntryType
instance FromHttpApiData TextEntryType where
parseQueryParam = \case
"TEXT_TYPE_UNSPECIFIED" -> Right TextTypeUnspecified
"PLAIN_TEXT" -> Right PlainText
"HTML" -> Right HTML
x -> Left ("Unable to parse TextEntryType from: " <> x)
instance ToHttpApiData TextEntryType where
toQueryParam = \case
TextTypeUnspecified -> "TEXT_TYPE_UNSPECIFIED"
PlainText -> "PLAIN_TEXT"
HTML -> "HTML"
instance FromJSON TextEntryType where
parseJSON = parseJSONText "TextEntryType"
instance ToJSON TextEntryType where
toJSON = toJSONText