module Network.Google.Affiliates.Types.Sum where
import Network.Google.Prelude
data PublishersGetRole
= PGRAdvertisers
| PGRPublishers
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PublishersGetRole
instance FromHttpApiData PublishersGetRole where
parseQueryParam = \case
"advertisers" -> Right PGRAdvertisers
"publishers" -> Right PGRPublishers
x -> Left ("Unable to parse PublishersGetRole from: " <> x)
instance ToHttpApiData PublishersGetRole where
toQueryParam = \case
PGRAdvertisers -> "advertisers"
PGRPublishers -> "publishers"
instance FromJSON PublishersGetRole where
parseJSON = parseJSONText "PublishersGetRole"
instance ToJSON PublishersGetRole where
toJSON = toJSONText
data ReportsGetEventType
= Action
| Charge
| Transaction
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ReportsGetEventType
instance FromHttpApiData ReportsGetEventType where
parseQueryParam = \case
"action" -> Right Action
"charge" -> Right Charge
"transaction" -> Right Transaction
x -> Left ("Unable to parse ReportsGetEventType from: " <> x)
instance ToHttpApiData ReportsGetEventType where
toQueryParam = \case
Action -> "action"
Charge -> "charge"
Transaction -> "transaction"
instance FromJSON ReportsGetEventType where
parseJSON = parseJSONText "ReportsGetEventType"
instance ToJSON ReportsGetEventType where
toJSON = toJSONText
data ReportsGetStatus
= Active
| Canceled
| Invalid
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ReportsGetStatus
instance FromHttpApiData ReportsGetStatus where
parseQueryParam = \case
"active" -> Right Active
"canceled" -> Right Canceled
"invalid" -> Right Invalid
x -> Left ("Unable to parse ReportsGetStatus from: " <> x)
instance ToHttpApiData ReportsGetStatus where
toQueryParam = \case
Active -> "active"
Canceled -> "canceled"
Invalid -> "invalid"
instance FromJSON ReportsGetStatus where
parseJSON = parseJSONText "ReportsGetStatus"
instance ToJSON ReportsGetStatus where
toJSON = toJSONText
data LinksListPromotionType
= Coupon
| FreeGift
| FreeShipping
| PercentOff
| PriceCut
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable LinksListPromotionType
instance FromHttpApiData LinksListPromotionType where
parseQueryParam = \case
"coupon" -> Right Coupon
"free_gift" -> Right FreeGift
"free_shipping" -> Right FreeShipping
"percent_off" -> Right PercentOff
"price_cut" -> Right PriceCut
x -> Left ("Unable to parse LinksListPromotionType from: " <> x)
instance ToHttpApiData LinksListPromotionType where
toQueryParam = \case
Coupon -> "coupon"
FreeGift -> "free_gift"
FreeShipping -> "free_shipping"
PercentOff -> "percent_off"
PriceCut -> "price_cut"
instance FromJSON LinksListPromotionType where
parseJSON = parseJSONText "LinksListPromotionType"
instance ToJSON LinksListPromotionType where
toJSON = toJSONText
data EventsListType
= ELTAction
| ELTCharge
| ELTTransaction
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable EventsListType
instance FromHttpApiData EventsListType where
parseQueryParam = \case
"action" -> Right ELTAction
"charge" -> Right ELTCharge
"transaction" -> Right ELTTransaction
x -> Left ("Unable to parse EventsListType from: " <> x)
instance ToHttpApiData EventsListType where
toQueryParam = \case
ELTAction -> "action"
ELTCharge -> "charge"
ELTTransaction -> "transaction"
instance FromJSON EventsListType where
parseJSON = parseJSONText "EventsListType"
instance ToJSON EventsListType where
toJSON = toJSONText
data LinksListRole
= LLRAdvertisers
| LLRPublishers
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable LinksListRole
instance FromHttpApiData LinksListRole where
parseQueryParam = \case
"advertisers" -> Right LLRAdvertisers
"publishers" -> Right LLRPublishers
x -> Left ("Unable to parse LinksListRole from: " <> x)
instance ToHttpApiData LinksListRole where
toQueryParam = \case
LLRAdvertisers -> "advertisers"
LLRPublishers -> "publishers"
instance FromJSON LinksListRole where
parseJSON = parseJSONText "LinksListRole"
instance ToJSON LinksListRole where
toJSON = toJSONText
data ReportsGetReportType
= OrderDelta
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ReportsGetReportType
instance FromHttpApiData ReportsGetReportType where
parseQueryParam = \case
"order_delta" -> Right OrderDelta
x -> Left ("Unable to parse ReportsGetReportType from: " <> x)
instance ToHttpApiData ReportsGetReportType where
toQueryParam = \case
OrderDelta -> "order_delta"
instance FromJSON ReportsGetReportType where
parseJSON = parseJSONText "ReportsGetReportType"
instance ToJSON ReportsGetReportType where
toJSON = toJSONText
data AdvertisersListRole
= ALRAdvertisers
| ALRPublishers
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable AdvertisersListRole
instance FromHttpApiData AdvertisersListRole where
parseQueryParam = \case
"advertisers" -> Right ALRAdvertisers
"publishers" -> Right ALRPublishers
x -> Left ("Unable to parse AdvertisersListRole from: " <> x)
instance ToHttpApiData AdvertisersListRole where
toQueryParam = \case
ALRAdvertisers -> "advertisers"
ALRPublishers -> "publishers"
instance FromJSON AdvertisersListRole where
parseJSON = parseJSONText "AdvertisersListRole"
instance ToJSON AdvertisersListRole where
toJSON = toJSONText
data LinksInsertRole
= LIRAdvertisers
| LIRPublishers
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable LinksInsertRole
instance FromHttpApiData LinksInsertRole where
parseQueryParam = \case
"advertisers" -> Right LIRAdvertisers
"publishers" -> Right LIRPublishers
x -> Left ("Unable to parse LinksInsertRole from: " <> x)
instance ToHttpApiData LinksInsertRole where
toQueryParam = \case
LIRAdvertisers -> "advertisers"
LIRPublishers -> "publishers"
instance FromJSON LinksInsertRole where
parseJSON = parseJSONText "LinksInsertRole"
instance ToJSON LinksInsertRole where
toJSON = toJSONText
data PublishersListRole
= PLRAdvertisers
| PLRPublishers
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PublishersListRole
instance FromHttpApiData PublishersListRole where
parseQueryParam = \case
"advertisers" -> Right PLRAdvertisers
"publishers" -> Right PLRPublishers
x -> Left ("Unable to parse PublishersListRole from: " <> x)
instance ToHttpApiData PublishersListRole where
toQueryParam = \case
PLRAdvertisers -> "advertisers"
PLRPublishers -> "publishers"
instance FromJSON PublishersListRole where
parseJSON = parseJSONText "PublishersListRole"
instance ToJSON PublishersListRole where
toJSON = toJSONText
data LinksListAuthorship
= LLAAdvertiser
| LLAPublisher
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable LinksListAuthorship
instance FromHttpApiData LinksListAuthorship where
parseQueryParam = \case
"advertiser" -> Right LLAAdvertiser
"publisher" -> Right LLAPublisher
x -> Left ("Unable to parse LinksListAuthorship from: " <> x)
instance ToHttpApiData LinksListAuthorship where
toQueryParam = \case
LLAAdvertiser -> "advertiser"
LLAPublisher -> "publisher"
instance FromJSON LinksListAuthorship where
parseJSON = parseJSONText "LinksListAuthorship"
instance ToJSON LinksListAuthorship where
toJSON = toJSONText
data LinksGetRole
= LGRAdvertisers
| LGRPublishers
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable LinksGetRole
instance FromHttpApiData LinksGetRole where
parseQueryParam = \case
"advertisers" -> Right LGRAdvertisers
"publishers" -> Right LGRPublishers
x -> Left ("Unable to parse LinksGetRole from: " <> x)
instance ToHttpApiData LinksGetRole where
toQueryParam = \case
LGRAdvertisers -> "advertisers"
LGRPublishers -> "publishers"
instance FromJSON LinksGetRole where
parseJSON = parseJSONText "LinksGetRole"
instance ToJSON LinksGetRole where
toJSON = toJSONText
data LinksListLinkType
= Banner
| Text
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable LinksListLinkType
instance FromHttpApiData LinksListLinkType where
parseQueryParam = \case
"banner" -> Right Banner
"text" -> Right Text
x -> Left ("Unable to parse LinksListLinkType from: " <> x)
instance ToHttpApiData LinksListLinkType where
toQueryParam = \case
Banner -> "banner"
Text -> "text"
instance FromJSON LinksListLinkType where
parseJSON = parseJSONText "LinksListLinkType"
instance ToJSON LinksListLinkType where
toJSON = toJSONText
data EventsListRole
= ELRAdvertisers
| ELRPublishers
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable EventsListRole
instance FromHttpApiData EventsListRole where
parseQueryParam = \case
"advertisers" -> Right ELRAdvertisers
"publishers" -> Right ELRPublishers
x -> Left ("Unable to parse EventsListRole from: " <> x)
instance ToHttpApiData EventsListRole where
toQueryParam = \case
ELRAdvertisers -> "advertisers"
ELRPublishers -> "publishers"
instance FromJSON EventsListRole where
parseJSON = parseJSONText "EventsListRole"
instance ToJSON EventsListRole where
toJSON = toJSONText
data AdvertisersListRelationshipStatus
= Approved
| Available
| Deactivated
| Declined
| Pending
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable AdvertisersListRelationshipStatus
instance FromHttpApiData AdvertisersListRelationshipStatus where
parseQueryParam = \case
"approved" -> Right Approved
"available" -> Right Available
"deactivated" -> Right Deactivated
"declined" -> Right Declined
"pending" -> Right Pending
x -> Left ("Unable to parse AdvertisersListRelationshipStatus from: " <> x)
instance ToHttpApiData AdvertisersListRelationshipStatus where
toQueryParam = \case
Approved -> "approved"
Available -> "available"
Deactivated -> "deactivated"
Declined -> "declined"
Pending -> "pending"
instance FromJSON AdvertisersListRelationshipStatus where
parseJSON = parseJSONText "AdvertisersListRelationshipStatus"
instance ToJSON AdvertisersListRelationshipStatus where
toJSON = toJSONText
data CcOffersListProjection
= Full
| Summary
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CcOffersListProjection
instance FromHttpApiData CcOffersListProjection where
parseQueryParam = \case
"full" -> Right Full
"summary" -> Right Summary
x -> Left ("Unable to parse CcOffersListProjection from: " <> x)
instance ToHttpApiData CcOffersListProjection where
toQueryParam = \case
Full -> "full"
Summary -> "summary"
instance FromJSON CcOffersListProjection where
parseJSON = parseJSONText "CcOffersListProjection"
instance ToJSON CcOffersListProjection where
toJSON = toJSONText
data AdvertisersGetRole
= AGRAdvertisers
| AGRPublishers
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable AdvertisersGetRole
instance FromHttpApiData AdvertisersGetRole where
parseQueryParam = \case
"advertisers" -> Right AGRAdvertisers
"publishers" -> Right AGRPublishers
x -> Left ("Unable to parse AdvertisersGetRole from: " <> x)
instance ToHttpApiData AdvertisersGetRole where
toQueryParam = \case
AGRAdvertisers -> "advertisers"
AGRPublishers -> "publishers"
instance FromJSON AdvertisersGetRole where
parseJSON = parseJSONText "AdvertisersGetRole"
instance ToJSON AdvertisersGetRole where
toJSON = toJSONText
data EventsListChargeType
= Credit
| Debit
| MonthlyMinimum
| Other
| SlottingFee
| TierBonus
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable EventsListChargeType
instance FromHttpApiData EventsListChargeType where
parseQueryParam = \case
"credit" -> Right Credit
"debit" -> Right Debit
"monthly_minimum" -> Right MonthlyMinimum
"other" -> Right Other
"slotting_fee" -> Right SlottingFee
"tier_bonus" -> Right TierBonus
x -> Left ("Unable to parse EventsListChargeType from: " <> x)
instance ToHttpApiData EventsListChargeType where
toQueryParam = \case
Credit -> "credit"
Debit -> "debit"
MonthlyMinimum -> "monthly_minimum"
Other -> "other"
SlottingFee -> "slotting_fee"
TierBonus -> "tier_bonus"
instance FromJSON EventsListChargeType where
parseJSON = parseJSONText "EventsListChargeType"
instance ToJSON EventsListChargeType where
toJSON = toJSONText
data PublishersListRelationshipStatus
= PLRSApproved
| PLRSAvailable
| PLRSDeactivated
| PLRSDeclined
| PLRSPending
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PublishersListRelationshipStatus
instance FromHttpApiData PublishersListRelationshipStatus where
parseQueryParam = \case
"approved" -> Right PLRSApproved
"available" -> Right PLRSAvailable
"deactivated" -> Right PLRSDeactivated
"declined" -> Right PLRSDeclined
"pending" -> Right PLRSPending
x -> Left ("Unable to parse PublishersListRelationshipStatus from: " <> x)
instance ToHttpApiData PublishersListRelationshipStatus where
toQueryParam = \case
PLRSApproved -> "approved"
PLRSAvailable -> "available"
PLRSDeactivated -> "deactivated"
PLRSDeclined -> "declined"
PLRSPending -> "pending"
instance FromJSON PublishersListRelationshipStatus where
parseJSON = parseJSONText "PublishersListRelationshipStatus"
instance ToJSON PublishersListRelationshipStatus where
toJSON = toJSONText
data ReportsGetRole
= RGRAdvertisers
| RGRPublishers
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ReportsGetRole
instance FromHttpApiData ReportsGetRole where
parseQueryParam = \case
"advertisers" -> Right RGRAdvertisers
"publishers" -> Right RGRPublishers
x -> Left ("Unable to parse ReportsGetRole from: " <> x)
instance ToHttpApiData ReportsGetRole where
toQueryParam = \case
RGRAdvertisers -> "advertisers"
RGRPublishers -> "publishers"
instance FromJSON ReportsGetRole where
parseJSON = parseJSONText "ReportsGetRole"
instance ToJSON ReportsGetRole where
toJSON = toJSONText
data LinksListRelationshipStatus
= LLRSApproved
| LLRSAvailable
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable LinksListRelationshipStatus
instance FromHttpApiData LinksListRelationshipStatus where
parseQueryParam = \case
"approved" -> Right LLRSApproved
"available" -> Right LLRSAvailable
x -> Left ("Unable to parse LinksListRelationshipStatus from: " <> x)
instance ToHttpApiData LinksListRelationshipStatus where
toQueryParam = \case
LLRSApproved -> "approved"
LLRSAvailable -> "available"
instance FromJSON LinksListRelationshipStatus where
parseJSON = parseJSONText "LinksListRelationshipStatus"
instance ToJSON LinksListRelationshipStatus where
toJSON = toJSONText
data EventsListStatus
= ELSActive
| ELSCanceled
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable EventsListStatus
instance FromHttpApiData EventsListStatus where
parseQueryParam = \case
"active" -> Right ELSActive
"canceled" -> Right ELSCanceled
x -> Left ("Unable to parse EventsListStatus from: " <> x)
instance ToHttpApiData EventsListStatus where
toQueryParam = \case
ELSActive -> "active"
ELSCanceled -> "canceled"
instance FromJSON EventsListStatus where
parseJSON = parseJSONText "EventsListStatus"
instance ToJSON EventsListStatus where
toJSON = toJSONText