{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.FirebaseRemoteConfig.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 RemoteConfigConditionTagColor
= ConditionDisplayColorUnspecified
| Blue
| Brown
| Cyan
| DeepOrange
| Green
| Indigo
| Lime
| Orange
| Pink
| Purple
| Teal
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable RemoteConfigConditionTagColor
instance FromHttpApiData RemoteConfigConditionTagColor where
parseQueryParam = \case
"CONDITION_DISPLAY_COLOR_UNSPECIFIED" -> Right ConditionDisplayColorUnspecified
"BLUE" -> Right Blue
"BROWN" -> Right Brown
"CYAN" -> Right Cyan
"DEEP_ORANGE" -> Right DeepOrange
"GREEN" -> Right Green
"INDIGO" -> Right Indigo
"LIME" -> Right Lime
"ORANGE" -> Right Orange
"PINK" -> Right Pink
"PURPLE" -> Right Purple
"TEAL" -> Right Teal
x -> Left ("Unable to parse RemoteConfigConditionTagColor from: " <> x)
instance ToHttpApiData RemoteConfigConditionTagColor where
toQueryParam = \case
ConditionDisplayColorUnspecified -> "CONDITION_DISPLAY_COLOR_UNSPECIFIED"
Blue -> "BLUE"
Brown -> "BROWN"
Cyan -> "CYAN"
DeepOrange -> "DEEP_ORANGE"
Green -> "GREEN"
Indigo -> "INDIGO"
Lime -> "LIME"
Orange -> "ORANGE"
Pink -> "PINK"
Purple -> "PURPLE"
Teal -> "TEAL"
instance FromJSON RemoteConfigConditionTagColor where
parseJSON = parseJSONText "RemoteConfigConditionTagColor"
instance ToJSON RemoteConfigConditionTagColor where
toJSON = toJSONText