{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.PlayMoviesPartner.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data AvailWorkType
= TitleTypeUnspecified
| Movie
| Season
| Episode
| Bundle
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable AvailWorkType
instance FromHttpApiData AvailWorkType where
parseQueryParam = \case
"TITLE_TYPE_UNSPECIFIED" -> Right TitleTypeUnspecified
"MOVIE" -> Right Movie
"SEASON" -> Right Season
"EPISODE" -> Right Episode
"BUNDLE" -> Right Bundle
x -> Left ("Unable to parse AvailWorkType from: " <> x)
instance ToHttpApiData AvailWorkType where
toQueryParam = \case
TitleTypeUnspecified -> "TITLE_TYPE_UNSPECIFIED"
Movie -> "MOVIE"
Season -> "SEASON"
Episode -> "EPISODE"
Bundle -> "BUNDLE"
instance FromJSON AvailWorkType where
parseJSON = parseJSONText "AvailWorkType"
instance ToJSON AvailWorkType where
toJSON = toJSONText
data OrderStatus
= StatusUnspecified
| StatusApproved
| StatusFailed
| StatusProcessing
| StatusUnfulfilled
| StatusNotAvailable
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable OrderStatus
instance FromHttpApiData OrderStatus where
parseQueryParam = \case
"STATUS_UNSPECIFIED" -> Right StatusUnspecified
"STATUS_APPROVED" -> Right StatusApproved
"STATUS_FAILED" -> Right StatusFailed
"STATUS_PROCESSING" -> Right StatusProcessing
"STATUS_UNFULFILLED" -> Right StatusUnfulfilled
"STATUS_NOT_AVAILABLE" -> Right StatusNotAvailable
x -> Left ("Unable to parse OrderStatus from: " <> x)
instance ToHttpApiData OrderStatus where
toQueryParam = \case
StatusUnspecified -> "STATUS_UNSPECIFIED"
StatusApproved -> "STATUS_APPROVED"
StatusFailed -> "STATUS_FAILED"
StatusProcessing -> "STATUS_PROCESSING"
StatusUnfulfilled -> "STATUS_UNFULFILLED"
StatusNotAvailable -> "STATUS_NOT_AVAILABLE"
instance FromJSON OrderStatus where
parseJSON = parseJSONText "OrderStatus"
instance ToJSON OrderStatus where
toJSON = toJSONText
data AvailFormatProFile
= FormatProFileUnspecified
| SD
| HD
| Uhd
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable AvailFormatProFile
instance FromHttpApiData AvailFormatProFile where
parseQueryParam = \case
"FORMAT_PROFILE_UNSPECIFIED" -> Right FormatProFileUnspecified
"SD" -> Right SD
"HD" -> Right HD
"UHD" -> Right Uhd
x -> Left ("Unable to parse AvailFormatProFile from: " <> x)
instance ToHttpApiData AvailFormatProFile where
toQueryParam = \case
FormatProFileUnspecified -> "FORMAT_PROFILE_UNSPECIFIED"
SD -> "SD"
HD -> "HD"
Uhd -> "UHD"
instance FromJSON AvailFormatProFile where
parseJSON = parseJSONText "AvailFormatProFile"
instance ToJSON AvailFormatProFile where
toJSON = toJSONText
data OrderType
= OTTitleTypeUnspecified
| OTMovie
| OTSeason
| OTEpisode
| OTBundle
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable OrderType
instance FromHttpApiData OrderType where
parseQueryParam = \case
"TITLE_TYPE_UNSPECIFIED" -> Right OTTitleTypeUnspecified
"MOVIE" -> Right OTMovie
"SEASON" -> Right OTSeason
"EPISODE" -> Right OTEpisode
"BUNDLE" -> Right OTBundle
x -> Left ("Unable to parse OrderType from: " <> x)
instance ToHttpApiData OrderType where
toQueryParam = \case
OTTitleTypeUnspecified -> "TITLE_TYPE_UNSPECIFIED"
OTMovie -> "MOVIE"
OTSeason -> "SEASON"
OTEpisode -> "EPISODE"
OTBundle -> "BUNDLE"
instance FromJSON OrderType where
parseJSON = parseJSONText "OrderType"
instance ToJSON OrderType where
toJSON = toJSONText
data StoreInfoType
= SITTitleTypeUnspecified
| SITMovie
| SITSeason
| SITEpisode
| SITBundle
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable StoreInfoType
instance FromHttpApiData StoreInfoType where
parseQueryParam = \case
"TITLE_TYPE_UNSPECIFIED" -> Right SITTitleTypeUnspecified
"MOVIE" -> Right SITMovie
"SEASON" -> Right SITSeason
"EPISODE" -> Right SITEpisode
"BUNDLE" -> Right SITBundle
x -> Left ("Unable to parse StoreInfoType from: " <> x)
instance ToHttpApiData StoreInfoType where
toQueryParam = \case
SITTitleTypeUnspecified -> "TITLE_TYPE_UNSPECIFIED"
SITMovie -> "MOVIE"
SITSeason -> "SEASON"
SITEpisode -> "EPISODE"
SITBundle -> "BUNDLE"
instance FromJSON StoreInfoType where
parseJSON = parseJSONText "StoreInfoType"
instance ToJSON StoreInfoType 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 OrderNormalizedPriority
= NormalizedPriorityUnspecified
| LowPriority
| HighPriority
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable OrderNormalizedPriority
instance FromHttpApiData OrderNormalizedPriority where
parseQueryParam = \case
"NORMALIZED_PRIORITY_UNSPECIFIED" -> Right NormalizedPriorityUnspecified
"LOW_PRIORITY" -> Right LowPriority
"HIGH_PRIORITY" -> Right HighPriority
x -> Left ("Unable to parse OrderNormalizedPriority from: " <> x)
instance ToHttpApiData OrderNormalizedPriority where
toQueryParam = \case
NormalizedPriorityUnspecified -> "NORMALIZED_PRIORITY_UNSPECIFIED"
LowPriority -> "LOW_PRIORITY"
HighPriority -> "HIGH_PRIORITY"
instance FromJSON OrderNormalizedPriority where
parseJSON = parseJSONText "OrderNormalizedPriority"
instance ToJSON OrderNormalizedPriority where
toJSON = toJSONText
data AvailLicenseType
= LicenseTypeUnspecified
| Est
| Vod
| Svod
| Poest
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable AvailLicenseType
instance FromHttpApiData AvailLicenseType where
parseQueryParam = \case
"LICENSE_TYPE_UNSPECIFIED" -> Right LicenseTypeUnspecified
"EST" -> Right Est
"VOD" -> Right Vod
"SVOD" -> Right Svod
"POEST" -> Right Poest
x -> Left ("Unable to parse AvailLicenseType from: " <> x)
instance ToHttpApiData AvailLicenseType where
toQueryParam = \case
LicenseTypeUnspecified -> "LICENSE_TYPE_UNSPECIFIED"
Est -> "EST"
Vod -> "VOD"
Svod -> "SVOD"
Poest -> "POEST"
instance FromJSON AvailLicenseType where
parseJSON = parseJSONText "AvailLicenseType"
instance ToJSON AvailLicenseType where
toJSON = toJSONText
data OrderStatusDetail
= OrderStatusUnspecified
| OrderStatusQcApproved
| OrderStatusQcRejection
| OrderStatusInternalFix
| OrderStatusOpenOrder
| OrderStatusNotAvailable
| OrderStatusAwaitingRedelivery
| OrderStatusReadyForQc
| OrderStatusFileProcessing
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable OrderStatusDetail
instance FromHttpApiData OrderStatusDetail where
parseQueryParam = \case
"ORDER_STATUS_UNSPECIFIED" -> Right OrderStatusUnspecified
"ORDER_STATUS_QC_APPROVED" -> Right OrderStatusQcApproved
"ORDER_STATUS_QC_REJECTION" -> Right OrderStatusQcRejection
"ORDER_STATUS_INTERNAL_FIX" -> Right OrderStatusInternalFix
"ORDER_STATUS_OPEN_ORDER" -> Right OrderStatusOpenOrder
"ORDER_STATUS_NOT_AVAILABLE" -> Right OrderStatusNotAvailable
"ORDER_STATUS_AWAITING_REDELIVERY" -> Right OrderStatusAwaitingRedelivery
"ORDER_STATUS_READY_FOR_QC" -> Right OrderStatusReadyForQc
"ORDER_STATUS_FILE_PROCESSING" -> Right OrderStatusFileProcessing
x -> Left ("Unable to parse OrderStatusDetail from: " <> x)
instance ToHttpApiData OrderStatusDetail where
toQueryParam = \case
OrderStatusUnspecified -> "ORDER_STATUS_UNSPECIFIED"
OrderStatusQcApproved -> "ORDER_STATUS_QC_APPROVED"
OrderStatusQcRejection -> "ORDER_STATUS_QC_REJECTION"
OrderStatusInternalFix -> "ORDER_STATUS_INTERNAL_FIX"
OrderStatusOpenOrder -> "ORDER_STATUS_OPEN_ORDER"
OrderStatusNotAvailable -> "ORDER_STATUS_NOT_AVAILABLE"
OrderStatusAwaitingRedelivery -> "ORDER_STATUS_AWAITING_REDELIVERY"
OrderStatusReadyForQc -> "ORDER_STATUS_READY_FOR_QC"
OrderStatusFileProcessing -> "ORDER_STATUS_FILE_PROCESSING"
instance FromJSON OrderStatusDetail where
parseJSON = parseJSONText "OrderStatusDetail"
instance ToJSON OrderStatusDetail where
toJSON = toJSONText