{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.MachineLearning.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data GoogleCloudMlV1__ParameterSpecType
= ParameterTypeUnspecified
| Double
| Integer
| Categorical
| Discrete
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleCloudMlV1__ParameterSpecType
instance FromHttpApiData GoogleCloudMlV1__ParameterSpecType where
parseQueryParam = \case
"PARAMETER_TYPE_UNSPECIFIED" -> Right ParameterTypeUnspecified
"DOUBLE" -> Right Double
"INTEGER" -> Right Integer
"CATEGORICAL" -> Right Categorical
"DISCRETE" -> Right Discrete
x -> Left ("Unable to parse GoogleCloudMlV1__ParameterSpecType from: " <> x)
instance ToHttpApiData GoogleCloudMlV1__ParameterSpecType where
toQueryParam = \case
ParameterTypeUnspecified -> "PARAMETER_TYPE_UNSPECIFIED"
Double -> "DOUBLE"
Integer -> "INTEGER"
Categorical -> "CATEGORICAL"
Discrete -> "DISCRETE"
instance FromJSON GoogleCloudMlV1__ParameterSpecType where
parseJSON = parseJSONText "GoogleCloudMlV1__ParameterSpecType"
instance ToJSON GoogleCloudMlV1__ParameterSpecType where
toJSON = toJSONText
data GoogleCloudMlV1__TrainingInputScaleTier
= Basic
| Standard1
| Premium1
| BasicGpu
| BasicTpu
| Custom
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleCloudMlV1__TrainingInputScaleTier
instance FromHttpApiData GoogleCloudMlV1__TrainingInputScaleTier where
parseQueryParam = \case
"BASIC" -> Right Basic
"STANDARD_1" -> Right Standard1
"PREMIUM_1" -> Right Premium1
"BASIC_GPU" -> Right BasicGpu
"BASIC_TPU" -> Right BasicTpu
"CUSTOM" -> Right Custom
x -> Left ("Unable to parse GoogleCloudMlV1__TrainingInputScaleTier from: " <> x)
instance ToHttpApiData GoogleCloudMlV1__TrainingInputScaleTier where
toQueryParam = \case
Basic -> "BASIC"
Standard1 -> "STANDARD_1"
Premium1 -> "PREMIUM_1"
BasicGpu -> "BASIC_GPU"
BasicTpu -> "BASIC_TPU"
Custom -> "CUSTOM"
instance FromJSON GoogleCloudMlV1__TrainingInputScaleTier where
parseJSON = parseJSONText "GoogleCloudMlV1__TrainingInputScaleTier"
instance ToJSON GoogleCloudMlV1__TrainingInputScaleTier where
toJSON = toJSONText
data GoogleCloudMlV1__ParameterSpecScaleType
= None
| UnitLinearScale
| UnitLogScale
| UnitReverseLogScale
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleCloudMlV1__ParameterSpecScaleType
instance FromHttpApiData GoogleCloudMlV1__ParameterSpecScaleType where
parseQueryParam = \case
"NONE" -> Right None
"UNIT_LINEAR_SCALE" -> Right UnitLinearScale
"UNIT_LOG_SCALE" -> Right UnitLogScale
"UNIT_REVERSE_LOG_SCALE" -> Right UnitReverseLogScale
x -> Left ("Unable to parse GoogleCloudMlV1__ParameterSpecScaleType from: " <> x)
instance ToHttpApiData GoogleCloudMlV1__ParameterSpecScaleType where
toQueryParam = \case
None -> "NONE"
UnitLinearScale -> "UNIT_LINEAR_SCALE"
UnitLogScale -> "UNIT_LOG_SCALE"
UnitReverseLogScale -> "UNIT_REVERSE_LOG_SCALE"
instance FromJSON GoogleCloudMlV1__ParameterSpecScaleType where
parseJSON = parseJSONText "GoogleCloudMlV1__ParameterSpecScaleType"
instance ToJSON GoogleCloudMlV1__ParameterSpecScaleType where
toJSON = toJSONText
data GoogleCloudMlV1__VersionFramework
= FrameworkUnspecified
| Tensorflow
| ScikitLearn
| Xgboost
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleCloudMlV1__VersionFramework
instance FromHttpApiData GoogleCloudMlV1__VersionFramework where
parseQueryParam = \case
"FRAMEWORK_UNSPECIFIED" -> Right FrameworkUnspecified
"TENSORFLOW" -> Right Tensorflow
"SCIKIT_LEARN" -> Right ScikitLearn
"XGBOOST" -> Right Xgboost
x -> Left ("Unable to parse GoogleCloudMlV1__VersionFramework from: " <> x)
instance ToHttpApiData GoogleCloudMlV1__VersionFramework where
toQueryParam = \case
FrameworkUnspecified -> "FRAMEWORK_UNSPECIFIED"
Tensorflow -> "TENSORFLOW"
ScikitLearn -> "SCIKIT_LEARN"
Xgboost -> "XGBOOST"
instance FromJSON GoogleCloudMlV1__VersionFramework where
parseJSON = parseJSONText "GoogleCloudMlV1__VersionFramework"
instance ToJSON GoogleCloudMlV1__VersionFramework where
toJSON = toJSONText
data GoogleCloudMlV1__VersionState
= Unknown
| Ready
| Creating
| Failed
| Deleting
| Updating
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleCloudMlV1__VersionState
instance FromHttpApiData GoogleCloudMlV1__VersionState where
parseQueryParam = \case
"UNKNOWN" -> Right Unknown
"READY" -> Right Ready
"CREATING" -> Right Creating
"FAILED" -> Right Failed
"DELETING" -> Right Deleting
"UPDATING" -> Right Updating
x -> Left ("Unable to parse GoogleCloudMlV1__VersionState from: " <> x)
instance ToHttpApiData GoogleCloudMlV1__VersionState where
toQueryParam = \case
Unknown -> "UNKNOWN"
Ready -> "READY"
Creating -> "CREATING"
Failed -> "FAILED"
Deleting -> "DELETING"
Updating -> "UPDATING"
instance FromJSON GoogleCloudMlV1__VersionState where
parseJSON = parseJSONText "GoogleCloudMlV1__VersionState"
instance ToJSON GoogleCloudMlV1__VersionState where
toJSON = toJSONText
data GoogleCloudMlV1__HyperparameterSpecAlgorithm
= AlgorithmUnspecified
| GridSearch
| RandomSearch
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleCloudMlV1__HyperparameterSpecAlgorithm
instance FromHttpApiData GoogleCloudMlV1__HyperparameterSpecAlgorithm where
parseQueryParam = \case
"ALGORITHM_UNSPECIFIED" -> Right AlgorithmUnspecified
"GRID_SEARCH" -> Right GridSearch
"RANDOM_SEARCH" -> Right RandomSearch
x -> Left ("Unable to parse GoogleCloudMlV1__HyperparameterSpecAlgorithm from: " <> x)
instance ToHttpApiData GoogleCloudMlV1__HyperparameterSpecAlgorithm where
toQueryParam = \case
AlgorithmUnspecified -> "ALGORITHM_UNSPECIFIED"
GridSearch -> "GRID_SEARCH"
RandomSearch -> "RANDOM_SEARCH"
instance FromJSON GoogleCloudMlV1__HyperparameterSpecAlgorithm where
parseJSON = parseJSONText "GoogleCloudMlV1__HyperparameterSpecAlgorithm"
instance ToJSON GoogleCloudMlV1__HyperparameterSpecAlgorithm where
toJSON = toJSONText
data GoogleCloudMlV1__JobState
= GCMVJSStateUnspecified
| GCMVJSQueued
| GCMVJSPreparing
| GCMVJSRunning
| GCMVJSSucceeded
| GCMVJSFailed
| GCMVJSCancelling
| GCMVJSCancelled
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleCloudMlV1__JobState
instance FromHttpApiData GoogleCloudMlV1__JobState where
parseQueryParam = \case
"STATE_UNSPECIFIED" -> Right GCMVJSStateUnspecified
"QUEUED" -> Right GCMVJSQueued
"PREPARING" -> Right GCMVJSPreparing
"RUNNING" -> Right GCMVJSRunning
"SUCCEEDED" -> Right GCMVJSSucceeded
"FAILED" -> Right GCMVJSFailed
"CANCELLING" -> Right GCMVJSCancelling
"CANCELLED" -> Right GCMVJSCancelled
x -> Left ("Unable to parse GoogleCloudMlV1__JobState from: " <> x)
instance ToHttpApiData GoogleCloudMlV1__JobState where
toQueryParam = \case
GCMVJSStateUnspecified -> "STATE_UNSPECIFIED"
GCMVJSQueued -> "QUEUED"
GCMVJSPreparing -> "PREPARING"
GCMVJSRunning -> "RUNNING"
GCMVJSSucceeded -> "SUCCEEDED"
GCMVJSFailed -> "FAILED"
GCMVJSCancelling -> "CANCELLING"
GCMVJSCancelled -> "CANCELLED"
instance FromJSON GoogleCloudMlV1__JobState where
parseJSON = parseJSONText "GoogleCloudMlV1__JobState"
instance ToJSON GoogleCloudMlV1__JobState where
toJSON = toJSONText
data GoogleCloudMlV1__PredictionInputDataFormat
= DataFormatUnspecified
| JSON
| Text
| TfRecord
| TfRecordGzip
| CSV
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleCloudMlV1__PredictionInputDataFormat
instance FromHttpApiData GoogleCloudMlV1__PredictionInputDataFormat where
parseQueryParam = \case
"DATA_FORMAT_UNSPECIFIED" -> Right DataFormatUnspecified
"JSON" -> Right JSON
"TEXT" -> Right Text
"TF_RECORD" -> Right TfRecord
"TF_RECORD_GZIP" -> Right TfRecordGzip
"CSV" -> Right CSV
x -> Left ("Unable to parse GoogleCloudMlV1__PredictionInputDataFormat from: " <> x)
instance ToHttpApiData GoogleCloudMlV1__PredictionInputDataFormat where
toQueryParam = \case
DataFormatUnspecified -> "DATA_FORMAT_UNSPECIFIED"
JSON -> "JSON"
Text -> "TEXT"
TfRecord -> "TF_RECORD"
TfRecordGzip -> "TF_RECORD_GZIP"
CSV -> "CSV"
instance FromJSON GoogleCloudMlV1__PredictionInputDataFormat where
parseJSON = parseJSONText "GoogleCloudMlV1__PredictionInputDataFormat"
instance ToJSON GoogleCloudMlV1__PredictionInputDataFormat where
toJSON = toJSONText
data GoogleCloudMlV1__CapabilityType
= TypeUnspecified
| Training
| BatchPrediction
| OnlinePrediction
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleCloudMlV1__CapabilityType
instance FromHttpApiData GoogleCloudMlV1__CapabilityType where
parseQueryParam = \case
"TYPE_UNSPECIFIED" -> Right TypeUnspecified
"TRAINING" -> Right Training
"BATCH_PREDICTION" -> Right BatchPrediction
"ONLINE_PREDICTION" -> Right OnlinePrediction
x -> Left ("Unable to parse GoogleCloudMlV1__CapabilityType from: " <> x)
instance ToHttpApiData GoogleCloudMlV1__CapabilityType where
toQueryParam = \case
TypeUnspecified -> "TYPE_UNSPECIFIED"
Training -> "TRAINING"
BatchPrediction -> "BATCH_PREDICTION"
OnlinePrediction -> "ONLINE_PREDICTION"
instance FromJSON GoogleCloudMlV1__CapabilityType where
parseJSON = parseJSONText "GoogleCloudMlV1__CapabilityType"
instance ToJSON GoogleCloudMlV1__CapabilityType where
toJSON = toJSONText
data GoogleCloudMlV1__PredictionInputOutputDataFormat
= GCMVPIODFDataFormatUnspecified
| GCMVPIODFJSON
| GCMVPIODFText
| GCMVPIODFTfRecord
| GCMVPIODFTfRecordGzip
| GCMVPIODFCSV
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleCloudMlV1__PredictionInputOutputDataFormat
instance FromHttpApiData GoogleCloudMlV1__PredictionInputOutputDataFormat where
parseQueryParam = \case
"DATA_FORMAT_UNSPECIFIED" -> Right GCMVPIODFDataFormatUnspecified
"JSON" -> Right GCMVPIODFJSON
"TEXT" -> Right GCMVPIODFText
"TF_RECORD" -> Right GCMVPIODFTfRecord
"TF_RECORD_GZIP" -> Right GCMVPIODFTfRecordGzip
"CSV" -> Right GCMVPIODFCSV
x -> Left ("Unable to parse GoogleCloudMlV1__PredictionInputOutputDataFormat from: " <> x)
instance ToHttpApiData GoogleCloudMlV1__PredictionInputOutputDataFormat where
toQueryParam = \case
GCMVPIODFDataFormatUnspecified -> "DATA_FORMAT_UNSPECIFIED"
GCMVPIODFJSON -> "JSON"
GCMVPIODFText -> "TEXT"
GCMVPIODFTfRecord -> "TF_RECORD"
GCMVPIODFTfRecordGzip -> "TF_RECORD_GZIP"
GCMVPIODFCSV -> "CSV"
instance FromJSON GoogleCloudMlV1__PredictionInputOutputDataFormat where
parseJSON = parseJSONText "GoogleCloudMlV1__PredictionInputOutputDataFormat"
instance ToJSON GoogleCloudMlV1__PredictionInputOutputDataFormat where
toJSON = toJSONText
data GoogleCloudMlV1__HyperparameterSpecGoal
= GoalTypeUnspecified
| Maximize
| Minimize
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleCloudMlV1__HyperparameterSpecGoal
instance FromHttpApiData GoogleCloudMlV1__HyperparameterSpecGoal where
parseQueryParam = \case
"GOAL_TYPE_UNSPECIFIED" -> Right GoalTypeUnspecified
"MAXIMIZE" -> Right Maximize
"MINIMIZE" -> Right Minimize
x -> Left ("Unable to parse GoogleCloudMlV1__HyperparameterSpecGoal from: " <> x)
instance ToHttpApiData GoogleCloudMlV1__HyperparameterSpecGoal where
toQueryParam = \case
GoalTypeUnspecified -> "GOAL_TYPE_UNSPECIFIED"
Maximize -> "MAXIMIZE"
Minimize -> "MINIMIZE"
instance FromJSON GoogleCloudMlV1__HyperparameterSpecGoal where
parseJSON = parseJSONText "GoogleCloudMlV1__HyperparameterSpecGoal"
instance ToJSON GoogleCloudMlV1__HyperparameterSpecGoal where
toJSON = toJSONText
data GoogleIAMV1__AuditLogConfigLogType
= LogTypeUnspecified
| AdminRead
| DataWrite
| DataRead
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleIAMV1__AuditLogConfigLogType
instance FromHttpApiData GoogleIAMV1__AuditLogConfigLogType where
parseQueryParam = \case
"LOG_TYPE_UNSPECIFIED" -> Right LogTypeUnspecified
"ADMIN_READ" -> Right AdminRead
"DATA_WRITE" -> Right DataWrite
"DATA_READ" -> Right DataRead
x -> Left ("Unable to parse GoogleIAMV1__AuditLogConfigLogType from: " <> x)
instance ToHttpApiData GoogleIAMV1__AuditLogConfigLogType where
toQueryParam = \case
LogTypeUnspecified -> "LOG_TYPE_UNSPECIFIED"
AdminRead -> "ADMIN_READ"
DataWrite -> "DATA_WRITE"
DataRead -> "DATA_READ"
instance FromJSON GoogleIAMV1__AuditLogConfigLogType where
parseJSON = parseJSONText "GoogleIAMV1__AuditLogConfigLogType"
instance ToJSON GoogleIAMV1__AuditLogConfigLogType 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 GoogleCloudMlV1__OperationMetadataOperationType
= OperationTypeUnspecified
| CreateVersion
| DeleteVersion
| DeleteModel
| UpdateModel
| UpdateVersion
| UpdateConfig
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleCloudMlV1__OperationMetadataOperationType
instance FromHttpApiData GoogleCloudMlV1__OperationMetadataOperationType where
parseQueryParam = \case
"OPERATION_TYPE_UNSPECIFIED" -> Right OperationTypeUnspecified
"CREATE_VERSION" -> Right CreateVersion
"DELETE_VERSION" -> Right DeleteVersion
"DELETE_MODEL" -> Right DeleteModel
"UPDATE_MODEL" -> Right UpdateModel
"UPDATE_VERSION" -> Right UpdateVersion
"UPDATE_CONFIG" -> Right UpdateConfig
x -> Left ("Unable to parse GoogleCloudMlV1__OperationMetadataOperationType from: " <> x)
instance ToHttpApiData GoogleCloudMlV1__OperationMetadataOperationType where
toQueryParam = \case
OperationTypeUnspecified -> "OPERATION_TYPE_UNSPECIFIED"
CreateVersion -> "CREATE_VERSION"
DeleteVersion -> "DELETE_VERSION"
DeleteModel -> "DELETE_MODEL"
UpdateModel -> "UPDATE_MODEL"
UpdateVersion -> "UPDATE_VERSION"
UpdateConfig -> "UPDATE_CONFIG"
instance FromJSON GoogleCloudMlV1__OperationMetadataOperationType where
parseJSON = parseJSONText "GoogleCloudMlV1__OperationMetadataOperationType"
instance ToJSON GoogleCloudMlV1__OperationMetadataOperationType where
toJSON = toJSONText
data GoogleCloudMlV1__AcceleratorConfigType
= AcceleratorTypeUnspecified
| NvidiaTeslaK80
| NvidiaTeslaP100
| NvidiaTeslaV100
| NvidiaTeslaP4
| NvidiaTeslaT4
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GoogleCloudMlV1__AcceleratorConfigType
instance FromHttpApiData GoogleCloudMlV1__AcceleratorConfigType where
parseQueryParam = \case
"ACCELERATOR_TYPE_UNSPECIFIED" -> Right AcceleratorTypeUnspecified
"NVIDIA_TESLA_K80" -> Right NvidiaTeslaK80
"NVIDIA_TESLA_P100" -> Right NvidiaTeslaP100
"NVIDIA_TESLA_V100" -> Right NvidiaTeslaV100
"NVIDIA_TESLA_P4" -> Right NvidiaTeslaP4
"NVIDIA_TESLA_T4" -> Right NvidiaTeslaT4
x -> Left ("Unable to parse GoogleCloudMlV1__AcceleratorConfigType from: " <> x)
instance ToHttpApiData GoogleCloudMlV1__AcceleratorConfigType where
toQueryParam = \case
AcceleratorTypeUnspecified -> "ACCELERATOR_TYPE_UNSPECIFIED"
NvidiaTeslaK80 -> "NVIDIA_TESLA_K80"
NvidiaTeslaP100 -> "NVIDIA_TESLA_P100"
NvidiaTeslaV100 -> "NVIDIA_TESLA_V100"
NvidiaTeslaP4 -> "NVIDIA_TESLA_P4"
NvidiaTeslaT4 -> "NVIDIA_TESLA_T4"
instance FromJSON GoogleCloudMlV1__AcceleratorConfigType where
parseJSON = parseJSONText "GoogleCloudMlV1__AcceleratorConfigType"
instance ToJSON GoogleCloudMlV1__AcceleratorConfigType where
toJSON = toJSONText