{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.AndroidDeviceProvisioning.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data PerDeviceStatusInBatchStatus
= SingleDeviceStatusUnspecified
| SingleDeviceStatusUnknownError
| SingleDeviceStatusOtherError
| SingleDeviceStatusSuccess
| SingleDeviceStatusPermissionDenied
| SingleDeviceStatusInvalidDeviceIdentifier
| SingleDeviceStatusInvalidSectionType
| SingleDeviceStatusSectionNotYours
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PerDeviceStatusInBatchStatus
instance FromHttpApiData PerDeviceStatusInBatchStatus where
parseQueryParam = \case
"SINGLE_DEVICE_STATUS_UNSPECIFIED" -> Right SingleDeviceStatusUnspecified
"SINGLE_DEVICE_STATUS_UNKNOWN_ERROR" -> Right SingleDeviceStatusUnknownError
"SINGLE_DEVICE_STATUS_OTHER_ERROR" -> Right SingleDeviceStatusOtherError
"SINGLE_DEVICE_STATUS_SUCCESS" -> Right SingleDeviceStatusSuccess
"SINGLE_DEVICE_STATUS_PERMISSION_DENIED" -> Right SingleDeviceStatusPermissionDenied
"SINGLE_DEVICE_STATUS_INVALID_DEVICE_IDENTIFIER" -> Right SingleDeviceStatusInvalidDeviceIdentifier
"SINGLE_DEVICE_STATUS_INVALID_SECTION_TYPE" -> Right SingleDeviceStatusInvalidSectionType
"SINGLE_DEVICE_STATUS_SECTION_NOT_YOURS" -> Right SingleDeviceStatusSectionNotYours
x -> Left ("Unable to parse PerDeviceStatusInBatchStatus from: " <> x)
instance ToHttpApiData PerDeviceStatusInBatchStatus where
toQueryParam = \case
SingleDeviceStatusUnspecified -> "SINGLE_DEVICE_STATUS_UNSPECIFIED"
SingleDeviceStatusUnknownError -> "SINGLE_DEVICE_STATUS_UNKNOWN_ERROR"
SingleDeviceStatusOtherError -> "SINGLE_DEVICE_STATUS_OTHER_ERROR"
SingleDeviceStatusSuccess -> "SINGLE_DEVICE_STATUS_SUCCESS"
SingleDeviceStatusPermissionDenied -> "SINGLE_DEVICE_STATUS_PERMISSION_DENIED"
SingleDeviceStatusInvalidDeviceIdentifier -> "SINGLE_DEVICE_STATUS_INVALID_DEVICE_IDENTIFIER"
SingleDeviceStatusInvalidSectionType -> "SINGLE_DEVICE_STATUS_INVALID_SECTION_TYPE"
SingleDeviceStatusSectionNotYours -> "SINGLE_DEVICE_STATUS_SECTION_NOT_YOURS"
instance FromJSON PerDeviceStatusInBatchStatus where
parseJSON = parseJSONText "PerDeviceStatusInBatchStatus"
instance ToJSON PerDeviceStatusInBatchStatus where
toJSON = toJSONText
data FindDevicesByOwnerRequestSectionType
= SectionTypeUnspecified
| SectionTypeSimLock
| SectionTypeZeroTouch
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable FindDevicesByOwnerRequestSectionType
instance FromHttpApiData FindDevicesByOwnerRequestSectionType where
parseQueryParam = \case
"SECTION_TYPE_UNSPECIFIED" -> Right SectionTypeUnspecified
"SECTION_TYPE_SIM_LOCK" -> Right SectionTypeSimLock
"SECTION_TYPE_ZERO_TOUCH" -> Right SectionTypeZeroTouch
x -> Left ("Unable to parse FindDevicesByOwnerRequestSectionType from: " <> x)
instance ToHttpApiData FindDevicesByOwnerRequestSectionType where
toQueryParam = \case
SectionTypeUnspecified -> "SECTION_TYPE_UNSPECIFIED"
SectionTypeSimLock -> "SECTION_TYPE_SIM_LOCK"
SectionTypeZeroTouch -> "SECTION_TYPE_ZERO_TOUCH"
instance FromJSON FindDevicesByOwnerRequestSectionType where
parseJSON = parseJSONText "FindDevicesByOwnerRequestSectionType"
instance ToJSON FindDevicesByOwnerRequestSectionType where
toJSON = toJSONText
data PartnerClaimSectionType
= PCSTSectionTypeUnspecified
| PCSTSectionTypeSimLock
| PCSTSectionTypeZeroTouch
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PartnerClaimSectionType
instance FromHttpApiData PartnerClaimSectionType where
parseQueryParam = \case
"SECTION_TYPE_UNSPECIFIED" -> Right PCSTSectionTypeUnspecified
"SECTION_TYPE_SIM_LOCK" -> Right PCSTSectionTypeSimLock
"SECTION_TYPE_ZERO_TOUCH" -> Right PCSTSectionTypeZeroTouch
x -> Left ("Unable to parse PartnerClaimSectionType from: " <> x)
instance ToHttpApiData PartnerClaimSectionType where
toQueryParam = \case
PCSTSectionTypeUnspecified -> "SECTION_TYPE_UNSPECIFIED"
PCSTSectionTypeSimLock -> "SECTION_TYPE_SIM_LOCK"
PCSTSectionTypeZeroTouch -> "SECTION_TYPE_ZERO_TOUCH"
instance FromJSON PartnerClaimSectionType where
parseJSON = parseJSONText "PartnerClaimSectionType"
instance ToJSON PartnerClaimSectionType where
toJSON = toJSONText
data PartnerUnclaimSectionType
= PUSTSectionTypeUnspecified
| PUSTSectionTypeSimLock
| PUSTSectionTypeZeroTouch
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable PartnerUnclaimSectionType
instance FromHttpApiData PartnerUnclaimSectionType where
parseQueryParam = \case
"SECTION_TYPE_UNSPECIFIED" -> Right PUSTSectionTypeUnspecified
"SECTION_TYPE_SIM_LOCK" -> Right PUSTSectionTypeSimLock
"SECTION_TYPE_ZERO_TOUCH" -> Right PUSTSectionTypeZeroTouch
x -> Left ("Unable to parse PartnerUnclaimSectionType from: " <> x)
instance ToHttpApiData PartnerUnclaimSectionType where
toQueryParam = \case
PUSTSectionTypeUnspecified -> "SECTION_TYPE_UNSPECIFIED"
PUSTSectionTypeSimLock -> "SECTION_TYPE_SIM_LOCK"
PUSTSectionTypeZeroTouch -> "SECTION_TYPE_ZERO_TOUCH"
instance FromJSON PartnerUnclaimSectionType where
parseJSON = parseJSONText "PartnerUnclaimSectionType"
instance ToJSON PartnerUnclaimSectionType 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 ClaimDeviceRequestSectionType
= CDRSTSectionTypeUnspecified
| CDRSTSectionTypeSimLock
| CDRSTSectionTypeZeroTouch
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ClaimDeviceRequestSectionType
instance FromHttpApiData ClaimDeviceRequestSectionType where
parseQueryParam = \case
"SECTION_TYPE_UNSPECIFIED" -> Right CDRSTSectionTypeUnspecified
"SECTION_TYPE_SIM_LOCK" -> Right CDRSTSectionTypeSimLock
"SECTION_TYPE_ZERO_TOUCH" -> Right CDRSTSectionTypeZeroTouch
x -> Left ("Unable to parse ClaimDeviceRequestSectionType from: " <> x)
instance ToHttpApiData ClaimDeviceRequestSectionType where
toQueryParam = \case
CDRSTSectionTypeUnspecified -> "SECTION_TYPE_UNSPECIFIED"
CDRSTSectionTypeSimLock -> "SECTION_TYPE_SIM_LOCK"
CDRSTSectionTypeZeroTouch -> "SECTION_TYPE_ZERO_TOUCH"
instance FromJSON ClaimDeviceRequestSectionType where
parseJSON = parseJSONText "ClaimDeviceRequestSectionType"
instance ToJSON ClaimDeviceRequestSectionType where
toJSON = toJSONText
data DeviceClaimSectionType
= DCSTSectionTypeUnspecified
| DCSTSectionTypeSimLock
| DCSTSectionTypeZeroTouch
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DeviceClaimSectionType
instance FromHttpApiData DeviceClaimSectionType where
parseQueryParam = \case
"SECTION_TYPE_UNSPECIFIED" -> Right DCSTSectionTypeUnspecified
"SECTION_TYPE_SIM_LOCK" -> Right DCSTSectionTypeSimLock
"SECTION_TYPE_ZERO_TOUCH" -> Right DCSTSectionTypeZeroTouch
x -> Left ("Unable to parse DeviceClaimSectionType from: " <> x)
instance ToHttpApiData DeviceClaimSectionType where
toQueryParam = \case
DCSTSectionTypeUnspecified -> "SECTION_TYPE_UNSPECIFIED"
DCSTSectionTypeSimLock -> "SECTION_TYPE_SIM_LOCK"
DCSTSectionTypeZeroTouch -> "SECTION_TYPE_ZERO_TOUCH"
instance FromJSON DeviceClaimSectionType where
parseJSON = parseJSONText "DeviceClaimSectionType"
instance ToJSON DeviceClaimSectionType where
toJSON = toJSONText
data CompanyTermsStatus
= TermsStatusUnspecified
| TermsStatusNotAccepted
| TermsStatusAccepted
| TermsStatusStale
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CompanyTermsStatus
instance FromHttpApiData CompanyTermsStatus where
parseQueryParam = \case
"TERMS_STATUS_UNSPECIFIED" -> Right TermsStatusUnspecified
"TERMS_STATUS_NOT_ACCEPTED" -> Right TermsStatusNotAccepted
"TERMS_STATUS_ACCEPTED" -> Right TermsStatusAccepted
"TERMS_STATUS_STALE" -> Right TermsStatusStale
x -> Left ("Unable to parse CompanyTermsStatus from: " <> x)
instance ToHttpApiData CompanyTermsStatus where
toQueryParam = \case
TermsStatusUnspecified -> "TERMS_STATUS_UNSPECIFIED"
TermsStatusNotAccepted -> "TERMS_STATUS_NOT_ACCEPTED"
TermsStatusAccepted -> "TERMS_STATUS_ACCEPTED"
TermsStatusStale -> "TERMS_STATUS_STALE"
instance FromJSON CompanyTermsStatus where
parseJSON = parseJSONText "CompanyTermsStatus"
instance ToJSON CompanyTermsStatus where
toJSON = toJSONText
data UnclaimDeviceRequestSectionType
= UDRSTSectionTypeUnspecified
| UDRSTSectionTypeSimLock
| UDRSTSectionTypeZeroTouch
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UnclaimDeviceRequestSectionType
instance FromHttpApiData UnclaimDeviceRequestSectionType where
parseQueryParam = \case
"SECTION_TYPE_UNSPECIFIED" -> Right UDRSTSectionTypeUnspecified
"SECTION_TYPE_SIM_LOCK" -> Right UDRSTSectionTypeSimLock
"SECTION_TYPE_ZERO_TOUCH" -> Right UDRSTSectionTypeZeroTouch
x -> Left ("Unable to parse UnclaimDeviceRequestSectionType from: " <> x)
instance ToHttpApiData UnclaimDeviceRequestSectionType where
toQueryParam = \case
UDRSTSectionTypeUnspecified -> "SECTION_TYPE_UNSPECIFIED"
UDRSTSectionTypeSimLock -> "SECTION_TYPE_SIM_LOCK"
UDRSTSectionTypeZeroTouch -> "SECTION_TYPE_ZERO_TOUCH"
instance FromJSON UnclaimDeviceRequestSectionType where
parseJSON = parseJSONText "UnclaimDeviceRequestSectionType"
instance ToJSON UnclaimDeviceRequestSectionType where
toJSON = toJSONText
data DevicesLongRunningOperationMetadataProcessingStatus
= BatchProcessStatusUnspecified
| BatchProcessPending
| BatchProcessInProgress
| BatchProcessProcessed
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DevicesLongRunningOperationMetadataProcessingStatus
instance FromHttpApiData DevicesLongRunningOperationMetadataProcessingStatus where
parseQueryParam = \case
"BATCH_PROCESS_STATUS_UNSPECIFIED" -> Right BatchProcessStatusUnspecified
"BATCH_PROCESS_PENDING" -> Right BatchProcessPending
"BATCH_PROCESS_IN_PROGRESS" -> Right BatchProcessInProgress
"BATCH_PROCESS_PROCESSED" -> Right BatchProcessProcessed
x -> Left ("Unable to parse DevicesLongRunningOperationMetadataProcessingStatus from: " <> x)
instance ToHttpApiData DevicesLongRunningOperationMetadataProcessingStatus where
toQueryParam = \case
BatchProcessStatusUnspecified -> "BATCH_PROCESS_STATUS_UNSPECIFIED"
BatchProcessPending -> "BATCH_PROCESS_PENDING"
BatchProcessInProgress -> "BATCH_PROCESS_IN_PROGRESS"
BatchProcessProcessed -> "BATCH_PROCESS_PROCESSED"
instance FromJSON DevicesLongRunningOperationMetadataProcessingStatus where
parseJSON = parseJSONText "DevicesLongRunningOperationMetadataProcessingStatus"
instance ToJSON DevicesLongRunningOperationMetadataProcessingStatus where
toJSON = toJSONText