{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.StreetViewPublish.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
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 PhotoTransferStatus
= TransferStatusUnknown
| NeverTransferred
| Pending
| Completed
| Rejected
| Expired
| Cancelled
| ReceivedViaTransfer
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PhotoTransferStatus
instance FromHttpApiData PhotoTransferStatus where
parseQueryParam = \case
"TRANSFER_STATUS_UNKNOWN" -> Right TransferStatusUnknown
"NEVER_TRANSFERRED" -> Right NeverTransferred
"PENDING" -> Right Pending
"COMPLETED" -> Right Completed
"REJECTED" -> Right Rejected
"EXPIRED" -> Right Expired
"CANCELLED" -> Right Cancelled
"RECEIVED_VIA_TRANSFER" -> Right ReceivedViaTransfer
x -> Left ("Unable to parse PhotoTransferStatus from: " <> x)
instance ToHttpApiData PhotoTransferStatus where
toQueryParam = \case
TransferStatusUnknown -> "TRANSFER_STATUS_UNKNOWN"
NeverTransferred -> "NEVER_TRANSFERRED"
Pending -> "PENDING"
Completed -> "COMPLETED"
Rejected -> "REJECTED"
Expired -> "EXPIRED"
Cancelled -> "CANCELLED"
ReceivedViaTransfer -> "RECEIVED_VIA_TRANSFER"
instance FromJSON PhotoTransferStatus where
parseJSON = parseJSONText "PhotoTransferStatus"
instance ToJSON PhotoTransferStatus where
toJSON = toJSONText
data PhotoMapsPublishStatus
= UnspecifiedMapsPublishStatus
| Published
| RejectedUnknown
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PhotoMapsPublishStatus
instance FromHttpApiData PhotoMapsPublishStatus where
parseQueryParam = \case
"UNSPECIFIED_MAPS_PUBLISH_STATUS" -> Right UnspecifiedMapsPublishStatus
"PUBLISHED" -> Right Published
"REJECTED_UNKNOWN" -> Right RejectedUnknown
x -> Left ("Unable to parse PhotoMapsPublishStatus from: " <> x)
instance ToHttpApiData PhotoMapsPublishStatus where
toQueryParam = \case
UnspecifiedMapsPublishStatus -> "UNSPECIFIED_MAPS_PUBLISH_STATUS"
Published -> "PUBLISHED"
RejectedUnknown -> "REJECTED_UNKNOWN"
instance FromJSON PhotoMapsPublishStatus where
parseJSON = parseJSONText "PhotoMapsPublishStatus"
instance ToJSON PhotoMapsPublishStatus where
toJSON = toJSONText