{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric      #-}
{-# LANGUAGE LambdaCase         #-}
{-# LANGUAGE NoImplicitPrelude  #-}
{-# LANGUAGE OverloadedStrings  #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.BigQuery.Types.Sum where
import           Network.Google.Prelude hiding (Bytes)
data JobsListProjection
    = Full
      
      
    | Minimal
      
      
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable JobsListProjection
instance FromHttpApiData JobsListProjection where
    parseQueryParam = \case
        "full" -> Right Full
        "minimal" -> Right Minimal
        x -> Left ("Unable to parse JobsListProjection from: " <> x)
instance ToHttpApiData JobsListProjection where
    toQueryParam = \case
        Full -> "full"
        Minimal -> "minimal"
instance FromJSON JobsListProjection where
    parseJSON = parseJSONText "JobsListProjection"
instance ToJSON JobsListProjection where
    toJSON = toJSONText
data JobsListStateFilter
    = Done
      
      
    | Pending
      
      
    | Running
      
      
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable JobsListStateFilter
instance FromHttpApiData JobsListStateFilter where
    parseQueryParam = \case
        "done" -> Right Done
        "pending" -> Right Pending
        "running" -> Right Running
        x -> Left ("Unable to parse JobsListStateFilter from: " <> x)
instance ToHttpApiData JobsListStateFilter where
    toQueryParam = \case
        Done -> "done"
        Pending -> "pending"
        Running -> "running"
instance FromJSON JobsListStateFilter where
    parseJSON = parseJSONText "JobsListStateFilter"
instance ToJSON JobsListStateFilter where
    toJSON = toJSONText