{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.AccessContextManager.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data BasicLevelCombiningFunction
= And
| OR
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable BasicLevelCombiningFunction
instance FromHttpApiData BasicLevelCombiningFunction where
parseQueryParam = \case
"AND" -> Right And
"OR" -> Right OR
x -> Left ("Unable to parse BasicLevelCombiningFunction from: " <> x)
instance ToHttpApiData BasicLevelCombiningFunction where
toQueryParam = \case
And -> "AND"
OR -> "OR"
instance FromJSON BasicLevelCombiningFunction where
parseJSON = parseJSONText "BasicLevelCombiningFunction"
instance ToJSON BasicLevelCombiningFunction where
toJSON = toJSONText
data ServicePerimeterPerimeterType
= PerimeterTypeRegular
| PerimeterTypeBridge
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ServicePerimeterPerimeterType
instance FromHttpApiData ServicePerimeterPerimeterType where
parseQueryParam = \case
"PERIMETER_TYPE_REGULAR" -> Right PerimeterTypeRegular
"PERIMETER_TYPE_BRIDGE" -> Right PerimeterTypeBridge
x -> Left ("Unable to parse ServicePerimeterPerimeterType from: " <> x)
instance ToHttpApiData ServicePerimeterPerimeterType where
toQueryParam = \case
PerimeterTypeRegular -> "PERIMETER_TYPE_REGULAR"
PerimeterTypeBridge -> "PERIMETER_TYPE_BRIDGE"
instance FromJSON ServicePerimeterPerimeterType where
parseJSON = parseJSONText "ServicePerimeterPerimeterType"
instance ToJSON ServicePerimeterPerimeterType where
toJSON = toJSONText
data OSConstraintOSType
= OSUnspecified
| DesktopMAC
| DesktopWindows
| DesktopLinux
| DesktopChromeOS
| Android
| Ios
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable OSConstraintOSType
instance FromHttpApiData OSConstraintOSType where
parseQueryParam = \case
"OS_UNSPECIFIED" -> Right OSUnspecified
"DESKTOP_MAC" -> Right DesktopMAC
"DESKTOP_WINDOWS" -> Right DesktopWindows
"DESKTOP_LINUX" -> Right DesktopLinux
"DESKTOP_CHROME_OS" -> Right DesktopChromeOS
"ANDROID" -> Right Android
"IOS" -> Right Ios
x -> Left ("Unable to parse OSConstraintOSType from: " <> x)
instance ToHttpApiData OSConstraintOSType where
toQueryParam = \case
OSUnspecified -> "OS_UNSPECIFIED"
DesktopMAC -> "DESKTOP_MAC"
DesktopWindows -> "DESKTOP_WINDOWS"
DesktopLinux -> "DESKTOP_LINUX"
DesktopChromeOS -> "DESKTOP_CHROME_OS"
Android -> "ANDROID"
Ios -> "IOS"
instance FromJSON OSConstraintOSType where
parseJSON = parseJSONText "OSConstraintOSType"
instance ToJSON OSConstraintOSType 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