{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Chat.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data KeyValueIcon
= KVIIconUnspecified
| KVIAirplane
| KVIBookmark
| KVIBus
| KVICar
| KVIClock
| KVIConfirmationNumberIcon
| KVIDollar
| KVIDescription
| KVIEmail
| KVIEventPerformer
| KVIEventSeat
| KVIFlightArrival
| KVIFlightDeParture
| KVIHotel
| KVIHotelRoomType
| KVIInvite
| KVIMapPin
| KVIMembership
| KVIMultiplePeople
| KVIOffer
| KVIPerson
| KVIPhone
| KVIRestaurantIcon
| KVIShoppingCart
| KVIStar
| KVIStore
| KVITicket
| KVITrain
| KVIVideoCamera
| KVIVideoPlay
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable KeyValueIcon
instance FromHttpApiData KeyValueIcon where
parseQueryParam = \case
"ICON_UNSPECIFIED" -> Right KVIIconUnspecified
"AIRPLANE" -> Right KVIAirplane
"BOOKMARK" -> Right KVIBookmark
"BUS" -> Right KVIBus
"CAR" -> Right KVICar
"CLOCK" -> Right KVIClock
"CONFIRMATION_NUMBER_ICON" -> Right KVIConfirmationNumberIcon
"DOLLAR" -> Right KVIDollar
"DESCRIPTION" -> Right KVIDescription
"EMAIL" -> Right KVIEmail
"EVENT_PERFORMER" -> Right KVIEventPerformer
"EVENT_SEAT" -> Right KVIEventSeat
"FLIGHT_ARRIVAL" -> Right KVIFlightArrival
"FLIGHT_DEPARTURE" -> Right KVIFlightDeParture
"HOTEL" -> Right KVIHotel
"HOTEL_ROOM_TYPE" -> Right KVIHotelRoomType
"INVITE" -> Right KVIInvite
"MAP_PIN" -> Right KVIMapPin
"MEMBERSHIP" -> Right KVIMembership
"MULTIPLE_PEOPLE" -> Right KVIMultiplePeople
"OFFER" -> Right KVIOffer
"PERSON" -> Right KVIPerson
"PHONE" -> Right KVIPhone
"RESTAURANT_ICON" -> Right KVIRestaurantIcon
"SHOPPING_CART" -> Right KVIShoppingCart
"STAR" -> Right KVIStar
"STORE" -> Right KVIStore
"TICKET" -> Right KVITicket
"TRAIN" -> Right KVITrain
"VIDEO_CAMERA" -> Right KVIVideoCamera
"VIDEO_PLAY" -> Right KVIVideoPlay
x -> Left ("Unable to parse KeyValueIcon from: " <> x)
instance ToHttpApiData KeyValueIcon where
toQueryParam = \case
KVIIconUnspecified -> "ICON_UNSPECIFIED"
KVIAirplane -> "AIRPLANE"
KVIBookmark -> "BOOKMARK"
KVIBus -> "BUS"
KVICar -> "CAR"
KVIClock -> "CLOCK"
KVIConfirmationNumberIcon -> "CONFIRMATION_NUMBER_ICON"
KVIDollar -> "DOLLAR"
KVIDescription -> "DESCRIPTION"
KVIEmail -> "EMAIL"
KVIEventPerformer -> "EVENT_PERFORMER"
KVIEventSeat -> "EVENT_SEAT"
KVIFlightArrival -> "FLIGHT_ARRIVAL"
KVIFlightDeParture -> "FLIGHT_DEPARTURE"
KVIHotel -> "HOTEL"
KVIHotelRoomType -> "HOTEL_ROOM_TYPE"
KVIInvite -> "INVITE"
KVIMapPin -> "MAP_PIN"
KVIMembership -> "MEMBERSHIP"
KVIMultiplePeople -> "MULTIPLE_PEOPLE"
KVIOffer -> "OFFER"
KVIPerson -> "PERSON"
KVIPhone -> "PHONE"
KVIRestaurantIcon -> "RESTAURANT_ICON"
KVIShoppingCart -> "SHOPPING_CART"
KVIStar -> "STAR"
KVIStore -> "STORE"
KVITicket -> "TICKET"
KVITrain -> "TRAIN"
KVIVideoCamera -> "VIDEO_CAMERA"
KVIVideoPlay -> "VIDEO_PLAY"
instance FromJSON KeyValueIcon where
parseJSON = parseJSONText "KeyValueIcon"
instance ToJSON KeyValueIcon where
toJSON = toJSONText
data ActionResponseType
= TypeUnspecified
| NewMessage
| UpdateMessage
| RequestConfig
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ActionResponseType
instance FromHttpApiData ActionResponseType where
parseQueryParam = \case
"TYPE_UNSPECIFIED" -> Right TypeUnspecified
"NEW_MESSAGE" -> Right NewMessage
"UPDATE_MESSAGE" -> Right UpdateMessage
"REQUEST_CONFIG" -> Right RequestConfig
x -> Left ("Unable to parse ActionResponseType from: " <> x)
instance ToHttpApiData ActionResponseType where
toQueryParam = \case
TypeUnspecified -> "TYPE_UNSPECIFIED"
NewMessage -> "NEW_MESSAGE"
UpdateMessage -> "UPDATE_MESSAGE"
RequestConfig -> "REQUEST_CONFIG"
instance FromJSON ActionResponseType where
parseJSON = parseJSONText "ActionResponseType"
instance ToJSON ActionResponseType where
toJSON = toJSONText
data MembershipState
= MembershipStateUnspecified
| Joined
| Invited
| NotAMember
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable MembershipState
instance FromHttpApiData MembershipState where
parseQueryParam = \case
"MEMBERSHIP_STATE_UNSPECIFIED" -> Right MembershipStateUnspecified
"JOINED" -> Right Joined
"INVITED" -> Right Invited
"NOT_A_MEMBER" -> Right NotAMember
x -> Left ("Unable to parse MembershipState from: " <> x)
instance ToHttpApiData MembershipState where
toQueryParam = \case
MembershipStateUnspecified -> "MEMBERSHIP_STATE_UNSPECIFIED"
Joined -> "JOINED"
Invited -> "INVITED"
NotAMember -> "NOT_A_MEMBER"
instance FromJSON MembershipState where
parseJSON = parseJSONText "MembershipState"
instance ToJSON MembershipState where
toJSON = toJSONText
data CardHeaderImageStyle
= CHISImageStyleUnspecified
| CHISImage
| CHISAvatar
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CardHeaderImageStyle
instance FromHttpApiData CardHeaderImageStyle where
parseQueryParam = \case
"IMAGE_STYLE_UNSPECIFIED" -> Right CHISImageStyleUnspecified
"IMAGE" -> Right CHISImage
"AVATAR" -> Right CHISAvatar
x -> Left ("Unable to parse CardHeaderImageStyle from: " <> x)
instance ToHttpApiData CardHeaderImageStyle where
toQueryParam = \case
CHISImageStyleUnspecified -> "IMAGE_STYLE_UNSPECIFIED"
CHISImage -> "IMAGE"
CHISAvatar -> "AVATAR"
instance FromJSON CardHeaderImageStyle where
parseJSON = parseJSONText "CardHeaderImageStyle"
instance ToJSON CardHeaderImageStyle where
toJSON = toJSONText
data UserMentionMetadataType
= UMMTTypeUnspecified
| UMMTAdd
| UMMTMention
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UserMentionMetadataType
instance FromHttpApiData UserMentionMetadataType where
parseQueryParam = \case
"TYPE_UNSPECIFIED" -> Right UMMTTypeUnspecified
"ADD" -> Right UMMTAdd
"MENTION" -> Right UMMTMention
x -> Left ("Unable to parse UserMentionMetadataType from: " <> x)
instance ToHttpApiData UserMentionMetadataType where
toQueryParam = \case
UMMTTypeUnspecified -> "TYPE_UNSPECIFIED"
UMMTAdd -> "ADD"
UMMTMention -> "MENTION"
instance FromJSON UserMentionMetadataType where
parseJSON = parseJSONText "UserMentionMetadataType"
instance ToJSON UserMentionMetadataType where
toJSON = toJSONText
data SpaceType
= STTypeUnspecified
| STRoom
| STDM
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable SpaceType
instance FromHttpApiData SpaceType where
parseQueryParam = \case
"TYPE_UNSPECIFIED" -> Right STTypeUnspecified
"ROOM" -> Right STRoom
"DM" -> Right STDM
x -> Left ("Unable to parse SpaceType from: " <> x)
instance ToHttpApiData SpaceType where
toQueryParam = \case
STTypeUnspecified -> "TYPE_UNSPECIFIED"
STRoom -> "ROOM"
STDM -> "DM"
instance FromJSON SpaceType where
parseJSON = parseJSONText "SpaceType"
instance ToJSON SpaceType where
toJSON = toJSONText
data AnnotationType
= AnnotationTypeUnspecified
| UserMention
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable AnnotationType
instance FromHttpApiData AnnotationType where
parseQueryParam = \case
"ANNOTATION_TYPE_UNSPECIFIED" -> Right AnnotationTypeUnspecified
"USER_MENTION" -> Right UserMention
x -> Left ("Unable to parse AnnotationType from: " <> x)
instance ToHttpApiData AnnotationType where
toQueryParam = \case
AnnotationTypeUnspecified -> "ANNOTATION_TYPE_UNSPECIFIED"
UserMention -> "USER_MENTION"
instance FromJSON AnnotationType where
parseJSON = parseJSONText "AnnotationType"
instance ToJSON AnnotationType where
toJSON = toJSONText
data ImageButtonIcon
= IBIIconUnspecified
| IBIAirplane
| IBIBookmark
| IBIBus
| IBICar
| IBIClock
| IBIConfirmationNumberIcon
| IBIDollar
| IBIDescription
| IBIEmail
| IBIEventPerformer
| IBIEventSeat
| IBIFlightArrival
| IBIFlightDeParture
| IBIHotel
| IBIHotelRoomType
| IBIInvite
| IBIMapPin
| IBIMembership
| IBIMultiplePeople
| IBIOffer
| IBIPerson
| IBIPhone
| IBIRestaurantIcon
| IBIShoppingCart
| IBIStar
| IBIStore
| IBITicket
| IBITrain
| IBIVideoCamera
| IBIVideoPlay
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ImageButtonIcon
instance FromHttpApiData ImageButtonIcon where
parseQueryParam = \case
"ICON_UNSPECIFIED" -> Right IBIIconUnspecified
"AIRPLANE" -> Right IBIAirplane
"BOOKMARK" -> Right IBIBookmark
"BUS" -> Right IBIBus
"CAR" -> Right IBICar
"CLOCK" -> Right IBIClock
"CONFIRMATION_NUMBER_ICON" -> Right IBIConfirmationNumberIcon
"DOLLAR" -> Right IBIDollar
"DESCRIPTION" -> Right IBIDescription
"EMAIL" -> Right IBIEmail
"EVENT_PERFORMER" -> Right IBIEventPerformer
"EVENT_SEAT" -> Right IBIEventSeat
"FLIGHT_ARRIVAL" -> Right IBIFlightArrival
"FLIGHT_DEPARTURE" -> Right IBIFlightDeParture
"HOTEL" -> Right IBIHotel
"HOTEL_ROOM_TYPE" -> Right IBIHotelRoomType
"INVITE" -> Right IBIInvite
"MAP_PIN" -> Right IBIMapPin
"MEMBERSHIP" -> Right IBIMembership
"MULTIPLE_PEOPLE" -> Right IBIMultiplePeople
"OFFER" -> Right IBIOffer
"PERSON" -> Right IBIPerson
"PHONE" -> Right IBIPhone
"RESTAURANT_ICON" -> Right IBIRestaurantIcon
"SHOPPING_CART" -> Right IBIShoppingCart
"STAR" -> Right IBIStar
"STORE" -> Right IBIStore
"TICKET" -> Right IBITicket
"TRAIN" -> Right IBITrain
"VIDEO_CAMERA" -> Right IBIVideoCamera
"VIDEO_PLAY" -> Right IBIVideoPlay
x -> Left ("Unable to parse ImageButtonIcon from: " <> x)
instance ToHttpApiData ImageButtonIcon where
toQueryParam = \case
IBIIconUnspecified -> "ICON_UNSPECIFIED"
IBIAirplane -> "AIRPLANE"
IBIBookmark -> "BOOKMARK"
IBIBus -> "BUS"
IBICar -> "CAR"
IBIClock -> "CLOCK"
IBIConfirmationNumberIcon -> "CONFIRMATION_NUMBER_ICON"
IBIDollar -> "DOLLAR"
IBIDescription -> "DESCRIPTION"
IBIEmail -> "EMAIL"
IBIEventPerformer -> "EVENT_PERFORMER"
IBIEventSeat -> "EVENT_SEAT"
IBIFlightArrival -> "FLIGHT_ARRIVAL"
IBIFlightDeParture -> "FLIGHT_DEPARTURE"
IBIHotel -> "HOTEL"
IBIHotelRoomType -> "HOTEL_ROOM_TYPE"
IBIInvite -> "INVITE"
IBIMapPin -> "MAP_PIN"
IBIMembership -> "MEMBERSHIP"
IBIMultiplePeople -> "MULTIPLE_PEOPLE"
IBIOffer -> "OFFER"
IBIPerson -> "PERSON"
IBIPhone -> "PHONE"
IBIRestaurantIcon -> "RESTAURANT_ICON"
IBIShoppingCart -> "SHOPPING_CART"
IBIStar -> "STAR"
IBIStore -> "STORE"
IBITicket -> "TICKET"
IBITrain -> "TRAIN"
IBIVideoCamera -> "VIDEO_CAMERA"
IBIVideoPlay -> "VIDEO_PLAY"
instance FromJSON ImageButtonIcon where
parseJSON = parseJSONText "ImageButtonIcon"
instance ToJSON ImageButtonIcon where
toJSON = toJSONText
data Xgafv
= X1
| X2
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable Xgafv
instance FromHttpApiData Xgafv where
parseQueryParam = \case
"1" -> Right X1
"2" -> Right X2
x -> Left ("Unable to parse Xgafv from: " <> x)
instance ToHttpApiData Xgafv where
toQueryParam = \case
X1 -> "1"
X2 -> "2"
instance FromJSON Xgafv where
parseJSON = parseJSONText "Xgafv"
instance ToJSON Xgafv where
toJSON = toJSONText
data DeprecatedEventType
= DETUnspecified
| DETMessage
| DETAddedToSpace
| DETRemovedFromSpace
| DETCardClicked
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DeprecatedEventType
instance FromHttpApiData DeprecatedEventType where
parseQueryParam = \case
"UNSPECIFIED" -> Right DETUnspecified
"MESSAGE" -> Right DETMessage
"ADDED_TO_SPACE" -> Right DETAddedToSpace
"REMOVED_FROM_SPACE" -> Right DETRemovedFromSpace
"CARD_CLICKED" -> Right DETCardClicked
x -> Left ("Unable to parse DeprecatedEventType from: " <> x)
instance ToHttpApiData DeprecatedEventType where
toQueryParam = \case
DETUnspecified -> "UNSPECIFIED"
DETMessage -> "MESSAGE"
DETAddedToSpace -> "ADDED_TO_SPACE"
DETRemovedFromSpace -> "REMOVED_FROM_SPACE"
DETCardClicked -> "CARD_CLICKED"
instance FromJSON DeprecatedEventType where
parseJSON = parseJSONText "DeprecatedEventType"
instance ToJSON DeprecatedEventType where
toJSON = toJSONText
data UserType
= UTTypeUnspecified
| UTHuman
| UTBot
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UserType
instance FromHttpApiData UserType where
parseQueryParam = \case
"TYPE_UNSPECIFIED" -> Right UTTypeUnspecified
"HUMAN" -> Right UTHuman
"BOT" -> Right UTBot
x -> Left ("Unable to parse UserType from: " <> x)
instance ToHttpApiData UserType where
toQueryParam = \case
UTTypeUnspecified -> "TYPE_UNSPECIFIED"
UTHuman -> "HUMAN"
UTBot -> "BOT"
instance FromJSON UserType where
parseJSON = parseJSONText "UserType"
instance ToJSON UserType where
toJSON = toJSONText