module Network.Google.ContainerBuilder.Types.Sum where
import Network.Google.Prelude
data BuildOptionsRequestedVerifyOption
= NotVerified
| Verified
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable BuildOptionsRequestedVerifyOption
instance FromHttpApiData BuildOptionsRequestedVerifyOption where
parseQueryParam = \case
"NOT_VERIFIED" -> Right NotVerified
"VERIFIED" -> Right Verified
x -> Left ("Unable to parse BuildOptionsRequestedVerifyOption from: " <> x)
instance ToHttpApiData BuildOptionsRequestedVerifyOption where
toQueryParam = \case
NotVerified -> "NOT_VERIFIED"
Verified -> "VERIFIED"
instance FromJSON BuildOptionsRequestedVerifyOption where
parseJSON = parseJSONText "BuildOptionsRequestedVerifyOption"
instance ToJSON BuildOptionsRequestedVerifyOption 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 BuildStatus
= StatusUnknown
| Queued
| Working
| Success
| Failure
| InternalError
| Timeout
| Cancelled
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable BuildStatus
instance FromHttpApiData BuildStatus where
parseQueryParam = \case
"STATUS_UNKNOWN" -> Right StatusUnknown
"QUEUED" -> Right Queued
"WORKING" -> Right Working
"SUCCESS" -> Right Success
"FAILURE" -> Right Failure
"INTERNAL_ERROR" -> Right InternalError
"TIMEOUT" -> Right Timeout
"CANCELLED" -> Right Cancelled
x -> Left ("Unable to parse BuildStatus from: " <> x)
instance ToHttpApiData BuildStatus where
toQueryParam = \case
StatusUnknown -> "STATUS_UNKNOWN"
Queued -> "QUEUED"
Working -> "WORKING"
Success -> "SUCCESS"
Failure -> "FAILURE"
InternalError -> "INTERNAL_ERROR"
Timeout -> "TIMEOUT"
Cancelled -> "CANCELLED"
instance FromJSON BuildStatus where
parseJSON = parseJSONText "BuildStatus"
instance ToJSON BuildStatus where
toJSON = toJSONText
data HashType
= None
| SHA256
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable HashType
instance FromHttpApiData HashType where
parseQueryParam = \case
"NONE" -> Right None
"SHA256" -> Right SHA256
x -> Left ("Unable to parse HashType from: " <> x)
instance ToHttpApiData HashType where
toQueryParam = \case
None -> "NONE"
SHA256 -> "SHA256"
instance FromJSON HashType where
parseJSON = parseJSONText "HashType"
instance ToJSON HashType where
toJSON = toJSONText