{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.CustomSearch.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data CSEListImgType
= CliPart
| Face
| Lineart
| News
| Photo
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSEListImgType
instance FromHttpApiData CSEListImgType where
parseQueryParam = \case
"clipart" -> Right CliPart
"face" -> Right Face
"lineart" -> Right Lineart
"news" -> Right News
"photo" -> Right Photo
x -> Left ("Unable to parse CSEListImgType from: " <> x)
instance ToHttpApiData CSEListImgType where
toQueryParam = \case
CliPart -> "clipart"
Face -> "face"
Lineart -> "lineart"
News -> "news"
Photo -> "photo"
instance FromJSON CSEListImgType where
parseJSON = parseJSONText "CSEListImgType"
instance ToJSON CSEListImgType where
toJSON = toJSONText
data CSEListSiteSearchFilter
= E
| I
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSEListSiteSearchFilter
instance FromHttpApiData CSEListSiteSearchFilter where
parseQueryParam = \case
"e" -> Right E
"i" -> Right I
x -> Left ("Unable to parse CSEListSiteSearchFilter from: " <> x)
instance ToHttpApiData CSEListSiteSearchFilter where
toQueryParam = \case
E -> "e"
I -> "i"
instance FromJSON CSEListSiteSearchFilter where
parseJSON = parseJSONText "CSEListSiteSearchFilter"
instance ToJSON CSEListSiteSearchFilter where
toJSON = toJSONText
data CSESiterestrictListFilter
= CSESLF0
| CSESLF1
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSESiterestrictListFilter
instance FromHttpApiData CSESiterestrictListFilter where
parseQueryParam = \case
"0" -> Right CSESLF0
"1" -> Right CSESLF1
x -> Left ("Unable to parse CSESiterestrictListFilter from: " <> x)
instance ToHttpApiData CSESiterestrictListFilter where
toQueryParam = \case
CSESLF0 -> "0"
CSESLF1 -> "1"
instance FromJSON CSESiterestrictListFilter where
parseJSON = parseJSONText "CSESiterestrictListFilter"
instance ToJSON CSESiterestrictListFilter where
toJSON = toJSONText
data CSESiterestrictListImgType
= CSESLITCliPart
| CSESLITFace
| CSESLITLineart
| CSESLITNews
| CSESLITPhoto
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSESiterestrictListImgType
instance FromHttpApiData CSESiterestrictListImgType where
parseQueryParam = \case
"clipart" -> Right CSESLITCliPart
"face" -> Right CSESLITFace
"lineart" -> Right CSESLITLineart
"news" -> Right CSESLITNews
"photo" -> Right CSESLITPhoto
x -> Left ("Unable to parse CSESiterestrictListImgType from: " <> x)
instance ToHttpApiData CSESiterestrictListImgType where
toQueryParam = \case
CSESLITCliPart -> "clipart"
CSESLITFace -> "face"
CSESLITLineart -> "lineart"
CSESLITNews -> "news"
CSESLITPhoto -> "photo"
instance FromJSON CSESiterestrictListImgType where
parseJSON = parseJSONText "CSESiterestrictListImgType"
instance ToJSON CSESiterestrictListImgType where
toJSON = toJSONText
data CSEListImgDominantColor
= Black
| Blue
| Brown
| Gray
| Green
| Orange
| Pink
| Purple
| Red
| Teal
| White
| Yellow
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSEListImgDominantColor
instance FromHttpApiData CSEListImgDominantColor where
parseQueryParam = \case
"black" -> Right Black
"blue" -> Right Blue
"brown" -> Right Brown
"gray" -> Right Gray
"green" -> Right Green
"orange" -> Right Orange
"pink" -> Right Pink
"purple" -> Right Purple
"red" -> Right Red
"teal" -> Right Teal
"white" -> Right White
"yellow" -> Right Yellow
x -> Left ("Unable to parse CSEListImgDominantColor from: " <> x)
instance ToHttpApiData CSEListImgDominantColor where
toQueryParam = \case
Black -> "black"
Blue -> "blue"
Brown -> "brown"
Gray -> "gray"
Green -> "green"
Orange -> "orange"
Pink -> "pink"
Purple -> "purple"
Red -> "red"
Teal -> "teal"
White -> "white"
Yellow -> "yellow"
instance FromJSON CSEListImgDominantColor where
parseJSON = parseJSONText "CSEListImgDominantColor"
instance ToJSON CSEListImgDominantColor where
toJSON = toJSONText
data CSEListSafe
= Active
| High
| Medium
| Off
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSEListSafe
instance FromHttpApiData CSEListSafe where
parseQueryParam = \case
"active" -> Right Active
"high" -> Right High
"medium" -> Right Medium
"off" -> Right Off
x -> Left ("Unable to parse CSEListSafe from: " <> x)
instance ToHttpApiData CSEListSafe where
toQueryParam = \case
Active -> "active"
High -> "high"
Medium -> "medium"
Off -> "off"
instance FromJSON CSEListSafe where
parseJSON = parseJSONText "CSEListSafe"
instance ToJSON CSEListSafe where
toJSON = toJSONText
data CSESiterestrictListImgSize
= CSESLISHuge
| CSESLISIcon
| CSESLISLarge
| CSESLISMedium
| CSESLISSmall
| CSESLISXlarge
| CSESLISXxlarge
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSESiterestrictListImgSize
instance FromHttpApiData CSESiterestrictListImgSize where
parseQueryParam = \case
"huge" -> Right CSESLISHuge
"icon" -> Right CSESLISIcon
"large" -> Right CSESLISLarge
"medium" -> Right CSESLISMedium
"small" -> Right CSESLISSmall
"xlarge" -> Right CSESLISXlarge
"xxlarge" -> Right CSESLISXxlarge
x -> Left ("Unable to parse CSESiterestrictListImgSize from: " <> x)
instance ToHttpApiData CSESiterestrictListImgSize where
toQueryParam = \case
CSESLISHuge -> "huge"
CSESLISIcon -> "icon"
CSESLISLarge -> "large"
CSESLISMedium -> "medium"
CSESLISSmall -> "small"
CSESLISXlarge -> "xlarge"
CSESLISXxlarge -> "xxlarge"
instance FromJSON CSESiterestrictListImgSize where
parseJSON = parseJSONText "CSESiterestrictListImgSize"
instance ToJSON CSESiterestrictListImgSize where
toJSON = toJSONText
data CSESiterestrictListImgColorType
= CSESLICTColor
| CSESLICTGray
| CSESLICTMono
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSESiterestrictListImgColorType
instance FromHttpApiData CSESiterestrictListImgColorType where
parseQueryParam = \case
"color" -> Right CSESLICTColor
"gray" -> Right CSESLICTGray
"mono" -> Right CSESLICTMono
x -> Left ("Unable to parse CSESiterestrictListImgColorType from: " <> x)
instance ToHttpApiData CSESiterestrictListImgColorType where
toQueryParam = \case
CSESLICTColor -> "color"
CSESLICTGray -> "gray"
CSESLICTMono -> "mono"
instance FromJSON CSESiterestrictListImgColorType where
parseJSON = parseJSONText "CSESiterestrictListImgColorType"
instance ToJSON CSESiterestrictListImgColorType where
toJSON = toJSONText
data CSEListImgColorType
= CSELICTColor
| CSELICTGray
| CSELICTMono
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSEListImgColorType
instance FromHttpApiData CSEListImgColorType where
parseQueryParam = \case
"color" -> Right CSELICTColor
"gray" -> Right CSELICTGray
"mono" -> Right CSELICTMono
x -> Left ("Unable to parse CSEListImgColorType from: " <> x)
instance ToHttpApiData CSEListImgColorType where
toQueryParam = \case
CSELICTColor -> "color"
CSELICTGray -> "gray"
CSELICTMono -> "mono"
instance FromJSON CSEListImgColorType where
parseJSON = parseJSONText "CSEListImgColorType"
instance ToJSON CSEListImgColorType where
toJSON = toJSONText
data CSESiterestrictListSafe
= CSESLSHigh
| CSESLSMedium
| CSESLSOff
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSESiterestrictListSafe
instance FromHttpApiData CSESiterestrictListSafe where
parseQueryParam = \case
"high" -> Right CSESLSHigh
"medium" -> Right CSESLSMedium
"off" -> Right CSESLSOff
x -> Left ("Unable to parse CSESiterestrictListSafe from: " <> x)
instance ToHttpApiData CSESiterestrictListSafe where
toQueryParam = \case
CSESLSHigh -> "high"
CSESLSMedium -> "medium"
CSESLSOff -> "off"
instance FromJSON CSESiterestrictListSafe where
parseJSON = parseJSONText "CSESiterestrictListSafe"
instance ToJSON CSESiterestrictListSafe where
toJSON = toJSONText
data CSESiterestrictListImgDominantColor
= CSESLIDCBlack
| CSESLIDCBlue
| CSESLIDCBrown
| CSESLIDCGray
| CSESLIDCGreen
| CSESLIDCOrange
| CSESLIDCPink
| CSESLIDCPurple
| CSESLIDCRed
| CSESLIDCTeal
| CSESLIDCWhite
| CSESLIDCYellow
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSESiterestrictListImgDominantColor
instance FromHttpApiData CSESiterestrictListImgDominantColor where
parseQueryParam = \case
"black" -> Right CSESLIDCBlack
"blue" -> Right CSESLIDCBlue
"brown" -> Right CSESLIDCBrown
"gray" -> Right CSESLIDCGray
"green" -> Right CSESLIDCGreen
"orange" -> Right CSESLIDCOrange
"pink" -> Right CSESLIDCPink
"purple" -> Right CSESLIDCPurple
"red" -> Right CSESLIDCRed
"teal" -> Right CSESLIDCTeal
"white" -> Right CSESLIDCWhite
"yellow" -> Right CSESLIDCYellow
x -> Left ("Unable to parse CSESiterestrictListImgDominantColor from: " <> x)
instance ToHttpApiData CSESiterestrictListImgDominantColor where
toQueryParam = \case
CSESLIDCBlack -> "black"
CSESLIDCBlue -> "blue"
CSESLIDCBrown -> "brown"
CSESLIDCGray -> "gray"
CSESLIDCGreen -> "green"
CSESLIDCOrange -> "orange"
CSESLIDCPink -> "pink"
CSESLIDCPurple -> "purple"
CSESLIDCRed -> "red"
CSESLIDCTeal -> "teal"
CSESLIDCWhite -> "white"
CSESLIDCYellow -> "yellow"
instance FromJSON CSESiterestrictListImgDominantColor where
parseJSON = parseJSONText "CSESiterestrictListImgDominantColor"
instance ToJSON CSESiterestrictListImgDominantColor where
toJSON = toJSONText
data CSEListFilter
= CSELF0
| CSELF1
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSEListFilter
instance FromHttpApiData CSEListFilter where
parseQueryParam = \case
"0" -> Right CSELF0
"1" -> Right CSELF1
x -> Left ("Unable to parse CSEListFilter from: " <> x)
instance ToHttpApiData CSEListFilter where
toQueryParam = \case
CSELF0 -> "0"
CSELF1 -> "1"
instance FromJSON CSEListFilter where
parseJSON = parseJSONText "CSEListFilter"
instance ToJSON CSEListFilter where
toJSON = toJSONText
data CSESiterestrictListSiteSearchFilter
= CSESLSSFE
| CSESLSSFI
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSESiterestrictListSiteSearchFilter
instance FromHttpApiData CSESiterestrictListSiteSearchFilter where
parseQueryParam = \case
"e" -> Right CSESLSSFE
"i" -> Right CSESLSSFI
x -> Left ("Unable to parse CSESiterestrictListSiteSearchFilter from: " <> x)
instance ToHttpApiData CSESiterestrictListSiteSearchFilter where
toQueryParam = \case
CSESLSSFE -> "e"
CSESLSSFI -> "i"
instance FromJSON CSESiterestrictListSiteSearchFilter where
parseJSON = parseJSONText "CSESiterestrictListSiteSearchFilter"
instance ToJSON CSESiterestrictListSiteSearchFilter where
toJSON = toJSONText
data CSESiterestrictListLr
= LangAr
| LangBg
| LangCa
| LangCs
| LangDa
| LangDe
| LangEl
| LangEn
| LangEs
| LangEt
| LangFi
| LangFr
| LangHr
| LangHu
| LangId
| LangIs
| LangIt
| LangIw
| LangJa
| LangKo
| LangLT
| LangLv
| LangNl
| LangNo
| LangPl
| LangPt
| LangRo
| LangRu
| LangSk
| LangSl
| LangSr
| LangSv
| LangTr
| LangZhCn
| LangZhTw
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSESiterestrictListLr
instance FromHttpApiData CSESiterestrictListLr where
parseQueryParam = \case
"lang_ar" -> Right LangAr
"lang_bg" -> Right LangBg
"lang_ca" -> Right LangCa
"lang_cs" -> Right LangCs
"lang_da" -> Right LangDa
"lang_de" -> Right LangDe
"lang_el" -> Right LangEl
"lang_en" -> Right LangEn
"lang_es" -> Right LangEs
"lang_et" -> Right LangEt
"lang_fi" -> Right LangFi
"lang_fr" -> Right LangFr
"lang_hr" -> Right LangHr
"lang_hu" -> Right LangHu
"lang_id" -> Right LangId
"lang_is" -> Right LangIs
"lang_it" -> Right LangIt
"lang_iw" -> Right LangIw
"lang_ja" -> Right LangJa
"lang_ko" -> Right LangKo
"lang_lt" -> Right LangLT
"lang_lv" -> Right LangLv
"lang_nl" -> Right LangNl
"lang_no" -> Right LangNo
"lang_pl" -> Right LangPl
"lang_pt" -> Right LangPt
"lang_ro" -> Right LangRo
"lang_ru" -> Right LangRu
"lang_sk" -> Right LangSk
"lang_sl" -> Right LangSl
"lang_sr" -> Right LangSr
"lang_sv" -> Right LangSv
"lang_tr" -> Right LangTr
"lang_zh-CN" -> Right LangZhCn
"lang_zh-TW" -> Right LangZhTw
x -> Left ("Unable to parse CSESiterestrictListLr from: " <> x)
instance ToHttpApiData CSESiterestrictListLr where
toQueryParam = \case
LangAr -> "lang_ar"
LangBg -> "lang_bg"
LangCa -> "lang_ca"
LangCs -> "lang_cs"
LangDa -> "lang_da"
LangDe -> "lang_de"
LangEl -> "lang_el"
LangEn -> "lang_en"
LangEs -> "lang_es"
LangEt -> "lang_et"
LangFi -> "lang_fi"
LangFr -> "lang_fr"
LangHr -> "lang_hr"
LangHu -> "lang_hu"
LangId -> "lang_id"
LangIs -> "lang_is"
LangIt -> "lang_it"
LangIw -> "lang_iw"
LangJa -> "lang_ja"
LangKo -> "lang_ko"
LangLT -> "lang_lt"
LangLv -> "lang_lv"
LangNl -> "lang_nl"
LangNo -> "lang_no"
LangPl -> "lang_pl"
LangPt -> "lang_pt"
LangRo -> "lang_ro"
LangRu -> "lang_ru"
LangSk -> "lang_sk"
LangSl -> "lang_sl"
LangSr -> "lang_sr"
LangSv -> "lang_sv"
LangTr -> "lang_tr"
LangZhCn -> "lang_zh-CN"
LangZhTw -> "lang_zh-TW"
instance FromJSON CSESiterestrictListLr where
parseJSON = parseJSONText "CSESiterestrictListLr"
instance ToJSON CSESiterestrictListLr where
toJSON = toJSONText
data CSESiterestrictListSearchType
= Image
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSESiterestrictListSearchType
instance FromHttpApiData CSESiterestrictListSearchType where
parseQueryParam = \case
"image" -> Right Image
x -> Left ("Unable to parse CSESiterestrictListSearchType from: " <> x)
instance ToHttpApiData CSESiterestrictListSearchType where
toQueryParam = \case
Image -> "image"
instance FromJSON CSESiterestrictListSearchType where
parseJSON = parseJSONText "CSESiterestrictListSearchType"
instance ToJSON CSESiterestrictListSearchType where
toJSON = toJSONText
data CSEListLr
= CSELLLangAr
| CSELLLangBg
| CSELLLangCa
| CSELLLangCs
| CSELLLangDa
| CSELLLangDe
| CSELLLangEl
| CSELLLangEn
| CSELLLangEs
| CSELLLangEt
| CSELLLangFi
| CSELLLangFr
| CSELLLangHr
| CSELLLangHu
| CSELLLangId
| CSELLLangIs
| CSELLLangIt
| CSELLLangIw
| CSELLLangJa
| CSELLLangKo
| CSELLLangLT
| CSELLLangLv
| CSELLLangNl
| CSELLLangNo
| CSELLLangPl
| CSELLLangPt
| CSELLLangRo
| CSELLLangRu
| CSELLLangSk
| CSELLLangSl
| CSELLLangSr
| CSELLLangSv
| CSELLLangTr
| CSELLLangZhCn
| CSELLLangZhTw
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSEListLr
instance FromHttpApiData CSEListLr where
parseQueryParam = \case
"lang_ar" -> Right CSELLLangAr
"lang_bg" -> Right CSELLLangBg
"lang_ca" -> Right CSELLLangCa
"lang_cs" -> Right CSELLLangCs
"lang_da" -> Right CSELLLangDa
"lang_de" -> Right CSELLLangDe
"lang_el" -> Right CSELLLangEl
"lang_en" -> Right CSELLLangEn
"lang_es" -> Right CSELLLangEs
"lang_et" -> Right CSELLLangEt
"lang_fi" -> Right CSELLLangFi
"lang_fr" -> Right CSELLLangFr
"lang_hr" -> Right CSELLLangHr
"lang_hu" -> Right CSELLLangHu
"lang_id" -> Right CSELLLangId
"lang_is" -> Right CSELLLangIs
"lang_it" -> Right CSELLLangIt
"lang_iw" -> Right CSELLLangIw
"lang_ja" -> Right CSELLLangJa
"lang_ko" -> Right CSELLLangKo
"lang_lt" -> Right CSELLLangLT
"lang_lv" -> Right CSELLLangLv
"lang_nl" -> Right CSELLLangNl
"lang_no" -> Right CSELLLangNo
"lang_pl" -> Right CSELLLangPl
"lang_pt" -> Right CSELLLangPt
"lang_ro" -> Right CSELLLangRo
"lang_ru" -> Right CSELLLangRu
"lang_sk" -> Right CSELLLangSk
"lang_sl" -> Right CSELLLangSl
"lang_sr" -> Right CSELLLangSr
"lang_sv" -> Right CSELLLangSv
"lang_tr" -> Right CSELLLangTr
"lang_zh-CN" -> Right CSELLLangZhCn
"lang_zh-TW" -> Right CSELLLangZhTw
x -> Left ("Unable to parse CSEListLr from: " <> x)
instance ToHttpApiData CSEListLr where
toQueryParam = \case
CSELLLangAr -> "lang_ar"
CSELLLangBg -> "lang_bg"
CSELLLangCa -> "lang_ca"
CSELLLangCs -> "lang_cs"
CSELLLangDa -> "lang_da"
CSELLLangDe -> "lang_de"
CSELLLangEl -> "lang_el"
CSELLLangEn -> "lang_en"
CSELLLangEs -> "lang_es"
CSELLLangEt -> "lang_et"
CSELLLangFi -> "lang_fi"
CSELLLangFr -> "lang_fr"
CSELLLangHr -> "lang_hr"
CSELLLangHu -> "lang_hu"
CSELLLangId -> "lang_id"
CSELLLangIs -> "lang_is"
CSELLLangIt -> "lang_it"
CSELLLangIw -> "lang_iw"
CSELLLangJa -> "lang_ja"
CSELLLangKo -> "lang_ko"
CSELLLangLT -> "lang_lt"
CSELLLangLv -> "lang_lv"
CSELLLangNl -> "lang_nl"
CSELLLangNo -> "lang_no"
CSELLLangPl -> "lang_pl"
CSELLLangPt -> "lang_pt"
CSELLLangRo -> "lang_ro"
CSELLLangRu -> "lang_ru"
CSELLLangSk -> "lang_sk"
CSELLLangSl -> "lang_sl"
CSELLLangSr -> "lang_sr"
CSELLLangSv -> "lang_sv"
CSELLLangTr -> "lang_tr"
CSELLLangZhCn -> "lang_zh-CN"
CSELLLangZhTw -> "lang_zh-TW"
instance FromJSON CSEListLr where
parseJSON = parseJSONText "CSEListLr"
instance ToJSON CSEListLr where
toJSON = toJSONText
data CSEListSearchType
= CSELSTImage
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSEListSearchType
instance FromHttpApiData CSEListSearchType where
parseQueryParam = \case
"image" -> Right CSELSTImage
x -> Left ("Unable to parse CSEListSearchType from: " <> x)
instance ToHttpApiData CSEListSearchType where
toQueryParam = \case
CSELSTImage -> "image"
instance FromJSON CSEListSearchType where
parseJSON = parseJSONText "CSEListSearchType"
instance ToJSON CSEListSearchType where
toJSON = toJSONText
data CSEListImgSize
= CSELISHuge
| CSELISIcon
| CSELISLarge
| CSELISMedium
| CSELISSmall
| CSELISXlarge
| CSELISXxlarge
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CSEListImgSize
instance FromHttpApiData CSEListImgSize where
parseQueryParam = \case
"huge" -> Right CSELISHuge
"icon" -> Right CSELISIcon
"large" -> Right CSELISLarge
"medium" -> Right CSELISMedium
"small" -> Right CSELISSmall
"xlarge" -> Right CSELISXlarge
"xxlarge" -> Right CSELISXxlarge
x -> Left ("Unable to parse CSEListImgSize from: " <> x)
instance ToHttpApiData CSEListImgSize where
toQueryParam = \case
CSELISHuge -> "huge"
CSELISIcon -> "icon"
CSELISLarge -> "large"
CSELISMedium -> "medium"
CSELISSmall -> "small"
CSELISXlarge -> "xlarge"
CSELISXxlarge -> "xxlarge"
instance FromJSON CSEListImgSize where
parseJSON = parseJSONText "CSEListImgSize"
instance ToJSON CSEListImgSize where
toJSON = toJSONText