{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.AdSenseHost.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data AssociationSessionsStartProductCode
= Afc
| Afg
| Afmc
| Afs
| Afv
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable AssociationSessionsStartProductCode
instance FromHttpApiData AssociationSessionsStartProductCode where
parseQueryParam = \case
"AFC" -> Right Afc
"AFG" -> Right Afg
"AFMC" -> Right Afmc
"AFS" -> Right Afs
"AFV" -> Right Afv
x -> Left ("Unable to parse AssociationSessionsStartProductCode from: " <> x)
instance ToHttpApiData AssociationSessionsStartProductCode where
toQueryParam = \case
Afc -> "AFC"
Afg -> "AFG"
Afmc -> "AFMC"
Afs -> "AFS"
Afv -> "AFV"
instance FromJSON AssociationSessionsStartProductCode where
parseJSON = parseJSONText "AssociationSessionsStartProductCode"
instance ToJSON AssociationSessionsStartProductCode where
toJSON = toJSONText