{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.PlusDomains.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data MediaInsertCollection
= Cloud
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable MediaInsertCollection
instance FromHttpApiData MediaInsertCollection where
parseQueryParam = \case
"cloud" -> Right Cloud
x -> Left ("Unable to parse MediaInsertCollection from: " <> x)
instance ToHttpApiData MediaInsertCollection where
toQueryParam = \case
Cloud -> "cloud"
instance FromJSON MediaInsertCollection where
parseJSON = parseJSONText "MediaInsertCollection"
instance ToJSON MediaInsertCollection where
toJSON = toJSONText
data PeopleListByActivityCollection
= Plusoners
| Resharers
| Sharedto
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PeopleListByActivityCollection
instance FromHttpApiData PeopleListByActivityCollection where
parseQueryParam = \case
"plusoners" -> Right Plusoners
"resharers" -> Right Resharers
"sharedto" -> Right Sharedto
x -> Left ("Unable to parse PeopleListByActivityCollection from: " <> x)
instance ToHttpApiData PeopleListByActivityCollection where
toQueryParam = \case
Plusoners -> "plusoners"
Resharers -> "resharers"
Sharedto -> "sharedto"
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
= User
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ActivitiesListCollection
instance FromHttpApiData ActivitiesListCollection where
parseQueryParam = \case
"user" -> Right User
x -> Left ("Unable to parse ActivitiesListCollection from: " <> x)
instance ToHttpApiData ActivitiesListCollection where
toQueryParam = \case
User -> "user"
instance FromJSON ActivitiesListCollection where
parseJSON = parseJSONText "ActivitiesListCollection"
instance ToJSON ActivitiesListCollection where
toJSON = toJSONText
data PeopleListCollection
= Circled
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PeopleListCollection
instance FromHttpApiData PeopleListCollection where
parseQueryParam = \case
"circled" -> Right Circled
x -> Left ("Unable to parse PeopleListCollection from: " <> x)
instance ToHttpApiData PeopleListCollection where
toQueryParam = \case
Circled -> "circled"
instance FromJSON PeopleListCollection where
parseJSON = parseJSONText "PeopleListCollection"
instance ToJSON PeopleListCollection 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