{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.RemoteBuildExecution.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data BuildBazelRemoteExecutionV2ExecuteOperationMetadataStage
= Unknown
| CacheCheck
| Queued
| Executing
| Completed
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable BuildBazelRemoteExecutionV2ExecuteOperationMetadataStage
instance FromHttpApiData BuildBazelRemoteExecutionV2ExecuteOperationMetadataStage where
parseQueryParam = \case
"UNKNOWN" -> Right Unknown
"CACHE_CHECK" -> Right CacheCheck
"QUEUED" -> Right Queued
"EXECUTING" -> Right Executing
"COMPLETED" -> Right Completed
x -> Left ("Unable to parse BuildBazelRemoteExecutionV2ExecuteOperationMetadataStage from: " <> x)
instance ToHttpApiData BuildBazelRemoteExecutionV2ExecuteOperationMetadataStage where
toQueryParam = \case
Unknown -> "UNKNOWN"
CacheCheck -> "CACHE_CHECK"
Queued -> "QUEUED"
Executing -> "EXECUTING"
Completed -> "COMPLETED"
instance FromJSON BuildBazelRemoteExecutionV2ExecuteOperationMetadataStage where
parseJSON = parseJSONText "BuildBazelRemoteExecutionV2ExecuteOperationMetadataStage"
instance ToJSON BuildBazelRemoteExecutionV2ExecuteOperationMetadataStage where
toJSON = toJSONText
data GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstanceState
= StateUnspecified
| Creating
| Running
| Inactive
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstanceState
instance FromHttpApiData GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstanceState where
parseQueryParam = \case
"STATE_UNSPECIFIED" -> Right StateUnspecified
"CREATING" -> Right Creating
"RUNNING" -> Right Running
"INACTIVE" -> Right Inactive
x -> Left ("Unable to parse GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstanceState from: " <> x)
instance ToHttpApiData GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstanceState where
toQueryParam = \case
StateUnspecified -> "STATE_UNSPECIFIED"
Creating -> "CREATING"
Running -> "RUNNING"
Inactive -> "INACTIVE"
instance FromJSON GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstanceState where
parseJSON = parseJSONText "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstanceState"
instance ToJSON GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstanceState where
toJSON = toJSONText
data GoogleDevtoolsRemoteexecutionV1testExecuteOperationMetadataStage
= GDRVEOMSUnknown
| GDRVEOMSCacheCheck
| GDRVEOMSQueued
| GDRVEOMSExecuting
| GDRVEOMSCompleted
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleDevtoolsRemoteexecutionV1testExecuteOperationMetadataStage
instance FromHttpApiData GoogleDevtoolsRemoteexecutionV1testExecuteOperationMetadataStage where
parseQueryParam = \case
"UNKNOWN" -> Right GDRVEOMSUnknown
"CACHE_CHECK" -> Right GDRVEOMSCacheCheck
"QUEUED" -> Right GDRVEOMSQueued
"EXECUTING" -> Right GDRVEOMSExecuting
"COMPLETED" -> Right GDRVEOMSCompleted
x -> Left ("Unable to parse GoogleDevtoolsRemoteexecutionV1testExecuteOperationMetadataStage from: " <> x)
instance ToHttpApiData GoogleDevtoolsRemoteexecutionV1testExecuteOperationMetadataStage where
toQueryParam = \case
GDRVEOMSUnknown -> "UNKNOWN"
GDRVEOMSCacheCheck -> "CACHE_CHECK"
GDRVEOMSQueued -> "QUEUED"
GDRVEOMSExecuting -> "EXECUTING"
GDRVEOMSCompleted -> "COMPLETED"
instance FromJSON GoogleDevtoolsRemoteexecutionV1testExecuteOperationMetadataStage where
parseJSON = parseJSONText "GoogleDevtoolsRemoteexecutionV1testExecuteOperationMetadataStage"
instance ToJSON GoogleDevtoolsRemoteexecutionV1testExecuteOperationMetadataStage where
toJSON = toJSONText
data GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPoolState
= GDRAVWPSStateUnspecified
| GDRAVWPSCreating
| GDRAVWPSRunning
| GDRAVWPSUpdating
| GDRAVWPSDeleting
| GDRAVWPSInactive
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPoolState
instance FromHttpApiData GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPoolState where
parseQueryParam = \case
"STATE_UNSPECIFIED" -> Right GDRAVWPSStateUnspecified
"CREATING" -> Right GDRAVWPSCreating
"RUNNING" -> Right GDRAVWPSRunning
"UPDATING" -> Right GDRAVWPSUpdating
"DELETING" -> Right GDRAVWPSDeleting
"INACTIVE" -> Right GDRAVWPSInactive
x -> Left ("Unable to parse GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPoolState from: " <> x)
instance ToHttpApiData GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPoolState where
toQueryParam = \case
GDRAVWPSStateUnspecified -> "STATE_UNSPECIFIED"
GDRAVWPSCreating -> "CREATING"
GDRAVWPSRunning -> "RUNNING"
GDRAVWPSUpdating -> "UPDATING"
GDRAVWPSDeleting -> "DELETING"
GDRAVWPSInactive -> "INACTIVE"
instance FromJSON GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPoolState where
parseJSON = parseJSONText "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPoolState"
instance ToJSON GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPoolState 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 BuildBazelRemoteExecutionV2ExecutionCapabilitiesDigestFunction
= BBREVECDFUnknown
| BBREVECDFSHA256
| BBREVECDFSHA1
| BBREVECDFMD5
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable BuildBazelRemoteExecutionV2ExecutionCapabilitiesDigestFunction
instance FromHttpApiData BuildBazelRemoteExecutionV2ExecutionCapabilitiesDigestFunction where
parseQueryParam = \case
"UNKNOWN" -> Right BBREVECDFUnknown
"SHA256" -> Right BBREVECDFSHA256
"SHA1" -> Right BBREVECDFSHA1
"MD5" -> Right BBREVECDFMD5
x -> Left ("Unable to parse BuildBazelRemoteExecutionV2ExecutionCapabilitiesDigestFunction from: " <> x)
instance ToHttpApiData BuildBazelRemoteExecutionV2ExecutionCapabilitiesDigestFunction where
toQueryParam = \case
BBREVECDFUnknown -> "UNKNOWN"
BBREVECDFSHA256 -> "SHA256"
BBREVECDFSHA1 -> "SHA1"
BBREVECDFMD5 -> "MD5"
instance FromJSON BuildBazelRemoteExecutionV2ExecutionCapabilitiesDigestFunction where
parseJSON = parseJSONText "BuildBazelRemoteExecutionV2ExecutionCapabilitiesDigestFunction"
instance ToJSON BuildBazelRemoteExecutionV2ExecutionCapabilitiesDigestFunction where
toJSON = toJSONText
data BuildBazelRemoteExecutionV2CacheCapabilitiesSymlinkAbsolutePathStrategy
= BBREVCCSAPSUnknown
| BBREVCCSAPSDisallowed
| BBREVCCSAPSAllowed
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable BuildBazelRemoteExecutionV2CacheCapabilitiesSymlinkAbsolutePathStrategy
instance FromHttpApiData BuildBazelRemoteExecutionV2CacheCapabilitiesSymlinkAbsolutePathStrategy where
parseQueryParam = \case
"UNKNOWN" -> Right BBREVCCSAPSUnknown
"DISALLOWED" -> Right BBREVCCSAPSDisallowed
"ALLOWED" -> Right BBREVCCSAPSAllowed
x -> Left ("Unable to parse BuildBazelRemoteExecutionV2CacheCapabilitiesSymlinkAbsolutePathStrategy from: " <> x)
instance ToHttpApiData BuildBazelRemoteExecutionV2CacheCapabilitiesSymlinkAbsolutePathStrategy where
toQueryParam = \case
BBREVCCSAPSUnknown -> "UNKNOWN"
BBREVCCSAPSDisallowed -> "DISALLOWED"
BBREVCCSAPSAllowed -> "ALLOWED"
instance FromJSON BuildBazelRemoteExecutionV2CacheCapabilitiesSymlinkAbsolutePathStrategy where
parseJSON = parseJSONText "BuildBazelRemoteExecutionV2CacheCapabilitiesSymlinkAbsolutePathStrategy"
instance ToJSON BuildBazelRemoteExecutionV2CacheCapabilitiesSymlinkAbsolutePathStrategy where
toJSON = toJSONText
data GoogleDevtoolsRemoteworkersV1test2AdminTempCommand
= Unspecified
| BotUpdate
| BotRestart
| BotTerminate
| HostRestart
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleDevtoolsRemoteworkersV1test2AdminTempCommand
instance FromHttpApiData GoogleDevtoolsRemoteworkersV1test2AdminTempCommand where
parseQueryParam = \case
"UNSPECIFIED" -> Right Unspecified
"BOT_UPDATE" -> Right BotUpdate
"BOT_RESTART" -> Right BotRestart
"BOT_TERMINATE" -> Right BotTerminate
"HOST_RESTART" -> Right HostRestart
x -> Left ("Unable to parse GoogleDevtoolsRemoteworkersV1test2AdminTempCommand from: " <> x)
instance ToHttpApiData GoogleDevtoolsRemoteworkersV1test2AdminTempCommand where
toQueryParam = \case
Unspecified -> "UNSPECIFIED"
BotUpdate -> "BOT_UPDATE"
BotRestart -> "BOT_RESTART"
BotTerminate -> "BOT_TERMINATE"
HostRestart -> "HOST_RESTART"
instance FromJSON GoogleDevtoolsRemoteworkersV1test2AdminTempCommand where
parseJSON = parseJSONText "GoogleDevtoolsRemoteworkersV1test2AdminTempCommand"
instance ToJSON GoogleDevtoolsRemoteworkersV1test2AdminTempCommand where
toJSON = toJSONText