{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Plus.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data PeopleListByActivityCollection
= Plusoners
| Resharers
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PeopleListByActivityCollection
instance FromHttpApiData PeopleListByActivityCollection where
parseQueryParam = \case
"plusoners" -> Right Plusoners
"resharers" -> Right Resharers
x -> Left ("Unable to parse PeopleListByActivityCollection from: " <> x)
instance ToHttpApiData PeopleListByActivityCollection where
toQueryParam = \case
Plusoners -> "plusoners"
Resharers -> "resharers"
instance FromJSON PeopleListByActivityCollection where
parseJSON = parseJSONText "PeopleListByActivityCollection"
instance ToJSON PeopleListByActivityCollection where
toJSON = toJSONText
data PeopleListOrderBy
= Alphabetical
| Best
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PeopleListOrderBy
instance FromHttpApiData PeopleListOrderBy where
parseQueryParam = \case
"alphabetical" -> Right Alphabetical
"best" -> Right Best
x -> Left ("Unable to parse PeopleListOrderBy from: " <> x)
instance ToHttpApiData PeopleListOrderBy where
toQueryParam = \case
Alphabetical -> "alphabetical"
Best -> "best"
instance FromJSON PeopleListOrderBy where
parseJSON = parseJSONText "PeopleListOrderBy"
instance ToJSON PeopleListOrderBy where
toJSON = toJSONText
data ActivitiesListCollection
= Public
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ActivitiesListCollection
instance FromHttpApiData ActivitiesListCollection where
parseQueryParam = \case
"public" -> Right Public
x -> Left ("Unable to parse ActivitiesListCollection from: " <> x)
instance ToHttpApiData ActivitiesListCollection where
toQueryParam = \case
Public -> "public"
instance FromJSON ActivitiesListCollection where
parseJSON = parseJSONText "ActivitiesListCollection"
instance ToJSON ActivitiesListCollection where
toJSON = toJSONText
data PeopleListCollection
= Connected
| Visible
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PeopleListCollection
instance FromHttpApiData PeopleListCollection where
parseQueryParam = \case
"connected" -> Right Connected
"visible" -> Right Visible
x -> Left ("Unable to parse PeopleListCollection from: " <> x)
instance ToHttpApiData PeopleListCollection where
toQueryParam = \case
Connected -> "connected"
Visible -> "visible"
instance FromJSON PeopleListCollection where
parseJSON = parseJSONText "PeopleListCollection"
instance ToJSON PeopleListCollection where
toJSON = toJSONText
data ActivitiesSearchOrderBy
= ASOBBest
| ASOBRecent
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ActivitiesSearchOrderBy
instance FromHttpApiData ActivitiesSearchOrderBy where
parseQueryParam = \case
"best" -> Right ASOBBest
"recent" -> Right ASOBRecent
x -> Left ("Unable to parse ActivitiesSearchOrderBy from: " <> x)
instance ToHttpApiData ActivitiesSearchOrderBy where
toQueryParam = \case
ASOBBest -> "best"
ASOBRecent -> "recent"
instance FromJSON ActivitiesSearchOrderBy where
parseJSON = parseJSONText "ActivitiesSearchOrderBy"
instance ToJSON ActivitiesSearchOrderBy where
toJSON = toJSONText
data CommentsListSortOrder
= Ascending
| Descending
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CommentsListSortOrder
instance FromHttpApiData CommentsListSortOrder where
parseQueryParam = \case
"ascending" -> Right Ascending
"descending" -> Right Descending
x -> Left ("Unable to parse CommentsListSortOrder from: " <> x)
instance ToHttpApiData CommentsListSortOrder where
toQueryParam = \case
Ascending -> "ascending"
Descending -> "descending"
instance FromJSON CommentsListSortOrder where
parseJSON = parseJSONText "CommentsListSortOrder"
instance ToJSON CommentsListSortOrder where
toJSON = toJSONText