{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.AndroidEnterprise.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data EnterprisesPullNotificationSetRequestMode
= ReturnImmediately
| WaitForNotifications
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable EnterprisesPullNotificationSetRequestMode
instance FromHttpApiData EnterprisesPullNotificationSetRequestMode where
parseQueryParam = \case
"returnImmediately" -> Right ReturnImmediately
"waitForNotifications" -> Right WaitForNotifications
x -> Left ("Unable to parse EnterprisesPullNotificationSetRequestMode from: " <> x)
instance ToHttpApiData EnterprisesPullNotificationSetRequestMode where
toQueryParam = \case
ReturnImmediately -> "returnImmediately"
WaitForNotifications -> "waitForNotifications"
instance FromJSON EnterprisesPullNotificationSetRequestMode where
parseJSON = parseJSONText "EnterprisesPullNotificationSetRequestMode"
instance ToJSON EnterprisesPullNotificationSetRequestMode where
toJSON = toJSONText
data EnterprisesGetServiceAccountKeyType
= GoogleCredentials
| PKCS12
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable EnterprisesGetServiceAccountKeyType
instance FromHttpApiData EnterprisesGetServiceAccountKeyType where
parseQueryParam = \case
"googleCredentials" -> Right GoogleCredentials
"pkcs12" -> Right PKCS12
x -> Left ("Unable to parse EnterprisesGetServiceAccountKeyType from: " <> x)
instance ToHttpApiData EnterprisesGetServiceAccountKeyType where
toQueryParam = \case
GoogleCredentials -> "googleCredentials"
PKCS12 -> "pkcs12"
instance FromJSON EnterprisesGetServiceAccountKeyType where
parseJSON = parseJSONText "EnterprisesGetServiceAccountKeyType"
instance ToJSON EnterprisesGetServiceAccountKeyType where
toJSON = toJSONText