{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Analytics.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data DataGaGetSamplingLevel
= Default
| Faster
| HigherPrecision
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DataGaGetSamplingLevel
instance FromHttpApiData DataGaGetSamplingLevel where
parseQueryParam = \case
"DEFAULT" -> Right Default
"FASTER" -> Right Faster
"HIGHER_PRECISION" -> Right HigherPrecision
x -> Left ("Unable to parse DataGaGetSamplingLevel from: " <> x)
instance ToHttpApiData DataGaGetSamplingLevel where
toQueryParam = \case
Default -> "DEFAULT"
Faster -> "FASTER"
HigherPrecision -> "HIGHER_PRECISION"
instance FromJSON DataGaGetSamplingLevel where
parseJSON = parseJSONText "DataGaGetSamplingLevel"
instance ToJSON DataGaGetSamplingLevel where
toJSON = toJSONText
data DataGaGetOutput
= DataTable
| JSON
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DataGaGetOutput
instance FromHttpApiData DataGaGetOutput where
parseQueryParam = \case
"dataTable" -> Right DataTable
"json" -> Right JSON
x -> Left ("Unable to parse DataGaGetOutput from: " <> x)
instance ToHttpApiData DataGaGetOutput where
toQueryParam = \case
DataTable -> "dataTable"
JSON -> "json"
instance FromJSON DataGaGetOutput where
parseJSON = parseJSONText "DataGaGetOutput"
instance ToJSON DataGaGetOutput where
toJSON = toJSONText
data DataMcfGetSamplingLevel
= DMGSLDefault
| DMGSLFaster
| DMGSLHigherPrecision
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DataMcfGetSamplingLevel
instance FromHttpApiData DataMcfGetSamplingLevel where
parseQueryParam = \case
"DEFAULT" -> Right DMGSLDefault
"FASTER" -> Right DMGSLFaster
"HIGHER_PRECISION" -> Right DMGSLHigherPrecision
x -> Left ("Unable to parse DataMcfGetSamplingLevel from: " <> x)
instance ToHttpApiData DataMcfGetSamplingLevel where
toQueryParam = \case
DMGSLDefault -> "DEFAULT"
DMGSLFaster -> "FASTER"
DMGSLHigherPrecision -> "HIGHER_PRECISION"
instance FromJSON DataMcfGetSamplingLevel where
parseJSON = parseJSONText "DataMcfGetSamplingLevel"
instance ToJSON DataMcfGetSamplingLevel where
toJSON = toJSONText