{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.AppsCalendar.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data EventsPatchSendUpdates
= All
| ExternalOnly
| None
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable EventsPatchSendUpdates
instance FromHttpApiData EventsPatchSendUpdates where
parseQueryParam = \case
"all" -> Right All
"externalOnly" -> Right ExternalOnly
"none" -> Right None
x -> Left ("Unable to parse EventsPatchSendUpdates from: " <> x)
instance ToHttpApiData EventsPatchSendUpdates where
toQueryParam = \case
All -> "all"
ExternalOnly -> "externalOnly"
None -> "none"
instance FromJSON EventsPatchSendUpdates where
parseJSON = parseJSONText "EventsPatchSendUpdates"
instance ToJSON EventsPatchSendUpdates where
toJSON = toJSONText
data EventsQuickAddSendUpdates
= EQASUAll
| EQASUExternalOnly
| EQASUNone
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable EventsQuickAddSendUpdates
instance FromHttpApiData EventsQuickAddSendUpdates where
parseQueryParam = \case
"all" -> Right EQASUAll
"externalOnly" -> Right EQASUExternalOnly
"none" -> Right EQASUNone
x -> Left ("Unable to parse EventsQuickAddSendUpdates from: " <> x)
instance ToHttpApiData EventsQuickAddSendUpdates where
toQueryParam = \case
EQASUAll -> "all"
EQASUExternalOnly -> "externalOnly"
EQASUNone -> "none"
instance FromJSON EventsQuickAddSendUpdates where
parseJSON = parseJSONText "EventsQuickAddSendUpdates"
instance ToJSON EventsQuickAddSendUpdates where
toJSON = toJSONText
data EventsUpdateSendUpdates
= EUSUAll
| EUSUExternalOnly
| EUSUNone
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable EventsUpdateSendUpdates
instance FromHttpApiData EventsUpdateSendUpdates where
parseQueryParam = \case
"all" -> Right EUSUAll
"externalOnly" -> Right EUSUExternalOnly
"none" -> Right EUSUNone
x -> Left ("Unable to parse EventsUpdateSendUpdates from: " <> x)
instance ToHttpApiData EventsUpdateSendUpdates where
toQueryParam = \case
EUSUAll -> "all"
EUSUExternalOnly -> "externalOnly"
EUSUNone -> "none"
instance FromJSON EventsUpdateSendUpdates where
parseJSON = parseJSONText "EventsUpdateSendUpdates"
instance ToJSON EventsUpdateSendUpdates where
toJSON = toJSONText
data EventsMoveSendUpdates
= EMSUAll
| EMSUExternalOnly
| EMSUNone
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable EventsMoveSendUpdates
instance FromHttpApiData EventsMoveSendUpdates where
parseQueryParam = \case
"all" -> Right EMSUAll
"externalOnly" -> Right EMSUExternalOnly
"none" -> Right EMSUNone
x -> Left ("Unable to parse EventsMoveSendUpdates from: " <> x)
instance ToHttpApiData EventsMoveSendUpdates where
toQueryParam = \case
EMSUAll -> "all"
EMSUExternalOnly -> "externalOnly"
EMSUNone -> "none"
instance FromJSON EventsMoveSendUpdates where
parseJSON = parseJSONText "EventsMoveSendUpdates"
instance ToJSON EventsMoveSendUpdates where
toJSON = toJSONText
data EventsListOrderBy
= StartTime
| Updated
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable EventsListOrderBy
instance FromHttpApiData EventsListOrderBy where
parseQueryParam = \case
"startTime" -> Right StartTime
"updated" -> Right Updated
x -> Left ("Unable to parse EventsListOrderBy from: " <> x)
instance ToHttpApiData EventsListOrderBy where
toQueryParam = \case
StartTime -> "startTime"
Updated -> "updated"
instance FromJSON EventsListOrderBy where
parseJSON = parseJSONText "EventsListOrderBy"
instance ToJSON EventsListOrderBy where
toJSON = toJSONText
data EventsDeleteSendUpdates
= EDSUAll
| EDSUExternalOnly
| EDSUNone
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable EventsDeleteSendUpdates
instance FromHttpApiData EventsDeleteSendUpdates where
parseQueryParam = \case
"all" -> Right EDSUAll
"externalOnly" -> Right EDSUExternalOnly
"none" -> Right EDSUNone
x -> Left ("Unable to parse EventsDeleteSendUpdates from: " <> x)
instance ToHttpApiData EventsDeleteSendUpdates where
toQueryParam = \case
EDSUAll -> "all"
EDSUExternalOnly -> "externalOnly"
EDSUNone -> "none"
instance FromJSON EventsDeleteSendUpdates where
parseJSON = parseJSONText "EventsDeleteSendUpdates"
instance ToJSON EventsDeleteSendUpdates where
toJSON = toJSONText
data EventsInsertSendUpdates
= EISUAll
| EISUExternalOnly
| EISUNone
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable EventsInsertSendUpdates
instance FromHttpApiData EventsInsertSendUpdates where
parseQueryParam = \case
"all" -> Right EISUAll
"externalOnly" -> Right EISUExternalOnly
"none" -> Right EISUNone
x -> Left ("Unable to parse EventsInsertSendUpdates from: " <> x)
instance ToHttpApiData EventsInsertSendUpdates where
toQueryParam = \case
EISUAll -> "all"
EISUExternalOnly -> "externalOnly"
EISUNone -> "none"
instance FromJSON EventsInsertSendUpdates where
parseJSON = parseJSONText "EventsInsertSendUpdates"
instance ToJSON EventsInsertSendUpdates where
toJSON = toJSONText
data CalendarListListMinAccessRole
= FreeBusyReader
| Owner
| Reader
| Writer
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CalendarListListMinAccessRole
instance FromHttpApiData CalendarListListMinAccessRole where
parseQueryParam = \case
"freeBusyReader" -> Right FreeBusyReader
"owner" -> Right Owner
"reader" -> Right Reader
"writer" -> Right Writer
x -> Left ("Unable to parse CalendarListListMinAccessRole from: " <> x)
instance ToHttpApiData CalendarListListMinAccessRole where
toQueryParam = \case
FreeBusyReader -> "freeBusyReader"
Owner -> "owner"
Reader -> "reader"
Writer -> "writer"
instance FromJSON CalendarListListMinAccessRole where
parseJSON = parseJSONText "CalendarListListMinAccessRole"
instance ToJSON CalendarListListMinAccessRole where
toJSON = toJSONText
data EventsWatchOrderBy
= EWOBStartTime
| EWOBUpdated
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable EventsWatchOrderBy
instance FromHttpApiData EventsWatchOrderBy where
parseQueryParam = \case
"startTime" -> Right EWOBStartTime
"updated" -> Right EWOBUpdated
x -> Left ("Unable to parse EventsWatchOrderBy from: " <> x)
instance ToHttpApiData EventsWatchOrderBy where
toQueryParam = \case
EWOBStartTime -> "startTime"
EWOBUpdated -> "updated"
instance FromJSON EventsWatchOrderBy where
parseJSON = parseJSONText "EventsWatchOrderBy"
instance ToJSON EventsWatchOrderBy where
toJSON = toJSONText
data CalendarListWatchMinAccessRole
= CLWMARFreeBusyReader
| CLWMAROwner
| CLWMARReader
| CLWMARWriter
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CalendarListWatchMinAccessRole
instance FromHttpApiData CalendarListWatchMinAccessRole where
parseQueryParam = \case
"freeBusyReader" -> Right CLWMARFreeBusyReader
"owner" -> Right CLWMAROwner
"reader" -> Right CLWMARReader
"writer" -> Right CLWMARWriter
x -> Left ("Unable to parse CalendarListWatchMinAccessRole from: " <> x)
instance ToHttpApiData CalendarListWatchMinAccessRole where
toQueryParam = \case
CLWMARFreeBusyReader -> "freeBusyReader"
CLWMAROwner -> "owner"
CLWMARReader -> "reader"
CLWMARWriter -> "writer"
instance FromJSON CalendarListWatchMinAccessRole where
parseJSON = parseJSONText "CalendarListWatchMinAccessRole"
instance ToJSON CalendarListWatchMinAccessRole where
toJSON = toJSONText