module Network.Google.Directory.Types.Sum where
import Network.Google.Prelude
data UsersListEvent
= Add
| Delete'
| MakeAdmin
| Undelete
| Update
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UsersListEvent
instance FromHttpApiData UsersListEvent where
parseQueryParam = \case
"add" -> Right Add
"delete" -> Right Delete'
"makeAdmin" -> Right MakeAdmin
"undelete" -> Right Undelete
"update" -> Right Update
x -> Left ("Unable to parse UsersListEvent from: " <> x)
instance ToHttpApiData UsersListEvent where
toQueryParam = \case
Add -> "add"
Delete' -> "delete"
MakeAdmin -> "makeAdmin"
Undelete -> "undelete"
Update -> "update"
instance FromJSON UsersListEvent where
parseJSON = parseJSONText "UsersListEvent"
instance ToJSON UsersListEvent where
toJSON = toJSONText
data UsersAliasesListEvent
= UALEAdd
| UALEDelete'
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UsersAliasesListEvent
instance FromHttpApiData UsersAliasesListEvent where
parseQueryParam = \case
"add" -> Right UALEAdd
"delete" -> Right UALEDelete'
x -> Left ("Unable to parse UsersAliasesListEvent from: " <> x)
instance ToHttpApiData UsersAliasesListEvent where
toQueryParam = \case
UALEAdd -> "add"
UALEDelete' -> "delete"
instance FromJSON UsersAliasesListEvent where
parseJSON = parseJSONText "UsersAliasesListEvent"
instance ToJSON UsersAliasesListEvent where
toJSON = toJSONText
data UsersAliasesWatchEvent
= UAWEAdd
| UAWEDelete'
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UsersAliasesWatchEvent
instance FromHttpApiData UsersAliasesWatchEvent where
parseQueryParam = \case
"add" -> Right UAWEAdd
"delete" -> Right UAWEDelete'
x -> Left ("Unable to parse UsersAliasesWatchEvent from: " <> x)
instance ToHttpApiData UsersAliasesWatchEvent where
toQueryParam = \case
UAWEAdd -> "add"
UAWEDelete' -> "delete"
instance FromJSON UsersAliasesWatchEvent where
parseJSON = parseJSONText "UsersAliasesWatchEvent"
instance ToJSON UsersAliasesWatchEvent where
toJSON = toJSONText
data UsersWatchEvent
= UWEAdd
| UWEDelete'
| UWEMakeAdmin
| UWEUndelete
| UWEUpdate
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UsersWatchEvent
instance FromHttpApiData UsersWatchEvent where
parseQueryParam = \case
"add" -> Right UWEAdd
"delete" -> Right UWEDelete'
"makeAdmin" -> Right UWEMakeAdmin
"undelete" -> Right UWEUndelete
"update" -> Right UWEUpdate
x -> Left ("Unable to parse UsersWatchEvent from: " <> x)
instance ToHttpApiData UsersWatchEvent where
toQueryParam = \case
UWEAdd -> "add"
UWEDelete' -> "delete"
UWEMakeAdmin -> "makeAdmin"
UWEUndelete -> "undelete"
UWEUpdate -> "update"
instance FromJSON UsersWatchEvent where
parseJSON = parseJSONText "UsersWatchEvent"
instance ToJSON UsersWatchEvent where
toJSON = toJSONText
data ChromeosDevicesPatchProjection
= Basic
| Full
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ChromeosDevicesPatchProjection
instance FromHttpApiData ChromeosDevicesPatchProjection where
parseQueryParam = \case
"BASIC" -> Right Basic
"FULL" -> Right Full
x -> Left ("Unable to parse ChromeosDevicesPatchProjection from: " <> x)
instance ToHttpApiData ChromeosDevicesPatchProjection where
toQueryParam = \case
Basic -> "BASIC"
Full -> "FULL"
instance FromJSON ChromeosDevicesPatchProjection where
parseJSON = parseJSONText "ChromeosDevicesPatchProjection"
instance ToJSON ChromeosDevicesPatchProjection where
toJSON = toJSONText
data ChromeosDevicesGetProjection
= CDGPBasic
| CDGPFull
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ChromeosDevicesGetProjection
instance FromHttpApiData ChromeosDevicesGetProjection where
parseQueryParam = \case
"BASIC" -> Right CDGPBasic
"FULL" -> Right CDGPFull
x -> Left ("Unable to parse ChromeosDevicesGetProjection from: " <> x)
instance ToHttpApiData ChromeosDevicesGetProjection where
toQueryParam = \case
CDGPBasic -> "BASIC"
CDGPFull -> "FULL"
instance FromJSON ChromeosDevicesGetProjection where
parseJSON = parseJSONText "ChromeosDevicesGetProjection"
instance ToJSON ChromeosDevicesGetProjection where
toJSON = toJSONText
data UsersListViewType
= AdminView
| DomainPublic
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UsersListViewType
instance FromHttpApiData UsersListViewType where
parseQueryParam = \case
"admin_view" -> Right AdminView
"domain_public" -> Right DomainPublic
x -> Left ("Unable to parse UsersListViewType from: " <> x)
instance ToHttpApiData UsersListViewType where
toQueryParam = \case
AdminView -> "admin_view"
DomainPublic -> "domain_public"
instance FromJSON UsersListViewType where
parseJSON = parseJSONText "UsersListViewType"
instance ToJSON UsersListViewType where
toJSON = toJSONText
data OrgUnitsListType
= All
| Children
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable OrgUnitsListType
instance FromHttpApiData OrgUnitsListType where
parseQueryParam = \case
"all" -> Right All
"children" -> Right Children
x -> Left ("Unable to parse OrgUnitsListType from: " <> x)
instance ToHttpApiData OrgUnitsListType where
toQueryParam = \case
All -> "all"
Children -> "children"
instance FromJSON OrgUnitsListType where
parseJSON = parseJSONText "OrgUnitsListType"
instance ToJSON OrgUnitsListType where
toJSON = toJSONText
data MobileDevicesListSortOrder
= Ascending
| Descending
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable MobileDevicesListSortOrder
instance FromHttpApiData MobileDevicesListSortOrder where
parseQueryParam = \case
"ASCENDING" -> Right Ascending
"DESCENDING" -> Right Descending
x -> Left ("Unable to parse MobileDevicesListSortOrder from: " <> x)
instance ToHttpApiData MobileDevicesListSortOrder where
toQueryParam = \case
Ascending -> "ASCENDING"
Descending -> "DESCENDING"
instance FromJSON MobileDevicesListSortOrder where
parseJSON = parseJSONText "MobileDevicesListSortOrder"
instance ToJSON MobileDevicesListSortOrder where
toJSON = toJSONText
data UsersListOrderBy
= Email
| FamilyName
| GivenName
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UsersListOrderBy
instance FromHttpApiData UsersListOrderBy where
parseQueryParam = \case
"email" -> Right Email
"familyName" -> Right FamilyName
"givenName" -> Right GivenName
x -> Left ("Unable to parse UsersListOrderBy from: " <> x)
instance ToHttpApiData UsersListOrderBy where
toQueryParam = \case
Email -> "email"
FamilyName -> "familyName"
GivenName -> "givenName"
instance FromJSON UsersListOrderBy where
parseJSON = parseJSONText "UsersListOrderBy"
instance ToJSON UsersListOrderBy where
toJSON = toJSONText
data UsersWatchViewType
= UWVTAdminView
| UWVTDomainPublic
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UsersWatchViewType
instance FromHttpApiData UsersWatchViewType where
parseQueryParam = \case
"admin_view" -> Right UWVTAdminView
"domain_public" -> Right UWVTDomainPublic
x -> Left ("Unable to parse UsersWatchViewType from: " <> x)
instance ToHttpApiData UsersWatchViewType where
toQueryParam = \case
UWVTAdminView -> "admin_view"
UWVTDomainPublic -> "domain_public"
instance FromJSON UsersWatchViewType where
parseJSON = parseJSONText "UsersWatchViewType"
instance ToJSON UsersWatchViewType where
toJSON = toJSONText
data UsersGetProjection
= UGPBasic
| UGPCustom
| UGPFull
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UsersGetProjection
instance FromHttpApiData UsersGetProjection where
parseQueryParam = \case
"basic" -> Right UGPBasic
"custom" -> Right UGPCustom
"full" -> Right UGPFull
x -> Left ("Unable to parse UsersGetProjection from: " <> x)
instance ToHttpApiData UsersGetProjection where
toQueryParam = \case
UGPBasic -> "basic"
UGPCustom -> "custom"
UGPFull -> "full"
instance FromJSON UsersGetProjection where
parseJSON = parseJSONText "UsersGetProjection"
instance ToJSON UsersGetProjection where
toJSON = toJSONText
data MobileDevicesListProjection
= MDLPBasic
| MDLPFull
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable MobileDevicesListProjection
instance FromHttpApiData MobileDevicesListProjection where
parseQueryParam = \case
"BASIC" -> Right MDLPBasic
"FULL" -> Right MDLPFull
x -> Left ("Unable to parse MobileDevicesListProjection from: " <> x)
instance ToHttpApiData MobileDevicesListProjection where
toQueryParam = \case
MDLPBasic -> "BASIC"
MDLPFull -> "FULL"
instance FromJSON MobileDevicesListProjection where
parseJSON = parseJSONText "MobileDevicesListProjection"
instance ToJSON MobileDevicesListProjection where
toJSON = toJSONText
data MobileDevicesListOrderBy
= MDLOBDeviceId
| MDLOBEmail
| MDLOBLastSync
| MDLOBModel
| MDLOBName
| MDLOBOS
| MDLOBStatus
| MDLOBType
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable MobileDevicesListOrderBy
instance FromHttpApiData MobileDevicesListOrderBy where
parseQueryParam = \case
"deviceId" -> Right MDLOBDeviceId
"email" -> Right MDLOBEmail
"lastSync" -> Right MDLOBLastSync
"model" -> Right MDLOBModel
"name" -> Right MDLOBName
"os" -> Right MDLOBOS
"status" -> Right MDLOBStatus
"type" -> Right MDLOBType
x -> Left ("Unable to parse MobileDevicesListOrderBy from: " <> x)
instance ToHttpApiData MobileDevicesListOrderBy where
toQueryParam = \case
MDLOBDeviceId -> "deviceId"
MDLOBEmail -> "email"
MDLOBLastSync -> "lastSync"
MDLOBModel -> "model"
MDLOBName -> "name"
MDLOBOS -> "os"
MDLOBStatus -> "status"
MDLOBType -> "type"
instance FromJSON MobileDevicesListOrderBy where
parseJSON = parseJSONText "MobileDevicesListOrderBy"
instance ToJSON MobileDevicesListOrderBy where
toJSON = toJSONText
data UsersListSortOrder
= ULSOAscending
| ULSODescending
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UsersListSortOrder
instance FromHttpApiData UsersListSortOrder where
parseQueryParam = \case
"ASCENDING" -> Right ULSOAscending
"DESCENDING" -> Right ULSODescending
x -> Left ("Unable to parse UsersListSortOrder from: " <> x)
instance ToHttpApiData UsersListSortOrder where
toQueryParam = \case
ULSOAscending -> "ASCENDING"
ULSODescending -> "DESCENDING"
instance FromJSON UsersListSortOrder where
parseJSON = parseJSONText "UsersListSortOrder"
instance ToJSON UsersListSortOrder where
toJSON = toJSONText
data ChromeosDevicesListSortOrder
= CDLSOAscending
| CDLSODescending
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ChromeosDevicesListSortOrder
instance FromHttpApiData ChromeosDevicesListSortOrder where
parseQueryParam = \case
"ASCENDING" -> Right CDLSOAscending
"DESCENDING" -> Right CDLSODescending
x -> Left ("Unable to parse ChromeosDevicesListSortOrder from: " <> x)
instance ToHttpApiData ChromeosDevicesListSortOrder where
toQueryParam = \case
CDLSOAscending -> "ASCENDING"
CDLSODescending -> "DESCENDING"
instance FromJSON ChromeosDevicesListSortOrder where
parseJSON = parseJSONText "ChromeosDevicesListSortOrder"
instance ToJSON ChromeosDevicesListSortOrder where
toJSON = toJSONText
data UsersWatchSortOrder
= UWSOAscending
| UWSODescending
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UsersWatchSortOrder
instance FromHttpApiData UsersWatchSortOrder where
parseQueryParam = \case
"ASCENDING" -> Right UWSOAscending
"DESCENDING" -> Right UWSODescending
x -> Left ("Unable to parse UsersWatchSortOrder from: " <> x)
instance ToHttpApiData UsersWatchSortOrder where
toQueryParam = \case
UWSOAscending -> "ASCENDING"
UWSODescending -> "DESCENDING"
instance FromJSON UsersWatchSortOrder where
parseJSON = parseJSONText "UsersWatchSortOrder"
instance ToJSON UsersWatchSortOrder where
toJSON = toJSONText
data UsersListProjection
= ULPBasic
| ULPCustom
| ULPFull
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UsersListProjection
instance FromHttpApiData UsersListProjection where
parseQueryParam = \case
"basic" -> Right ULPBasic
"custom" -> Right ULPCustom
"full" -> Right ULPFull
x -> Left ("Unable to parse UsersListProjection from: " <> x)
instance ToHttpApiData UsersListProjection where
toQueryParam = \case
ULPBasic -> "basic"
ULPCustom -> "custom"
ULPFull -> "full"
instance FromJSON UsersListProjection where
parseJSON = parseJSONText "UsersListProjection"
instance ToJSON UsersListProjection where
toJSON = toJSONText
data ChromeosDevicesUpdateProjection
= CDUPBasic
| CDUPFull
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ChromeosDevicesUpdateProjection
instance FromHttpApiData ChromeosDevicesUpdateProjection where
parseQueryParam = \case
"BASIC" -> Right CDUPBasic
"FULL" -> Right CDUPFull
x -> Left ("Unable to parse ChromeosDevicesUpdateProjection from: " <> x)
instance ToHttpApiData ChromeosDevicesUpdateProjection where
toQueryParam = \case
CDUPBasic -> "BASIC"
CDUPFull -> "FULL"
instance FromJSON ChromeosDevicesUpdateProjection where
parseJSON = parseJSONText "ChromeosDevicesUpdateProjection"
instance ToJSON ChromeosDevicesUpdateProjection where
toJSON = toJSONText
data MobileDevicesGetProjection
= MDGPBasic
| MDGPFull
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable MobileDevicesGetProjection
instance FromHttpApiData MobileDevicesGetProjection where
parseQueryParam = \case
"BASIC" -> Right MDGPBasic
"FULL" -> Right MDGPFull
x -> Left ("Unable to parse MobileDevicesGetProjection from: " <> x)
instance ToHttpApiData MobileDevicesGetProjection where
toQueryParam = \case
MDGPBasic -> "BASIC"
MDGPFull -> "FULL"
instance FromJSON MobileDevicesGetProjection where
parseJSON = parseJSONText "MobileDevicesGetProjection"
instance ToJSON MobileDevicesGetProjection where
toJSON = toJSONText
data ChromeosDevicesListOrderBy
= AnnotatedLocation
| AnnotatedUser
| LastSync
| Notes
| SerialNumber
| Status
| SupportEndDate
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ChromeosDevicesListOrderBy
instance FromHttpApiData ChromeosDevicesListOrderBy where
parseQueryParam = \case
"annotatedLocation" -> Right AnnotatedLocation
"annotatedUser" -> Right AnnotatedUser
"lastSync" -> Right LastSync
"notes" -> Right Notes
"serialNumber" -> Right SerialNumber
"status" -> Right Status
"supportEndDate" -> Right SupportEndDate
x -> Left ("Unable to parse ChromeosDevicesListOrderBy from: " <> x)
instance ToHttpApiData ChromeosDevicesListOrderBy where
toQueryParam = \case
AnnotatedLocation -> "annotatedLocation"
AnnotatedUser -> "annotatedUser"
LastSync -> "lastSync"
Notes -> "notes"
SerialNumber -> "serialNumber"
Status -> "status"
SupportEndDate -> "supportEndDate"
instance FromJSON ChromeosDevicesListOrderBy where
parseJSON = parseJSONText "ChromeosDevicesListOrderBy"
instance ToJSON ChromeosDevicesListOrderBy where
toJSON = toJSONText
data UsersWatchProjection
= UWPBasic
| UWPCustom
| UWPFull
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UsersWatchProjection
instance FromHttpApiData UsersWatchProjection where
parseQueryParam = \case
"basic" -> Right UWPBasic
"custom" -> Right UWPCustom
"full" -> Right UWPFull
x -> Left ("Unable to parse UsersWatchProjection from: " <> x)
instance ToHttpApiData UsersWatchProjection where
toQueryParam = \case
UWPBasic -> "basic"
UWPCustom -> "custom"
UWPFull -> "full"
instance FromJSON UsersWatchProjection where
parseJSON = parseJSONText "UsersWatchProjection"
instance ToJSON UsersWatchProjection where
toJSON = toJSONText
data UsersWatchOrderBy
= UWOBEmail
| UWOBFamilyName
| UWOBGivenName
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UsersWatchOrderBy
instance FromHttpApiData UsersWatchOrderBy where
parseQueryParam = \case
"email" -> Right UWOBEmail
"familyName" -> Right UWOBFamilyName
"givenName" -> Right UWOBGivenName
x -> Left ("Unable to parse UsersWatchOrderBy from: " <> x)
instance ToHttpApiData UsersWatchOrderBy where
toQueryParam = \case
UWOBEmail -> "email"
UWOBFamilyName -> "familyName"
UWOBGivenName -> "givenName"
instance FromJSON UsersWatchOrderBy where
parseJSON = parseJSONText "UsersWatchOrderBy"
instance ToJSON UsersWatchOrderBy where
toJSON = toJSONText
data ChromeosDevicesListProjection
= CDLPBasic
| CDLPFull
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ChromeosDevicesListProjection
instance FromHttpApiData ChromeosDevicesListProjection where
parseQueryParam = \case
"BASIC" -> Right CDLPBasic
"FULL" -> Right CDLPFull
x -> Left ("Unable to parse ChromeosDevicesListProjection from: " <> x)
instance ToHttpApiData ChromeosDevicesListProjection where
toQueryParam = \case
CDLPBasic -> "BASIC"
CDLPFull -> "FULL"
instance FromJSON ChromeosDevicesListProjection where
parseJSON = parseJSONText "ChromeosDevicesListProjection"
instance ToJSON ChromeosDevicesListProjection where
toJSON = toJSONText
data UsersGetViewType
= UGVTAdminView
| UGVTDomainPublic
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable UsersGetViewType
instance FromHttpApiData UsersGetViewType where
parseQueryParam = \case
"admin_view" -> Right UGVTAdminView
"domain_public" -> Right UGVTDomainPublic
x -> Left ("Unable to parse UsersGetViewType from: " <> x)
instance ToHttpApiData UsersGetViewType where
toQueryParam = \case
UGVTAdminView -> "admin_view"
UGVTDomainPublic -> "domain_public"
instance FromJSON UsersGetViewType where
parseJSON = parseJSONText "UsersGetViewType"
instance ToJSON UsersGetViewType where
toJSON = toJSONText