module Network.Google.MapsCoordinate.Types.Sum where
import Network.Google.Prelude
data JobsPatchProgress
= Completed
| InProgress
| NotAccepted
| NotStarted
| Obsolete
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable JobsPatchProgress
instance FromHttpApiData JobsPatchProgress where
parseQueryParam = \case
"COMPLETED" -> Right Completed
"IN_PROGRESS" -> Right InProgress
"NOT_ACCEPTED" -> Right NotAccepted
"NOT_STARTED" -> Right NotStarted
"OBSOLETE" -> Right Obsolete
x -> Left ("Unable to parse JobsPatchProgress from: " <> x)
instance ToHttpApiData JobsPatchProgress where
toQueryParam = \case
Completed -> "COMPLETED"
InProgress -> "IN_PROGRESS"
NotAccepted -> "NOT_ACCEPTED"
NotStarted -> "NOT_STARTED"
Obsolete -> "OBSOLETE"
instance FromJSON JobsPatchProgress where
parseJSON = parseJSONText "JobsPatchProgress"
instance ToJSON JobsPatchProgress where
toJSON = toJSONText
data JobsUpdateProgress
= JUPCompleted
| JUPInProgress
| JUPNotAccepted
| JUPNotStarted
| JUPObsolete
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable JobsUpdateProgress
instance FromHttpApiData JobsUpdateProgress where
parseQueryParam = \case
"COMPLETED" -> Right JUPCompleted
"IN_PROGRESS" -> Right JUPInProgress
"NOT_ACCEPTED" -> Right JUPNotAccepted
"NOT_STARTED" -> Right JUPNotStarted
"OBSOLETE" -> Right JUPObsolete
x -> Left ("Unable to parse JobsUpdateProgress from: " <> x)
instance ToHttpApiData JobsUpdateProgress where
toQueryParam = \case
JUPCompleted -> "COMPLETED"
JUPInProgress -> "IN_PROGRESS"
JUPNotAccepted -> "NOT_ACCEPTED"
JUPNotStarted -> "NOT_STARTED"
JUPObsolete -> "OBSOLETE"
instance FromJSON JobsUpdateProgress where
parseJSON = parseJSONText "JobsUpdateProgress"
instance ToJSON JobsUpdateProgress where
toJSON = toJSONText