{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Dataflow.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data NameAndKindKind
= Invalid
| Sum
| Max
| Min
| Mean
| OR
| And
| Set
| Distribution
| LatestValue
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable NameAndKindKind
instance FromHttpApiData NameAndKindKind where
parseQueryParam = \case
"INVALID" -> Right Invalid
"SUM" -> Right Sum
"MAX" -> Right Max
"MIN" -> Right Min
"MEAN" -> Right Mean
"OR" -> Right OR
"AND" -> Right And
"SET" -> Right Set
"DISTRIBUTION" -> Right Distribution
"LATEST_VALUE" -> Right LatestValue
x -> Left ("Unable to parse NameAndKindKind from: " <> x)
instance ToHttpApiData NameAndKindKind where
toQueryParam = \case
Invalid -> "INVALID"
Sum -> "SUM"
Max -> "MAX"
Min -> "MIN"
Mean -> "MEAN"
OR -> "OR"
And -> "AND"
Set -> "SET"
Distribution -> "DISTRIBUTION"
LatestValue -> "LATEST_VALUE"
instance FromJSON NameAndKindKind where
parseJSON = parseJSONText "NameAndKindKind"
instance ToJSON NameAndKindKind where
toJSON = toJSONText
data JobType
= JobTypeUnknown
| JobTypeBatch
| JobTypeStreaming
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable JobType
instance FromHttpApiData JobType where
parseQueryParam = \case
"JOB_TYPE_UNKNOWN" -> Right JobTypeUnknown
"JOB_TYPE_BATCH" -> Right JobTypeBatch
"JOB_TYPE_STREAMING" -> Right JobTypeStreaming
x -> Left ("Unable to parse JobType from: " <> x)
instance ToHttpApiData JobType where
toQueryParam = \case
JobTypeUnknown -> "JOB_TYPE_UNKNOWN"
JobTypeBatch -> "JOB_TYPE_BATCH"
JobTypeStreaming -> "JOB_TYPE_STREAMING"
instance FromJSON JobType where
parseJSON = parseJSONText "JobType"
instance ToJSON JobType where
toJSON = toJSONText
data WorkerPoolTeardownPolicy
= TeardownPolicyUnknown
| TeardownAlways
| TeardownOnSuccess
| TeardownNever
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable WorkerPoolTeardownPolicy
instance FromHttpApiData WorkerPoolTeardownPolicy where
parseQueryParam = \case
"TEARDOWN_POLICY_UNKNOWN" -> Right TeardownPolicyUnknown
"TEARDOWN_ALWAYS" -> Right TeardownAlways
"TEARDOWN_ON_SUCCESS" -> Right TeardownOnSuccess
"TEARDOWN_NEVER" -> Right TeardownNever
x -> Left ("Unable to parse WorkerPoolTeardownPolicy from: " <> x)
instance ToHttpApiData WorkerPoolTeardownPolicy where
toQueryParam = \case
TeardownPolicyUnknown -> "TEARDOWN_POLICY_UNKNOWN"
TeardownAlways -> "TEARDOWN_ALWAYS"
TeardownOnSuccess -> "TEARDOWN_ON_SUCCESS"
TeardownNever -> "TEARDOWN_NEVER"
instance FromJSON WorkerPoolTeardownPolicy where
parseJSON = parseJSONText "WorkerPoolTeardownPolicy"
instance ToJSON WorkerPoolTeardownPolicy where
toJSON = toJSONText
data AutoscalingSettingsAlgorithm
= AutoscalingAlgorithmUnknown
| AutoscalingAlgorithmNone
| AutoscalingAlgorithmBasic
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable AutoscalingSettingsAlgorithm
instance FromHttpApiData AutoscalingSettingsAlgorithm where
parseQueryParam = \case
"AUTOSCALING_ALGORITHM_UNKNOWN" -> Right AutoscalingAlgorithmUnknown
"AUTOSCALING_ALGORITHM_NONE" -> Right AutoscalingAlgorithmNone
"AUTOSCALING_ALGORITHM_BASIC" -> Right AutoscalingAlgorithmBasic
x -> Left ("Unable to parse AutoscalingSettingsAlgorithm from: " <> x)
instance ToHttpApiData AutoscalingSettingsAlgorithm where
toQueryParam = \case
AutoscalingAlgorithmUnknown -> "AUTOSCALING_ALGORITHM_UNKNOWN"
AutoscalingAlgorithmNone -> "AUTOSCALING_ALGORITHM_NONE"
AutoscalingAlgorithmBasic -> "AUTOSCALING_ALGORITHM_BASIC"
instance FromJSON AutoscalingSettingsAlgorithm where
parseJSON = parseJSONText "AutoscalingSettingsAlgorithm"
instance ToJSON AutoscalingSettingsAlgorithm where
toJSON = toJSONText
data TransformSummaryKind
= UnknownKind
| ParDoKind
| GroupByKeyKind
| FlattenKind
| ReadKind
| WriteKind
| ConstantKind
| SingletonKind
| ShuffleKind
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable TransformSummaryKind
instance FromHttpApiData TransformSummaryKind where
parseQueryParam = \case
"UNKNOWN_KIND" -> Right UnknownKind
"PAR_DO_KIND" -> Right ParDoKind
"GROUP_BY_KEY_KIND" -> Right GroupByKeyKind
"FLATTEN_KIND" -> Right FlattenKind
"READ_KIND" -> Right ReadKind
"WRITE_KIND" -> Right WriteKind
"CONSTANT_KIND" -> Right ConstantKind
"SINGLETON_KIND" -> Right SingletonKind
"SHUFFLE_KIND" -> Right ShuffleKind
x -> Left ("Unable to parse TransformSummaryKind from: " <> x)
instance ToHttpApiData TransformSummaryKind where
toQueryParam = \case
UnknownKind -> "UNKNOWN_KIND"
ParDoKind -> "PAR_DO_KIND"
GroupByKeyKind -> "GROUP_BY_KEY_KIND"
FlattenKind -> "FLATTEN_KIND"
ReadKind -> "READ_KIND"
WriteKind -> "WRITE_KIND"
ConstantKind -> "CONSTANT_KIND"
SingletonKind -> "SINGLETON_KIND"
ShuffleKind -> "SHUFFLE_KIND"
instance FromJSON TransformSummaryKind where
parseJSON = parseJSONText "TransformSummaryKind"
instance ToJSON TransformSummaryKind where
toJSON = toJSONText
data CounterStructuredNamePortion
= All
| Key
| Value
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CounterStructuredNamePortion
instance FromHttpApiData CounterStructuredNamePortion where
parseQueryParam = \case
"ALL" -> Right All
"KEY" -> Right Key
"VALUE" -> Right Value
x -> Left ("Unable to parse CounterStructuredNamePortion from: " <> x)
instance ToHttpApiData CounterStructuredNamePortion where
toQueryParam = \case
All -> "ALL"
Key -> "KEY"
Value -> "VALUE"
instance FromJSON CounterStructuredNamePortion where
parseJSON = parseJSONText "CounterStructuredNamePortion"
instance ToJSON CounterStructuredNamePortion where
toJSON = toJSONText
data JobMessageMessageImportance
= JobMessageImportanceUnknown
| JobMessageDebug
| JobMessageDetailed
| JobMessageBasic
| JobMessageWarning
| JobMessageError
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable JobMessageMessageImportance
instance FromHttpApiData JobMessageMessageImportance where
parseQueryParam = \case
"JOB_MESSAGE_IMPORTANCE_UNKNOWN" -> Right JobMessageImportanceUnknown
"JOB_MESSAGE_DEBUG" -> Right JobMessageDebug
"JOB_MESSAGE_DETAILED" -> Right JobMessageDetailed
"JOB_MESSAGE_BASIC" -> Right JobMessageBasic
"JOB_MESSAGE_WARNING" -> Right JobMessageWarning
"JOB_MESSAGE_ERROR" -> Right JobMessageError
x -> Left ("Unable to parse JobMessageMessageImportance from: " <> x)
instance ToHttpApiData JobMessageMessageImportance where
toQueryParam = \case
JobMessageImportanceUnknown -> "JOB_MESSAGE_IMPORTANCE_UNKNOWN"
JobMessageDebug -> "JOB_MESSAGE_DEBUG"
JobMessageDetailed -> "JOB_MESSAGE_DETAILED"
JobMessageBasic -> "JOB_MESSAGE_BASIC"
JobMessageWarning -> "JOB_MESSAGE_WARNING"
JobMessageError -> "JOB_MESSAGE_ERROR"
instance FromJSON JobMessageMessageImportance where
parseJSON = parseJSONText "JobMessageMessageImportance"
instance ToJSON JobMessageMessageImportance where
toJSON = toJSONText
data SourceSplitResponseOutcome
= SourceSplitOutcomeUnknown
| SourceSplitOutcomeUseCurrent
| SourceSplitOutcomeSplittingHAppened
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable SourceSplitResponseOutcome
instance FromHttpApiData SourceSplitResponseOutcome where
parseQueryParam = \case
"SOURCE_SPLIT_OUTCOME_UNKNOWN" -> Right SourceSplitOutcomeUnknown
"SOURCE_SPLIT_OUTCOME_USE_CURRENT" -> Right SourceSplitOutcomeUseCurrent
"SOURCE_SPLIT_OUTCOME_SPLITTING_HAPPENED" -> Right SourceSplitOutcomeSplittingHAppened
x -> Left ("Unable to parse SourceSplitResponseOutcome from: " <> x)
instance ToHttpApiData SourceSplitResponseOutcome where
toQueryParam = \case
SourceSplitOutcomeUnknown -> "SOURCE_SPLIT_OUTCOME_UNKNOWN"
SourceSplitOutcomeUseCurrent -> "SOURCE_SPLIT_OUTCOME_USE_CURRENT"
SourceSplitOutcomeSplittingHAppened -> "SOURCE_SPLIT_OUTCOME_SPLITTING_HAPPENED"
instance FromJSON SourceSplitResponseOutcome where
parseJSON = parseJSONText "SourceSplitResponseOutcome"
instance ToJSON SourceSplitResponseOutcome where
toJSON = toJSONText
data SourceSplitShardDerivationMode
= SourceDerivationModeUnknown
| SourceDerivationModeIndependent
| SourceDerivationModeChildOfCurrent
| SourceDerivationModeSiblingOfCurrent
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable SourceSplitShardDerivationMode
instance FromHttpApiData SourceSplitShardDerivationMode where
parseQueryParam = \case
"SOURCE_DERIVATION_MODE_UNKNOWN" -> Right SourceDerivationModeUnknown
"SOURCE_DERIVATION_MODE_INDEPENDENT" -> Right SourceDerivationModeIndependent
"SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" -> Right SourceDerivationModeChildOfCurrent
"SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" -> Right SourceDerivationModeSiblingOfCurrent
x -> Left ("Unable to parse SourceSplitShardDerivationMode from: " <> x)
instance ToHttpApiData SourceSplitShardDerivationMode where
toQueryParam = \case
SourceDerivationModeUnknown -> "SOURCE_DERIVATION_MODE_UNKNOWN"
SourceDerivationModeIndependent -> "SOURCE_DERIVATION_MODE_INDEPENDENT"
SourceDerivationModeChildOfCurrent -> "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT"
SourceDerivationModeSiblingOfCurrent -> "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT"
instance FromJSON SourceSplitShardDerivationMode where
parseJSON = parseJSONText "SourceSplitShardDerivationMode"
instance ToJSON SourceSplitShardDerivationMode where
toJSON = toJSONText
data WorkerPoolDefaultPackageSet
= DefaultPackageSetUnknown
| DefaultPackageSetNone
| DefaultPackageSetJava
| DefaultPackageSetPython
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable WorkerPoolDefaultPackageSet
instance FromHttpApiData WorkerPoolDefaultPackageSet where
parseQueryParam = \case
"DEFAULT_PACKAGE_SET_UNKNOWN" -> Right DefaultPackageSetUnknown
"DEFAULT_PACKAGE_SET_NONE" -> Right DefaultPackageSetNone
"DEFAULT_PACKAGE_SET_JAVA" -> Right DefaultPackageSetJava
"DEFAULT_PACKAGE_SET_PYTHON" -> Right DefaultPackageSetPython
x -> Left ("Unable to parse WorkerPoolDefaultPackageSet from: " <> x)
instance ToHttpApiData WorkerPoolDefaultPackageSet where
toQueryParam = \case
DefaultPackageSetUnknown -> "DEFAULT_PACKAGE_SET_UNKNOWN"
DefaultPackageSetNone -> "DEFAULT_PACKAGE_SET_NONE"
DefaultPackageSetJava -> "DEFAULT_PACKAGE_SET_JAVA"
DefaultPackageSetPython -> "DEFAULT_PACKAGE_SET_PYTHON"
instance FromJSON WorkerPoolDefaultPackageSet where
parseJSON = parseJSONText "WorkerPoolDefaultPackageSet"
instance ToJSON WorkerPoolDefaultPackageSet where
toJSON = toJSONText
data CounterMetadataKind
= CMKInvalid
| CMKSum
| CMKMax
| CMKMin
| CMKMean
| CMKOR
| CMKAnd
| CMKSet
| CMKDistribution
| CMKLatestValue
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CounterMetadataKind
instance FromHttpApiData CounterMetadataKind where
parseQueryParam = \case
"INVALID" -> Right CMKInvalid
"SUM" -> Right CMKSum
"MAX" -> Right CMKMax
"MIN" -> Right CMKMin
"MEAN" -> Right CMKMean
"OR" -> Right CMKOR
"AND" -> Right CMKAnd
"SET" -> Right CMKSet
"DISTRIBUTION" -> Right CMKDistribution
"LATEST_VALUE" -> Right CMKLatestValue
x -> Left ("Unable to parse CounterMetadataKind from: " <> x)
instance ToHttpApiData CounterMetadataKind where
toQueryParam = \case
CMKInvalid -> "INVALID"
CMKSum -> "SUM"
CMKMax -> "MAX"
CMKMin -> "MIN"
CMKMean -> "MEAN"
CMKOR -> "OR"
CMKAnd -> "AND"
CMKSet -> "SET"
CMKDistribution -> "DISTRIBUTION"
CMKLatestValue -> "LATEST_VALUE"
instance FromJSON CounterMetadataKind where
parseJSON = parseJSONText "CounterMetadataKind"
instance ToJSON CounterMetadataKind where
toJSON = toJSONText
data JobCurrentState
= JobStateUnknown
| JobStateStopped
| JobStateRunning
| JobStateDone
| JobStateFailed
| JobStateCancelled
| JobStateUpdated
| JobStateDraining
| JobStateDrained
| JobStatePending
| JobStateCancelling
| JobStateQueued
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable JobCurrentState
instance FromHttpApiData JobCurrentState where
parseQueryParam = \case
"JOB_STATE_UNKNOWN" -> Right JobStateUnknown
"JOB_STATE_STOPPED" -> Right JobStateStopped
"JOB_STATE_RUNNING" -> Right JobStateRunning
"JOB_STATE_DONE" -> Right JobStateDone
"JOB_STATE_FAILED" -> Right JobStateFailed
"JOB_STATE_CANCELLED" -> Right JobStateCancelled
"JOB_STATE_UPDATED" -> Right JobStateUpdated
"JOB_STATE_DRAINING" -> Right JobStateDraining
"JOB_STATE_DRAINED" -> Right JobStateDrained
"JOB_STATE_PENDING" -> Right JobStatePending
"JOB_STATE_CANCELLING" -> Right JobStateCancelling
"JOB_STATE_QUEUED" -> Right JobStateQueued
x -> Left ("Unable to parse JobCurrentState from: " <> x)
instance ToHttpApiData JobCurrentState where
toQueryParam = \case
JobStateUnknown -> "JOB_STATE_UNKNOWN"
JobStateStopped -> "JOB_STATE_STOPPED"
JobStateRunning -> "JOB_STATE_RUNNING"
JobStateDone -> "JOB_STATE_DONE"
JobStateFailed -> "JOB_STATE_FAILED"
JobStateCancelled -> "JOB_STATE_CANCELLED"
JobStateUpdated -> "JOB_STATE_UPDATED"
JobStateDraining -> "JOB_STATE_DRAINING"
JobStateDrained -> "JOB_STATE_DRAINED"
JobStatePending -> "JOB_STATE_PENDING"
JobStateCancelling -> "JOB_STATE_CANCELLING"
JobStateQueued -> "JOB_STATE_QUEUED"
instance FromJSON JobCurrentState where
parseJSON = parseJSONText "JobCurrentState"
instance ToJSON JobCurrentState where
toJSON = toJSONText
data CounterMetadataStandardUnits
= Bytes
| BytesPerSec
| Milliseconds
| Microseconds
| Nanoseconds
| TimestampMsec
| TimestampUsec
| TimestampNsec
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CounterMetadataStandardUnits
instance FromHttpApiData CounterMetadataStandardUnits where
parseQueryParam = \case
"BYTES" -> Right Bytes
"BYTES_PER_SEC" -> Right BytesPerSec
"MILLISECONDS" -> Right Milliseconds
"MICROSECONDS" -> Right Microseconds
"NANOSECONDS" -> Right Nanoseconds
"TIMESTAMP_MSEC" -> Right TimestampMsec
"TIMESTAMP_USEC" -> Right TimestampUsec
"TIMESTAMP_NSEC" -> Right TimestampNsec
x -> Left ("Unable to parse CounterMetadataStandardUnits from: " <> x)
instance ToHttpApiData CounterMetadataStandardUnits where
toQueryParam = \case
Bytes -> "BYTES"
BytesPerSec -> "BYTES_PER_SEC"
Milliseconds -> "MILLISECONDS"
Microseconds -> "MICROSECONDS"
Nanoseconds -> "NANOSECONDS"
TimestampMsec -> "TIMESTAMP_MSEC"
TimestampUsec -> "TIMESTAMP_USEC"
TimestampNsec -> "TIMESTAMP_NSEC"
instance FromJSON CounterMetadataStandardUnits where
parseJSON = parseJSONText "CounterMetadataStandardUnits"
instance ToJSON CounterMetadataStandardUnits where
toJSON = toJSONText
data AutoscalingEventEventType
= TypeUnknown
| TargetNumWorkersChanged
| CurrentNumWorkersChanged
| ActuationFailure
| NoChange
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable AutoscalingEventEventType
instance FromHttpApiData AutoscalingEventEventType where
parseQueryParam = \case
"TYPE_UNKNOWN" -> Right TypeUnknown
"TARGET_NUM_WORKERS_CHANGED" -> Right TargetNumWorkersChanged
"CURRENT_NUM_WORKERS_CHANGED" -> Right CurrentNumWorkersChanged
"ACTUATION_FAILURE" -> Right ActuationFailure
"NO_CHANGE" -> Right NoChange
x -> Left ("Unable to parse AutoscalingEventEventType from: " <> x)
instance ToHttpApiData AutoscalingEventEventType where
toQueryParam = \case
TypeUnknown -> "TYPE_UNKNOWN"
TargetNumWorkersChanged -> "TARGET_NUM_WORKERS_CHANGED"
CurrentNumWorkersChanged -> "CURRENT_NUM_WORKERS_CHANGED"
ActuationFailure -> "ACTUATION_FAILURE"
NoChange -> "NO_CHANGE"
instance FromJSON AutoscalingEventEventType where
parseJSON = parseJSONText "AutoscalingEventEventType"
instance ToJSON AutoscalingEventEventType where
toJSON = toJSONText
data DerivedSourceDerivationMode
= DSDMSourceDerivationModeUnknown
| DSDMSourceDerivationModeIndependent
| DSDMSourceDerivationModeChildOfCurrent
| DSDMSourceDerivationModeSiblingOfCurrent
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DerivedSourceDerivationMode
instance FromHttpApiData DerivedSourceDerivationMode where
parseQueryParam = \case
"SOURCE_DERIVATION_MODE_UNKNOWN" -> Right DSDMSourceDerivationModeUnknown
"SOURCE_DERIVATION_MODE_INDEPENDENT" -> Right DSDMSourceDerivationModeIndependent
"SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" -> Right DSDMSourceDerivationModeChildOfCurrent
"SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" -> Right DSDMSourceDerivationModeSiblingOfCurrent
x -> Left ("Unable to parse DerivedSourceDerivationMode from: " <> x)
instance ToHttpApiData DerivedSourceDerivationMode where
toQueryParam = \case
DSDMSourceDerivationModeUnknown -> "SOURCE_DERIVATION_MODE_UNKNOWN"
DSDMSourceDerivationModeIndependent -> "SOURCE_DERIVATION_MODE_INDEPENDENT"
DSDMSourceDerivationModeChildOfCurrent -> "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT"
DSDMSourceDerivationModeSiblingOfCurrent -> "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT"
instance FromJSON DerivedSourceDerivationMode where
parseJSON = parseJSONText "DerivedSourceDerivationMode"
instance ToJSON DerivedSourceDerivationMode where
toJSON = toJSONText
data ExecutionStageSummaryKind
= ESSKUnknownKind
| ESSKParDoKind
| ESSKGroupByKeyKind
| ESSKFlattenKind
| ESSKReadKind
| ESSKWriteKind
| ESSKConstantKind
| ESSKSingletonKind
| ESSKShuffleKind
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ExecutionStageSummaryKind
instance FromHttpApiData ExecutionStageSummaryKind where
parseQueryParam = \case
"UNKNOWN_KIND" -> Right ESSKUnknownKind
"PAR_DO_KIND" -> Right ESSKParDoKind
"GROUP_BY_KEY_KIND" -> Right ESSKGroupByKeyKind
"FLATTEN_KIND" -> Right ESSKFlattenKind
"READ_KIND" -> Right ESSKReadKind
"WRITE_KIND" -> Right ESSKWriteKind
"CONSTANT_KIND" -> Right ESSKConstantKind
"SINGLETON_KIND" -> Right ESSKSingletonKind
"SHUFFLE_KIND" -> Right ESSKShuffleKind
x -> Left ("Unable to parse ExecutionStageSummaryKind from: " <> x)
instance ToHttpApiData ExecutionStageSummaryKind where
toQueryParam = \case
ESSKUnknownKind -> "UNKNOWN_KIND"
ESSKParDoKind -> "PAR_DO_KIND"
ESSKGroupByKeyKind -> "GROUP_BY_KEY_KIND"
ESSKFlattenKind -> "FLATTEN_KIND"
ESSKReadKind -> "READ_KIND"
ESSKWriteKind -> "WRITE_KIND"
ESSKConstantKind -> "CONSTANT_KIND"
ESSKSingletonKind -> "SINGLETON_KIND"
ESSKShuffleKind -> "SHUFFLE_KIND"
instance FromJSON ExecutionStageSummaryKind where
parseJSON = parseJSONText "ExecutionStageSummaryKind"
instance ToJSON ExecutionStageSummaryKind 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 JobRequestedState
= JRSJobStateUnknown
| JRSJobStateStopped
| JRSJobStateRunning
| JRSJobStateDone
| JRSJobStateFailed
| JRSJobStateCancelled
| JRSJobStateUpdated
| JRSJobStateDraining
| JRSJobStateDrained
| JRSJobStatePending
| JRSJobStateCancelling
| JRSJobStateQueued
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable JobRequestedState
instance FromHttpApiData JobRequestedState where
parseQueryParam = \case
"JOB_STATE_UNKNOWN" -> Right JRSJobStateUnknown
"JOB_STATE_STOPPED" -> Right JRSJobStateStopped
"JOB_STATE_RUNNING" -> Right JRSJobStateRunning
"JOB_STATE_DONE" -> Right JRSJobStateDone
"JOB_STATE_FAILED" -> Right JRSJobStateFailed
"JOB_STATE_CANCELLED" -> Right JRSJobStateCancelled
"JOB_STATE_UPDATED" -> Right JRSJobStateUpdated
"JOB_STATE_DRAINING" -> Right JRSJobStateDraining
"JOB_STATE_DRAINED" -> Right JRSJobStateDrained
"JOB_STATE_PENDING" -> Right JRSJobStatePending
"JOB_STATE_CANCELLING" -> Right JRSJobStateCancelling
"JOB_STATE_QUEUED" -> Right JRSJobStateQueued
x -> Left ("Unable to parse JobRequestedState from: " <> x)
instance ToHttpApiData JobRequestedState where
toQueryParam = \case
JRSJobStateUnknown -> "JOB_STATE_UNKNOWN"
JRSJobStateStopped -> "JOB_STATE_STOPPED"
JRSJobStateRunning -> "JOB_STATE_RUNNING"
JRSJobStateDone -> "JOB_STATE_DONE"
JRSJobStateFailed -> "JOB_STATE_FAILED"
JRSJobStateCancelled -> "JOB_STATE_CANCELLED"
JRSJobStateUpdated -> "JOB_STATE_UPDATED"
JRSJobStateDraining -> "JOB_STATE_DRAINING"
JRSJobStateDrained -> "JOB_STATE_DRAINED"
JRSJobStatePending -> "JOB_STATE_PENDING"
JRSJobStateCancelling -> "JOB_STATE_CANCELLING"
JRSJobStateQueued -> "JOB_STATE_QUEUED"
instance FromJSON JobRequestedState where
parseJSON = parseJSONText "JobRequestedState"
instance ToJSON JobRequestedState where
toJSON = toJSONText
data WorkerLifecycleEventEvent
= UnknownEvent
| OSStart
| ContainerStart
| NetworkUp
| StagingFilesDownloadStart
| StagingFilesDownloadFinish
| SdkInstallStart
| SdkInstallFinish
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable WorkerLifecycleEventEvent
instance FromHttpApiData WorkerLifecycleEventEvent where
parseQueryParam = \case
"UNKNOWN_EVENT" -> Right UnknownEvent
"OS_START" -> Right OSStart
"CONTAINER_START" -> Right ContainerStart
"NETWORK_UP" -> Right NetworkUp
"STAGING_FILES_DOWNLOAD_START" -> Right StagingFilesDownloadStart
"STAGING_FILES_DOWNLOAD_FINISH" -> Right StagingFilesDownloadFinish
"SDK_INSTALL_START" -> Right SdkInstallStart
"SDK_INSTALL_FINISH" -> Right SdkInstallFinish
x -> Left ("Unable to parse WorkerLifecycleEventEvent from: " <> x)
instance ToHttpApiData WorkerLifecycleEventEvent where
toQueryParam = \case
UnknownEvent -> "UNKNOWN_EVENT"
OSStart -> "OS_START"
ContainerStart -> "CONTAINER_START"
NetworkUp -> "NETWORK_UP"
StagingFilesDownloadStart -> "STAGING_FILES_DOWNLOAD_START"
StagingFilesDownloadFinish -> "STAGING_FILES_DOWNLOAD_FINISH"
SdkInstallStart -> "SDK_INSTALL_START"
SdkInstallFinish -> "SDK_INSTALL_FINISH"
instance FromJSON WorkerLifecycleEventEvent where
parseJSON = parseJSONText "WorkerLifecycleEventEvent"
instance ToJSON WorkerLifecycleEventEvent where
toJSON = toJSONText
data ExecutionStageStateExecutionStageState
= ESSESSJobStateUnknown
| ESSESSJobStateStopped
| ESSESSJobStateRunning
| ESSESSJobStateDone
| ESSESSJobStateFailed
| ESSESSJobStateCancelled
| ESSESSJobStateUpdated
| ESSESSJobStateDraining
| ESSESSJobStateDrained
| ESSESSJobStatePending
| ESSESSJobStateCancelling
| ESSESSJobStateQueued
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ExecutionStageStateExecutionStageState
instance FromHttpApiData ExecutionStageStateExecutionStageState where
parseQueryParam = \case
"JOB_STATE_UNKNOWN" -> Right ESSESSJobStateUnknown
"JOB_STATE_STOPPED" -> Right ESSESSJobStateStopped
"JOB_STATE_RUNNING" -> Right ESSESSJobStateRunning
"JOB_STATE_DONE" -> Right ESSESSJobStateDone
"JOB_STATE_FAILED" -> Right ESSESSJobStateFailed
"JOB_STATE_CANCELLED" -> Right ESSESSJobStateCancelled
"JOB_STATE_UPDATED" -> Right ESSESSJobStateUpdated
"JOB_STATE_DRAINING" -> Right ESSESSJobStateDraining
"JOB_STATE_DRAINED" -> Right ESSESSJobStateDrained
"JOB_STATE_PENDING" -> Right ESSESSJobStatePending
"JOB_STATE_CANCELLING" -> Right ESSESSJobStateCancelling
"JOB_STATE_QUEUED" -> Right ESSESSJobStateQueued
x -> Left ("Unable to parse ExecutionStageStateExecutionStageState from: " <> x)
instance ToHttpApiData ExecutionStageStateExecutionStageState where
toQueryParam = \case
ESSESSJobStateUnknown -> "JOB_STATE_UNKNOWN"
ESSESSJobStateStopped -> "JOB_STATE_STOPPED"
ESSESSJobStateRunning -> "JOB_STATE_RUNNING"
ESSESSJobStateDone -> "JOB_STATE_DONE"
ESSESSJobStateFailed -> "JOB_STATE_FAILED"
ESSESSJobStateCancelled -> "JOB_STATE_CANCELLED"
ESSESSJobStateUpdated -> "JOB_STATE_UPDATED"
ESSESSJobStateDraining -> "JOB_STATE_DRAINING"
ESSESSJobStateDrained -> "JOB_STATE_DRAINED"
ESSESSJobStatePending -> "JOB_STATE_PENDING"
ESSESSJobStateCancelling -> "JOB_STATE_CANCELLING"
ESSESSJobStateQueued -> "JOB_STATE_QUEUED"
instance FromJSON ExecutionStageStateExecutionStageState where
parseJSON = parseJSONText "ExecutionStageStateExecutionStageState"
instance ToJSON ExecutionStageStateExecutionStageState where
toJSON = toJSONText
data WorkerPoolIPConfiguration
= WorkerIPUnspecified
| WorkerIPPublic
| WorkerIPPrivate
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable WorkerPoolIPConfiguration
instance FromHttpApiData WorkerPoolIPConfiguration where
parseQueryParam = \case
"WORKER_IP_UNSPECIFIED" -> Right WorkerIPUnspecified
"WORKER_IP_PUBLIC" -> Right WorkerIPPublic
"WORKER_IP_PRIVATE" -> Right WorkerIPPrivate
x -> Left ("Unable to parse WorkerPoolIPConfiguration from: " <> x)
instance ToHttpApiData WorkerPoolIPConfiguration where
toQueryParam = \case
WorkerIPUnspecified -> "WORKER_IP_UNSPECIFIED"
WorkerIPPublic -> "WORKER_IP_PUBLIC"
WorkerIPPrivate -> "WORKER_IP_PRIVATE"
instance FromJSON WorkerPoolIPConfiguration where
parseJSON = parseJSONText "WorkerPoolIPConfiguration"
instance ToJSON WorkerPoolIPConfiguration where
toJSON = toJSONText
data CounterStructuredNameOrigin
= System
| User
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable CounterStructuredNameOrigin
instance FromHttpApiData CounterStructuredNameOrigin where
parseQueryParam = \case
"SYSTEM" -> Right System
"USER" -> Right User
x -> Left ("Unable to parse CounterStructuredNameOrigin from: " <> x)
instance ToHttpApiData CounterStructuredNameOrigin where
toQueryParam = \case
System -> "SYSTEM"
User -> "USER"
instance FromJSON CounterStructuredNameOrigin where
parseJSON = parseJSONText "CounterStructuredNameOrigin"
instance ToJSON CounterStructuredNameOrigin where
toJSON = toJSONText
data StreamingComputationTaskTaskType
= StreamingComputationTaskUnknown
| StreamingComputationTaskStop
| StreamingComputationTaskStart
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable StreamingComputationTaskTaskType
instance FromHttpApiData StreamingComputationTaskTaskType where
parseQueryParam = \case
"STREAMING_COMPUTATION_TASK_UNKNOWN" -> Right StreamingComputationTaskUnknown
"STREAMING_COMPUTATION_TASK_STOP" -> Right StreamingComputationTaskStop
"STREAMING_COMPUTATION_TASK_START" -> Right StreamingComputationTaskStart
x -> Left ("Unable to parse StreamingComputationTaskTaskType from: " <> x)
instance ToHttpApiData StreamingComputationTaskTaskType where
toQueryParam = \case
StreamingComputationTaskUnknown -> "STREAMING_COMPUTATION_TASK_UNKNOWN"
StreamingComputationTaskStop -> "STREAMING_COMPUTATION_TASK_STOP"
StreamingComputationTaskStart -> "STREAMING_COMPUTATION_TASK_START"
instance FromJSON StreamingComputationTaskTaskType where
parseJSON = parseJSONText "StreamingComputationTaskTaskType"
instance ToJSON StreamingComputationTaskTaskType where
toJSON = toJSONText
data SdkVersionSdkSupportStatus
= Unknown
| Supported
| Stale
| Deprecated
| Unsupported
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable SdkVersionSdkSupportStatus
instance FromHttpApiData SdkVersionSdkSupportStatus where
parseQueryParam = \case
"UNKNOWN" -> Right Unknown
"SUPPORTED" -> Right Supported
"STALE" -> Right Stale
"DEPRECATED" -> Right Deprecated
"UNSUPPORTED" -> Right Unsupported
x -> Left ("Unable to parse SdkVersionSdkSupportStatus from: " <> x)
instance ToHttpApiData SdkVersionSdkSupportStatus where
toQueryParam = \case
Unknown -> "UNKNOWN"
Supported -> "SUPPORTED"
Stale -> "STALE"
Deprecated -> "DEPRECATED"
Unsupported -> "UNSUPPORTED"
instance FromJSON SdkVersionSdkSupportStatus where
parseJSON = parseJSONText "SdkVersionSdkSupportStatus"
instance ToJSON SdkVersionSdkSupportStatus where
toJSON = toJSONText