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 FromText PublishersGetRole where
fromText = \case
"advertisers" -> Just PGRAdvertisers
"publishers" -> Just PGRPublishers
_ -> Nothing
instance ToText PublishersGetRole where
toText = \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 FromText ReportsGetEventType where
fromText = \case
"action" -> Just Action
"charge" -> Just Charge
"transaction" -> Just Transaction
_ -> Nothing
instance ToText ReportsGetEventType where
toText = \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 FromText ReportsGetStatus where
fromText = \case
"active" -> Just Active
"canceled" -> Just Canceled
"invalid" -> Just Invalid
_ -> Nothing
instance ToText ReportsGetStatus where
toText = \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 FromText LinksListPromotionType where
fromText = \case
"coupon" -> Just Coupon
"free_gift" -> Just FreeGift
"free_shipping" -> Just FreeShipping
"percent_off" -> Just PercentOff
"price_cut" -> Just PriceCut
_ -> Nothing
instance ToText LinksListPromotionType where
toText = \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 FromText EventsListType where
fromText = \case
"action" -> Just ELTAction
"charge" -> Just ELTCharge
"transaction" -> Just ELTTransaction
_ -> Nothing
instance ToText EventsListType where
toText = \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 FromText LinksListRole where
fromText = \case
"advertisers" -> Just LLRAdvertisers
"publishers" -> Just LLRPublishers
_ -> Nothing
instance ToText LinksListRole where
toText = \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 FromText ReportsGetReportType where
fromText = \case
"order_delta" -> Just OrderDelta
_ -> Nothing
instance ToText ReportsGetReportType where
toText = \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 FromText AdvertisersListRole where
fromText = \case
"advertisers" -> Just ALRAdvertisers
"publishers" -> Just ALRPublishers
_ -> Nothing
instance ToText AdvertisersListRole where
toText = \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 FromText LinksInsertRole where
fromText = \case
"advertisers" -> Just LIRAdvertisers
"publishers" -> Just LIRPublishers
_ -> Nothing
instance ToText LinksInsertRole where
toText = \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 FromText PublishersListRole where
fromText = \case
"advertisers" -> Just PLRAdvertisers
"publishers" -> Just PLRPublishers
_ -> Nothing
instance ToText PublishersListRole where
toText = \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 FromText LinksListAuthorship where
fromText = \case
"advertiser" -> Just LLAAdvertiser
"publisher" -> Just LLAPublisher
_ -> Nothing
instance ToText LinksListAuthorship where
toText = \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 FromText LinksGetRole where
fromText = \case
"advertisers" -> Just LGRAdvertisers
"publishers" -> Just LGRPublishers
_ -> Nothing
instance ToText LinksGetRole where
toText = \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 FromText LinksListLinkType where
fromText = \case
"banner" -> Just Banner
"text" -> Just Text
_ -> Nothing
instance ToText LinksListLinkType where
toText = \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 FromText EventsListRole where
fromText = \case
"advertisers" -> Just ELRAdvertisers
"publishers" -> Just ELRPublishers
_ -> Nothing
instance ToText EventsListRole where
toText = \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 FromText AdvertisersListRelationshipStatus where
fromText = \case
"approved" -> Just Approved
"available" -> Just Available
"deactivated" -> Just Deactivated
"declined" -> Just Declined
"pending" -> Just Pending
_ -> Nothing
instance ToText AdvertisersListRelationshipStatus where
toText = \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 FromText CcOffersListProjection where
fromText = \case
"full" -> Just Full
"summary" -> Just Summary
_ -> Nothing
instance ToText CcOffersListProjection where
toText = \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 FromText AdvertisersGetRole where
fromText = \case
"advertisers" -> Just AGRAdvertisers
"publishers" -> Just AGRPublishers
_ -> Nothing
instance ToText AdvertisersGetRole where
toText = \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 FromText EventsListChargeType where
fromText = \case
"credit" -> Just Credit
"debit" -> Just Debit
"monthly_minimum" -> Just MonthlyMinimum
"other" -> Just Other
"slotting_fee" -> Just SlottingFee
"tier_bonus" -> Just TierBonus
_ -> Nothing
instance ToText EventsListChargeType where
toText = \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 FromText PublishersListRelationshipStatus where
fromText = \case
"approved" -> Just PLRSApproved
"available" -> Just PLRSAvailable
"deactivated" -> Just PLRSDeactivated
"declined" -> Just PLRSDeclined
"pending" -> Just PLRSPending
_ -> Nothing
instance ToText PublishersListRelationshipStatus where
toText = \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 FromText ReportsGetRole where
fromText = \case
"advertisers" -> Just RGRAdvertisers
"publishers" -> Just RGRPublishers
_ -> Nothing
instance ToText ReportsGetRole where
toText = \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 FromText LinksListRelationshipStatus where
fromText = \case
"approved" -> Just LLRSApproved
"available" -> Just LLRSAvailable
_ -> Nothing
instance ToText LinksListRelationshipStatus where
toText = \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 FromText EventsListStatus where
fromText = \case
"active" -> Just ELSActive
"canceled" -> Just ELSCanceled
_ -> Nothing
instance ToText EventsListStatus where
toText = \case
ELSActive -> "active"
ELSCanceled -> "canceled"
instance FromJSON EventsListStatus where
parseJSON = parseJSONText "EventsListStatus"
instance ToJSON EventsListStatus where
toJSON = toJSONText