{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.AndroidManagement.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data PowerManagementEventEventType
= PowerManagementEventTypeUnspecified
| BatteryLevelCollected
| PowerConnected
| PowerDisconnected
| BatteryLow
| BatteryOkay
| BootCompleted
| Shutdown
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PowerManagementEventEventType
instance FromHttpApiData PowerManagementEventEventType where
parseQueryParam = \case
"POWER_MANAGEMENT_EVENT_TYPE_UNSPECIFIED" -> Right PowerManagementEventTypeUnspecified
"BATTERY_LEVEL_COLLECTED" -> Right BatteryLevelCollected
"POWER_CONNECTED" -> Right PowerConnected
"POWER_DISCONNECTED" -> Right PowerDisconnected
"BATTERY_LOW" -> Right BatteryLow
"BATTERY_OKAY" -> Right BatteryOkay
"BOOT_COMPLETED" -> Right BootCompleted
"SHUTDOWN" -> Right Shutdown
x -> Left ("Unable to parse PowerManagementEventEventType from: " <> x)
instance ToHttpApiData PowerManagementEventEventType where
toQueryParam = \case
PowerManagementEventTypeUnspecified -> "POWER_MANAGEMENT_EVENT_TYPE_UNSPECIFIED"
BatteryLevelCollected -> "BATTERY_LEVEL_COLLECTED"
PowerConnected -> "POWER_CONNECTED"
PowerDisconnected -> "POWER_DISCONNECTED"
BatteryLow -> "BATTERY_LOW"
BatteryOkay -> "BATTERY_OKAY"
BootCompleted -> "BOOT_COMPLETED"
Shutdown -> "SHUTDOWN"
instance FromJSON PowerManagementEventEventType where
parseJSON = parseJSONText "PowerManagementEventEventType"
instance ToJSON PowerManagementEventEventType where
toJSON = toJSONText
data SystemUpdateType
= SystemUpdateTypeUnspecified
| Automatic
| Windowed
| Postpone
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable SystemUpdateType
instance FromHttpApiData SystemUpdateType where
parseQueryParam = \case
"SYSTEM_UPDATE_TYPE_UNSPECIFIED" -> Right SystemUpdateTypeUnspecified
"AUTOMATIC" -> Right Automatic
"WINDOWED" -> Right Windowed
"POSTPONE" -> Right Postpone
x -> Left ("Unable to parse SystemUpdateType from: " <> x)
instance ToHttpApiData SystemUpdateType where
toQueryParam = \case
SystemUpdateTypeUnspecified -> "SYSTEM_UPDATE_TYPE_UNSPECIFIED"
Automatic -> "AUTOMATIC"
Windowed -> "WINDOWED"
Postpone -> "POSTPONE"
instance FromJSON SystemUpdateType where
parseJSON = parseJSONText "SystemUpdateType"
instance ToJSON SystemUpdateType where
toJSON = toJSONText
data DeviceState
= DeviceStateUnspecified
| Active
| Disabled
| Deleted
| Provisioning
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DeviceState
instance FromHttpApiData DeviceState where
parseQueryParam = \case
"DEVICE_STATE_UNSPECIFIED" -> Right DeviceStateUnspecified
"ACTIVE" -> Right Active
"DISABLED" -> Right Disabled
"DELETED" -> Right Deleted
"PROVISIONING" -> Right Provisioning
x -> Left ("Unable to parse DeviceState from: " <> x)
instance ToHttpApiData DeviceState where
toQueryParam = \case
DeviceStateUnspecified -> "DEVICE_STATE_UNSPECIFIED"
Active -> "ACTIVE"
Disabled -> "DISABLED"
Deleted -> "DELETED"
Provisioning -> "PROVISIONING"
instance FromJSON DeviceState where
parseJSON = parseJSONText "DeviceState"
instance ToJSON DeviceState where
toJSON = toJSONText
data CommandErrorCode
= CommandErrorCodeUnspecified
| Unknown
| APILevel
| ManagementMode
| InvalidValue
| Unsupported
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CommandErrorCode
instance FromHttpApiData CommandErrorCode where
parseQueryParam = \case
"COMMAND_ERROR_CODE_UNSPECIFIED" -> Right CommandErrorCodeUnspecified
"UNKNOWN" -> Right Unknown
"API_LEVEL" -> Right APILevel
"MANAGEMENT_MODE" -> Right ManagementMode
"INVALID_VALUE" -> Right InvalidValue
"UNSUPPORTED" -> Right Unsupported
x -> Left ("Unable to parse CommandErrorCode from: " <> x)
instance ToHttpApiData CommandErrorCode where
toQueryParam = \case
CommandErrorCodeUnspecified -> "COMMAND_ERROR_CODE_UNSPECIFIED"
Unknown -> "UNKNOWN"
APILevel -> "API_LEVEL"
ManagementMode -> "MANAGEMENT_MODE"
InvalidValue -> "INVALID_VALUE"
Unsupported -> "UNSUPPORTED"
instance FromJSON CommandErrorCode where
parseJSON = parseJSONText "CommandErrorCode"
instance ToJSON CommandErrorCode where
toJSON = toJSONText
data PermissionGrantPolicy
= PermissionPolicyUnspecified
| Prompt
| Grant
| Deny
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PermissionGrantPolicy
instance FromHttpApiData PermissionGrantPolicy where
parseQueryParam = \case
"PERMISSION_POLICY_UNSPECIFIED" -> Right PermissionPolicyUnspecified
"PROMPT" -> Right Prompt
"GRANT" -> Right Grant
"DENY" -> Right Deny
x -> Left ("Unable to parse PermissionGrantPolicy from: " <> x)
instance ToHttpApiData PermissionGrantPolicy where
toQueryParam = \case
PermissionPolicyUnspecified -> "PERMISSION_POLICY_UNSPECIFIED"
Prompt -> "PROMPT"
Grant -> "GRANT"
Deny -> "DENY"
instance FromJSON PermissionGrantPolicy where
parseJSON = parseJSONText "PermissionGrantPolicy"
instance ToJSON PermissionGrantPolicy where
toJSON = toJSONText
data DisplayState
= DisplayStateUnspecified
| Off
| ON
| Doze
| Suspended
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DisplayState
instance FromHttpApiData DisplayState where
parseQueryParam = \case
"DISPLAY_STATE_UNSPECIFIED" -> Right DisplayStateUnspecified
"OFF" -> Right Off
"ON" -> Right ON
"DOZE" -> Right Doze
"SUSPENDED" -> Right Suspended
x -> Left ("Unable to parse DisplayState from: " <> x)
instance ToHttpApiData DisplayState where
toQueryParam = \case
DisplayStateUnspecified -> "DISPLAY_STATE_UNSPECIFIED"
Off -> "OFF"
ON -> "ON"
Doze -> "DOZE"
Suspended -> "SUSPENDED"
instance FromJSON DisplayState where
parseJSON = parseJSONText "DisplayState"
instance ToJSON DisplayState where
toJSON = toJSONText
data PolicyPlayStoreMode
= PlayStoreModeUnspecified
| WhiteList
| BlackList
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PolicyPlayStoreMode
instance FromHttpApiData PolicyPlayStoreMode where
parseQueryParam = \case
"PLAY_STORE_MODE_UNSPECIFIED" -> Right PlayStoreModeUnspecified
"WHITELIST" -> Right WhiteList
"BLACKLIST" -> Right BlackList
x -> Left ("Unable to parse PolicyPlayStoreMode from: " <> x)
instance ToHttpApiData PolicyPlayStoreMode where
toQueryParam = \case
PlayStoreModeUnspecified -> "PLAY_STORE_MODE_UNSPECIFIED"
WhiteList -> "WHITELIST"
BlackList -> "BLACKLIST"
instance FromJSON PolicyPlayStoreMode where
parseJSON = parseJSONText "PolicyPlayStoreMode"
instance ToJSON PolicyPlayStoreMode where
toJSON = toJSONText
data DeviceManagementMode
= ManagementModeUnspecified
| DeviceOwner
| ProFileOwner
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DeviceManagementMode
instance FromHttpApiData DeviceManagementMode where
parseQueryParam = \case
"MANAGEMENT_MODE_UNSPECIFIED" -> Right ManagementModeUnspecified
"DEVICE_OWNER" -> Right DeviceOwner
"PROFILE_OWNER" -> Right ProFileOwner
x -> Left ("Unable to parse DeviceManagementMode from: " <> x)
instance ToHttpApiData DeviceManagementMode where
toQueryParam = \case
ManagementModeUnspecified -> "MANAGEMENT_MODE_UNSPECIFIED"
DeviceOwner -> "DEVICE_OWNER"
ProFileOwner -> "PROFILE_OWNER"
instance FromJSON DeviceManagementMode where
parseJSON = parseJSONText "DeviceManagementMode"
instance ToJSON DeviceManagementMode where
toJSON = toJSONText
data ApplicationReportApplicationSource
= ApplicationSourceUnspecified
| SystemAppFactoryVersion
| SystemAppUpdatedVersion
| InstalledFromPlayStore
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ApplicationReportApplicationSource
instance FromHttpApiData ApplicationReportApplicationSource where
parseQueryParam = \case
"APPLICATION_SOURCE_UNSPECIFIED" -> Right ApplicationSourceUnspecified
"SYSTEM_APP_FACTORY_VERSION" -> Right SystemAppFactoryVersion
"SYSTEM_APP_UPDATED_VERSION" -> Right SystemAppUpdatedVersion
"INSTALLED_FROM_PLAY_STORE" -> Right InstalledFromPlayStore
x -> Left ("Unable to parse ApplicationReportApplicationSource from: " <> x)
instance ToHttpApiData ApplicationReportApplicationSource where
toQueryParam = \case
ApplicationSourceUnspecified -> "APPLICATION_SOURCE_UNSPECIFIED"
SystemAppFactoryVersion -> "SYSTEM_APP_FACTORY_VERSION"
SystemAppUpdatedVersion -> "SYSTEM_APP_UPDATED_VERSION"
InstalledFromPlayStore -> "INSTALLED_FROM_PLAY_STORE"
instance FromJSON ApplicationReportApplicationSource where
parseJSON = parseJSONText "ApplicationReportApplicationSource"
instance ToJSON ApplicationReportApplicationSource where
toJSON = toJSONText
data ApplicationPolicyInstallType
= InstallTypeUnspecified
| Preinstalled
| ForceInstalled
| Blocked
| Available
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ApplicationPolicyInstallType
instance FromHttpApiData ApplicationPolicyInstallType where
parseQueryParam = \case
"INSTALL_TYPE_UNSPECIFIED" -> Right InstallTypeUnspecified
"PREINSTALLED" -> Right Preinstalled
"FORCE_INSTALLED" -> Right ForceInstalled
"BLOCKED" -> Right Blocked
"AVAILABLE" -> Right Available
x -> Left ("Unable to parse ApplicationPolicyInstallType from: " <> x)
instance ToHttpApiData ApplicationPolicyInstallType where
toQueryParam = \case
InstallTypeUnspecified -> "INSTALL_TYPE_UNSPECIFIED"
Preinstalled -> "PREINSTALLED"
ForceInstalled -> "FORCE_INSTALLED"
Blocked -> "BLOCKED"
Available -> "AVAILABLE"
instance FromJSON ApplicationPolicyInstallType where
parseJSON = parseJSONText "ApplicationPolicyInstallType"
instance ToJSON ApplicationPolicyInstallType where
toJSON = toJSONText
data NonComplianceDetailInstallationFailureReason
= InstallationFailureReasonUnspecified
| InstallationFailureReasonUnknown
| InProgress
| NotFound
| NotCompatibleWithDevice
| NotApproved
| PermissionsNotAccepted
| NotAvailableInCountry
| NoLicensesRemaining
| NotEnrolled
| UserInvalid
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable NonComplianceDetailInstallationFailureReason
instance FromHttpApiData NonComplianceDetailInstallationFailureReason where
parseQueryParam = \case
"INSTALLATION_FAILURE_REASON_UNSPECIFIED" -> Right InstallationFailureReasonUnspecified
"INSTALLATION_FAILURE_REASON_UNKNOWN" -> Right InstallationFailureReasonUnknown
"IN_PROGRESS" -> Right InProgress
"NOT_FOUND" -> Right NotFound
"NOT_COMPATIBLE_WITH_DEVICE" -> Right NotCompatibleWithDevice
"NOT_APPROVED" -> Right NotApproved
"PERMISSIONS_NOT_ACCEPTED" -> Right PermissionsNotAccepted
"NOT_AVAILABLE_IN_COUNTRY" -> Right NotAvailableInCountry
"NO_LICENSES_REMAINING" -> Right NoLicensesRemaining
"NOT_ENROLLED" -> Right NotEnrolled
"USER_INVALID" -> Right UserInvalid
x -> Left ("Unable to parse NonComplianceDetailInstallationFailureReason from: " <> x)
instance ToHttpApiData NonComplianceDetailInstallationFailureReason where
toQueryParam = \case
InstallationFailureReasonUnspecified -> "INSTALLATION_FAILURE_REASON_UNSPECIFIED"
InstallationFailureReasonUnknown -> "INSTALLATION_FAILURE_REASON_UNKNOWN"
InProgress -> "IN_PROGRESS"
NotFound -> "NOT_FOUND"
NotCompatibleWithDevice -> "NOT_COMPATIBLE_WITH_DEVICE"
NotApproved -> "NOT_APPROVED"
PermissionsNotAccepted -> "PERMISSIONS_NOT_ACCEPTED"
NotAvailableInCountry -> "NOT_AVAILABLE_IN_COUNTRY"
NoLicensesRemaining -> "NO_LICENSES_REMAINING"
NotEnrolled -> "NOT_ENROLLED"
UserInvalid -> "USER_INVALID"
instance FromJSON NonComplianceDetailInstallationFailureReason where
parseJSON = parseJSONText "NonComplianceDetailInstallationFailureReason"
instance ToJSON NonComplianceDetailInstallationFailureReason where
toJSON = toJSONText
data PasswordRequirementsPasswordScope
= ScopeUnspecified
| ScopeDevice
| ScopeProFile
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PasswordRequirementsPasswordScope
instance FromHttpApiData PasswordRequirementsPasswordScope where
parseQueryParam = \case
"SCOPE_UNSPECIFIED" -> Right ScopeUnspecified
"SCOPE_DEVICE" -> Right ScopeDevice
"SCOPE_PROFILE" -> Right ScopeProFile
x -> Left ("Unable to parse PasswordRequirementsPasswordScope from: " <> x)
instance ToHttpApiData PasswordRequirementsPasswordScope where
toQueryParam = \case
ScopeUnspecified -> "SCOPE_UNSPECIFIED"
ScopeDevice -> "SCOPE_DEVICE"
ScopeProFile -> "SCOPE_PROFILE"
instance FromJSON PasswordRequirementsPasswordScope where
parseJSON = parseJSONText "PasswordRequirementsPasswordScope"
instance ToJSON PasswordRequirementsPasswordScope where
toJSON = toJSONText
data DeviceSettingsEncryptionStatus
= DSESEncryptionStatusUnspecified
| DSESUnsupported
| DSESInactive
| DSESActivating
| DSESActive
| DSESActiveDefaultKey
| DSESActivePerUser
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DeviceSettingsEncryptionStatus
instance FromHttpApiData DeviceSettingsEncryptionStatus where
parseQueryParam = \case
"ENCRYPTION_STATUS_UNSPECIFIED" -> Right DSESEncryptionStatusUnspecified
"UNSUPPORTED" -> Right DSESUnsupported
"INACTIVE" -> Right DSESInactive
"ACTIVATING" -> Right DSESActivating
"ACTIVE" -> Right DSESActive
"ACTIVE_DEFAULT_KEY" -> Right DSESActiveDefaultKey
"ACTIVE_PER_USER" -> Right DSESActivePerUser
x -> Left ("Unable to parse DeviceSettingsEncryptionStatus from: " <> x)
instance ToHttpApiData DeviceSettingsEncryptionStatus where
toQueryParam = \case
DSESEncryptionStatusUnspecified -> "ENCRYPTION_STATUS_UNSPECIFIED"
DSESUnsupported -> "UNSUPPORTED"
DSESInactive -> "INACTIVE"
DSESActivating -> "ACTIVATING"
DSESActive -> "ACTIVE"
DSESActiveDefaultKey -> "ACTIVE_DEFAULT_KEY"
DSESActivePerUser -> "ACTIVE_PER_USER"
instance FromJSON DeviceSettingsEncryptionStatus where
parseJSON = parseJSONText "DeviceSettingsEncryptionStatus"
instance ToJSON DeviceSettingsEncryptionStatus where
toJSON = toJSONText
data PolicyLocationMode
= PLMLocationModeUnspecified
| PLMHighAccuracy
| PLMSensorsOnly
| PLMBatterySaving
| PLMOff
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PolicyLocationMode
instance FromHttpApiData PolicyLocationMode where
parseQueryParam = \case
"LOCATION_MODE_UNSPECIFIED" -> Right PLMLocationModeUnspecified
"HIGH_ACCURACY" -> Right PLMHighAccuracy
"SENSORS_ONLY" -> Right PLMSensorsOnly
"BATTERY_SAVING" -> Right PLMBatterySaving
"OFF" -> Right PLMOff
x -> Left ("Unable to parse PolicyLocationMode from: " <> x)
instance ToHttpApiData PolicyLocationMode where
toQueryParam = \case
PLMLocationModeUnspecified -> "LOCATION_MODE_UNSPECIFIED"
PLMHighAccuracy -> "HIGH_ACCURACY"
PLMSensorsOnly -> "SENSORS_ONLY"
PLMBatterySaving -> "BATTERY_SAVING"
PLMOff -> "OFF"
instance FromJSON PolicyLocationMode where
parseJSON = parseJSONText "PolicyLocationMode"
instance ToJSON PolicyLocationMode where
toJSON = toJSONText
data PolicyAppAutoUpdatePolicy
= AppAutoUpdatePolicyUnspecified
| ChoiceToTheUser
| Never
| WifiOnly
| Always
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PolicyAppAutoUpdatePolicy
instance FromHttpApiData PolicyAppAutoUpdatePolicy where
parseQueryParam = \case
"APP_AUTO_UPDATE_POLICY_UNSPECIFIED" -> Right AppAutoUpdatePolicyUnspecified
"CHOICE_TO_THE_USER" -> Right ChoiceToTheUser
"NEVER" -> Right Never
"WIFI_ONLY" -> Right WifiOnly
"ALWAYS" -> Right Always
x -> Left ("Unable to parse PolicyAppAutoUpdatePolicy from: " <> x)
instance ToHttpApiData PolicyAppAutoUpdatePolicy where
toQueryParam = \case
AppAutoUpdatePolicyUnspecified -> "APP_AUTO_UPDATE_POLICY_UNSPECIFIED"
ChoiceToTheUser -> "CHOICE_TO_THE_USER"
Never -> "NEVER"
WifiOnly -> "WIFI_ONLY"
Always -> "ALWAYS"
instance FromJSON PolicyAppAutoUpdatePolicy where
parseJSON = parseJSONText "PolicyAppAutoUpdatePolicy"
instance ToJSON PolicyAppAutoUpdatePolicy where
toJSON = toJSONText
data PolicyEncryptionPolicy
= EncryptionPolicyUnspecified
| EnabledWithoutPassword
| EnabledWithPassword
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PolicyEncryptionPolicy
instance FromHttpApiData PolicyEncryptionPolicy where
parseQueryParam = \case
"ENCRYPTION_POLICY_UNSPECIFIED" -> Right EncryptionPolicyUnspecified
"ENABLED_WITHOUT_PASSWORD" -> Right EnabledWithoutPassword
"ENABLED_WITH_PASSWORD" -> Right EnabledWithPassword
x -> Left ("Unable to parse PolicyEncryptionPolicy from: " <> x)
instance ToHttpApiData PolicyEncryptionPolicy where
toQueryParam = \case
EncryptionPolicyUnspecified -> "ENCRYPTION_POLICY_UNSPECIFIED"
EnabledWithoutPassword -> "ENABLED_WITHOUT_PASSWORD"
EnabledWithPassword -> "ENABLED_WITH_PASSWORD"
instance FromJSON PolicyEncryptionPolicy where
parseJSON = parseJSONText "PolicyEncryptionPolicy"
instance ToJSON PolicyEncryptionPolicy where
toJSON = toJSONText
data CommandType
= CommandTypeUnspecified
| Lock
| ResetPassword
| Reboot
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CommandType
instance FromHttpApiData CommandType where
parseQueryParam = \case
"COMMAND_TYPE_UNSPECIFIED" -> Right CommandTypeUnspecified
"LOCK" -> Right Lock
"RESET_PASSWORD" -> Right ResetPassword
"REBOOT" -> Right Reboot
x -> Left ("Unable to parse CommandType from: " <> x)
instance ToHttpApiData CommandType where
toQueryParam = \case
CommandTypeUnspecified -> "COMMAND_TYPE_UNSPECIFIED"
Lock -> "LOCK"
ResetPassword -> "RESET_PASSWORD"
Reboot -> "REBOOT"
instance FromJSON CommandType where
parseJSON = parseJSONText "CommandType"
instance ToJSON CommandType where
toJSON = toJSONText
data ApplicationPolicyDefaultPermissionPolicy
= APDPPPermissionPolicyUnspecified
| APDPPPrompt
| APDPPGrant
| APDPPDeny
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ApplicationPolicyDefaultPermissionPolicy
instance FromHttpApiData ApplicationPolicyDefaultPermissionPolicy where
parseQueryParam = \case
"PERMISSION_POLICY_UNSPECIFIED" -> Right APDPPPermissionPolicyUnspecified
"PROMPT" -> Right APDPPPrompt
"GRANT" -> Right APDPPGrant
"DENY" -> Right APDPPDeny
x -> Left ("Unable to parse ApplicationPolicyDefaultPermissionPolicy from: " <> x)
instance ToHttpApiData ApplicationPolicyDefaultPermissionPolicy where
toQueryParam = \case
APDPPPermissionPolicyUnspecified -> "PERMISSION_POLICY_UNSPECIFIED"
APDPPPrompt -> "PROMPT"
APDPPGrant -> "GRANT"
APDPPDeny -> "DENY"
instance FromJSON ApplicationPolicyDefaultPermissionPolicy where
parseJSON = parseJSONText "ApplicationPolicyDefaultPermissionPolicy"
instance ToJSON ApplicationPolicyDefaultPermissionPolicy 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
data ManagedPropertyType
= ManagedPropertyTypeUnspecified
| Bool
| String
| Integer
| Choice
| Multiselect
| Hidden
| BundleArray
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ManagedPropertyType
instance FromHttpApiData ManagedPropertyType where
parseQueryParam = \case
"MANAGED_PROPERTY_TYPE_UNSPECIFIED" -> Right ManagedPropertyTypeUnspecified
"BOOL" -> Right Bool
"STRING" -> Right String
"INTEGER" -> Right Integer
"CHOICE" -> Right Choice
"MULTISELECT" -> Right Multiselect
"HIDDEN" -> Right Hidden
"BUNDLE_ARRAY" -> Right BundleArray
x -> Left ("Unable to parse ManagedPropertyType from: " <> x)
instance ToHttpApiData ManagedPropertyType where
toQueryParam = \case
ManagedPropertyTypeUnspecified -> "MANAGED_PROPERTY_TYPE_UNSPECIFIED"
Bool -> "BOOL"
String -> "STRING"
Integer -> "INTEGER"
Choice -> "CHOICE"
Multiselect -> "MULTISELECT"
Hidden -> "HIDDEN"
BundleArray -> "BUNDLE_ARRAY"
instance FromJSON ManagedPropertyType where
parseJSON = parseJSONText "ManagedPropertyType"
instance ToJSON ManagedPropertyType where
toJSON = toJSONText
data DeviceAppliedState
= DASDeviceStateUnspecified
| DASActive
| DASDisabled
| DASDeleted
| DASProvisioning
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DeviceAppliedState
instance FromHttpApiData DeviceAppliedState where
parseQueryParam = \case
"DEVICE_STATE_UNSPECIFIED" -> Right DASDeviceStateUnspecified
"ACTIVE" -> Right DASActive
"DISABLED" -> Right DASDisabled
"DELETED" -> Right DASDeleted
"PROVISIONING" -> Right DASProvisioning
x -> Left ("Unable to parse DeviceAppliedState from: " <> x)
instance ToHttpApiData DeviceAppliedState where
toQueryParam = \case
DASDeviceStateUnspecified -> "DEVICE_STATE_UNSPECIFIED"
DASActive -> "ACTIVE"
DASDisabled -> "DISABLED"
DASDeleted -> "DELETED"
DASProvisioning -> "PROVISIONING"
instance FromJSON DeviceAppliedState where
parseJSON = parseJSONText "DeviceAppliedState"
instance ToJSON DeviceAppliedState where
toJSON = toJSONText
data ApplicationEventEventType
= ApplicationEventTypeUnspecified
| Installed
| Changed
| DataCleared
| Removed
| Replaced
| Restarted
| Pinned
| Unpinned
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ApplicationEventEventType
instance FromHttpApiData ApplicationEventEventType where
parseQueryParam = \case
"APPLICATION_EVENT_TYPE_UNSPECIFIED" -> Right ApplicationEventTypeUnspecified
"INSTALLED" -> Right Installed
"CHANGED" -> Right Changed
"DATA_CLEARED" -> Right DataCleared
"REMOVED" -> Right Removed
"REPLACED" -> Right Replaced
"RESTARTED" -> Right Restarted
"PINNED" -> Right Pinned
"UNPINNED" -> Right Unpinned
x -> Left ("Unable to parse ApplicationEventEventType from: " <> x)
instance ToHttpApiData ApplicationEventEventType where
toQueryParam = \case
ApplicationEventTypeUnspecified -> "APPLICATION_EVENT_TYPE_UNSPECIFIED"
Installed -> "INSTALLED"
Changed -> "CHANGED"
DataCleared -> "DATA_CLEARED"
Removed -> "REMOVED"
Replaced -> "REPLACED"
Restarted -> "RESTARTED"
Pinned -> "PINNED"
Unpinned -> "UNPINNED"
instance FromJSON ApplicationEventEventType where
parseJSON = parseJSONText "ApplicationEventEventType"
instance ToJSON ApplicationEventEventType where
toJSON = toJSONText
data NonComplianceDetailNonComplianceReason
= NCDNCRNonComplianceReasonUnspecified
| NCDNCRAPILevel
| NCDNCRManagementMode
| NCDNCRUserAction
| NCDNCRInvalidValue
| NCDNCRAppNotInstalled
| NCDNCRUnsupported
| NCDNCRAppInstalled
| NCDNCRPending
| NCDNCRAppIncompatible
| NCDNCRAppNotUpdated
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable NonComplianceDetailNonComplianceReason
instance FromHttpApiData NonComplianceDetailNonComplianceReason where
parseQueryParam = \case
"NON_COMPLIANCE_REASON_UNSPECIFIED" -> Right NCDNCRNonComplianceReasonUnspecified
"API_LEVEL" -> Right NCDNCRAPILevel
"MANAGEMENT_MODE" -> Right NCDNCRManagementMode
"USER_ACTION" -> Right NCDNCRUserAction
"INVALID_VALUE" -> Right NCDNCRInvalidValue
"APP_NOT_INSTALLED" -> Right NCDNCRAppNotInstalled
"UNSUPPORTED" -> Right NCDNCRUnsupported
"APP_INSTALLED" -> Right NCDNCRAppInstalled
"PENDING" -> Right NCDNCRPending
"APP_INCOMPATIBLE" -> Right NCDNCRAppIncompatible
"APP_NOT_UPDATED" -> Right NCDNCRAppNotUpdated
x -> Left ("Unable to parse NonComplianceDetailNonComplianceReason from: " <> x)
instance ToHttpApiData NonComplianceDetailNonComplianceReason where
toQueryParam = \case
NCDNCRNonComplianceReasonUnspecified -> "NON_COMPLIANCE_REASON_UNSPECIFIED"
NCDNCRAPILevel -> "API_LEVEL"
NCDNCRManagementMode -> "MANAGEMENT_MODE"
NCDNCRUserAction -> "USER_ACTION"
NCDNCRInvalidValue -> "INVALID_VALUE"
NCDNCRAppNotInstalled -> "APP_NOT_INSTALLED"
NCDNCRUnsupported -> "UNSUPPORTED"
NCDNCRAppInstalled -> "APP_INSTALLED"
NCDNCRPending -> "PENDING"
NCDNCRAppIncompatible -> "APP_INCOMPATIBLE"
NCDNCRAppNotUpdated -> "APP_NOT_UPDATED"
instance FromJSON NonComplianceDetailNonComplianceReason where
parseJSON = parseJSONText "NonComplianceDetailNonComplianceReason"
instance ToJSON NonComplianceDetailNonComplianceReason where
toJSON = toJSONText
data PolicyDefaultPermissionPolicy
= PDPPPermissionPolicyUnspecified
| PDPPPrompt
| PDPPGrant
| PDPPDeny
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PolicyDefaultPermissionPolicy
instance FromHttpApiData PolicyDefaultPermissionPolicy where
parseQueryParam = \case
"PERMISSION_POLICY_UNSPECIFIED" -> Right PDPPPermissionPolicyUnspecified
"PROMPT" -> Right PDPPPrompt
"GRANT" -> Right PDPPGrant
"DENY" -> Right PDPPDeny
x -> Left ("Unable to parse PolicyDefaultPermissionPolicy from: " <> x)
instance ToHttpApiData PolicyDefaultPermissionPolicy where
toQueryParam = \case
PDPPPermissionPolicyUnspecified -> "PERMISSION_POLICY_UNSPECIFIED"
PDPPPrompt -> "PROMPT"
PDPPGrant -> "GRANT"
PDPPDeny -> "DENY"
instance FromJSON PolicyDefaultPermissionPolicy where
parseJSON = parseJSONText "PolicyDefaultPermissionPolicy"
instance ToJSON PolicyDefaultPermissionPolicy where
toJSON = toJSONText
data ApplicationReportState
= ARSInstalled
| ARSRemoved
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ApplicationReportState
instance FromHttpApiData ApplicationReportState where
parseQueryParam = \case
"INSTALLED" -> Right ARSInstalled
"REMOVED" -> Right ARSRemoved
x -> Left ("Unable to parse ApplicationReportState from: " <> x)
instance ToHttpApiData ApplicationReportState where
toQueryParam = \case
ARSInstalled -> "INSTALLED"
ARSRemoved -> "REMOVED"
instance FromJSON ApplicationReportState where
parseJSON = parseJSONText "ApplicationReportState"
instance ToJSON ApplicationReportState where
toJSON = toJSONText
data NonComplianceDetailConditionNonComplianceReason
= NCDCNCRNonComplianceReasonUnspecified
| NCDCNCRAPILevel
| NCDCNCRManagementMode
| NCDCNCRUserAction
| NCDCNCRInvalidValue
| NCDCNCRAppNotInstalled
| NCDCNCRUnsupported
| NCDCNCRAppInstalled
| NCDCNCRPending
| NCDCNCRAppIncompatible
| NCDCNCRAppNotUpdated
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable NonComplianceDetailConditionNonComplianceReason
instance FromHttpApiData NonComplianceDetailConditionNonComplianceReason where
parseQueryParam = \case
"NON_COMPLIANCE_REASON_UNSPECIFIED" -> Right NCDCNCRNonComplianceReasonUnspecified
"API_LEVEL" -> Right NCDCNCRAPILevel
"MANAGEMENT_MODE" -> Right NCDCNCRManagementMode
"USER_ACTION" -> Right NCDCNCRUserAction
"INVALID_VALUE" -> Right NCDCNCRInvalidValue
"APP_NOT_INSTALLED" -> Right NCDCNCRAppNotInstalled
"UNSUPPORTED" -> Right NCDCNCRUnsupported
"APP_INSTALLED" -> Right NCDCNCRAppInstalled
"PENDING" -> Right NCDCNCRPending
"APP_INCOMPATIBLE" -> Right NCDCNCRAppIncompatible
"APP_NOT_UPDATED" -> Right NCDCNCRAppNotUpdated
x -> Left ("Unable to parse NonComplianceDetailConditionNonComplianceReason from: " <> x)
instance ToHttpApiData NonComplianceDetailConditionNonComplianceReason where
toQueryParam = \case
NCDCNCRNonComplianceReasonUnspecified -> "NON_COMPLIANCE_REASON_UNSPECIFIED"
NCDCNCRAPILevel -> "API_LEVEL"
NCDCNCRManagementMode -> "MANAGEMENT_MODE"
NCDCNCRUserAction -> "USER_ACTION"
NCDCNCRInvalidValue -> "INVALID_VALUE"
NCDCNCRAppNotInstalled -> "APP_NOT_INSTALLED"
NCDCNCRUnsupported -> "UNSUPPORTED"
NCDCNCRAppInstalled -> "APP_INSTALLED"
NCDCNCRPending -> "PENDING"
NCDCNCRAppIncompatible -> "APP_INCOMPATIBLE"
NCDCNCRAppNotUpdated -> "APP_NOT_UPDATED"
instance FromJSON NonComplianceDetailConditionNonComplianceReason where
parseJSON = parseJSONText "NonComplianceDetailConditionNonComplianceReason"
instance ToJSON NonComplianceDetailConditionNonComplianceReason where
toJSON = toJSONText
data MemoryEventEventType
= MemoryEventTypeUnspecified
| RamMeasured
| InternalStorageMeasured
| ExternalStorageDetected
| ExternalStorageRemoved
| ExternalStorageMeasured
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable MemoryEventEventType
instance FromHttpApiData MemoryEventEventType where
parseQueryParam = \case
"MEMORY_EVENT_TYPE_UNSPECIFIED" -> Right MemoryEventTypeUnspecified
"RAM_MEASURED" -> Right RamMeasured
"INTERNAL_STORAGE_MEASURED" -> Right InternalStorageMeasured
"EXTERNAL_STORAGE_DETECTED" -> Right ExternalStorageDetected
"EXTERNAL_STORAGE_REMOVED" -> Right ExternalStorageRemoved
"EXTERNAL_STORAGE_MEASURED" -> Right ExternalStorageMeasured
x -> Left ("Unable to parse MemoryEventEventType from: " <> x)
instance ToHttpApiData MemoryEventEventType where
toQueryParam = \case
MemoryEventTypeUnspecified -> "MEMORY_EVENT_TYPE_UNSPECIFIED"
RamMeasured -> "RAM_MEASURED"
InternalStorageMeasured -> "INTERNAL_STORAGE_MEASURED"
ExternalStorageDetected -> "EXTERNAL_STORAGE_DETECTED"
ExternalStorageRemoved -> "EXTERNAL_STORAGE_REMOVED"
ExternalStorageMeasured -> "EXTERNAL_STORAGE_MEASURED"
instance FromJSON MemoryEventEventType where
parseJSON = parseJSONText "MemoryEventEventType"
instance ToJSON MemoryEventEventType where
toJSON = toJSONText
data PasswordRequirementsPasswordQuality
= PasswordQualityUnspecified
| BiometricWeak
| Something
| Numeric
| NumericComplex
| Alphabetic
| Alphanumeric
| Complex
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PasswordRequirementsPasswordQuality
instance FromHttpApiData PasswordRequirementsPasswordQuality where
parseQueryParam = \case
"PASSWORD_QUALITY_UNSPECIFIED" -> Right PasswordQualityUnspecified
"BIOMETRIC_WEAK" -> Right BiometricWeak
"SOMETHING" -> Right Something
"NUMERIC" -> Right Numeric
"NUMERIC_COMPLEX" -> Right NumericComplex
"ALPHABETIC" -> Right Alphabetic
"ALPHANUMERIC" -> Right Alphanumeric
"COMPLEX" -> Right Complex
x -> Left ("Unable to parse PasswordRequirementsPasswordQuality from: " <> x)
instance ToHttpApiData PasswordRequirementsPasswordQuality where
toQueryParam = \case
PasswordQualityUnspecified -> "PASSWORD_QUALITY_UNSPECIFIED"
BiometricWeak -> "BIOMETRIC_WEAK"
Something -> "SOMETHING"
Numeric -> "NUMERIC"
NumericComplex -> "NUMERIC_COMPLEX"
Alphabetic -> "ALPHABETIC"
Alphanumeric -> "ALPHANUMERIC"
Complex -> "COMPLEX"
instance FromJSON PasswordRequirementsPasswordQuality where
parseJSON = parseJSONText "PasswordRequirementsPasswordQuality"
instance ToJSON PasswordRequirementsPasswordQuality where
toJSON = toJSONText