module Network.Google.ReplicaPool.Types.Sum where
import Network.Google.Prelude
data OperationWarningsItemCode
= DeprecatedResourceUsed
| DiskSizeLargerThanImageSize
| InjectedKernelsDeprecated
| NextHopAddressNotAssigned
| NextHopCannotIPForward
| NextHopInstanceNotFound
| NextHopInstanceNotOnNetwork
| NextHopNotRunning
| NoResultsOnPage
| RequiredTosAgreement
| ResourceNotDeleted
| SingleInstancePropertyTemplate
| Unreachable
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable OperationWarningsItemCode
instance FromHttpApiData OperationWarningsItemCode where
parseQueryParam = \case
"DEPRECATED_RESOURCE_USED" -> Right DeprecatedResourceUsed
"DISK_SIZE_LARGER_THAN_IMAGE_SIZE" -> Right DiskSizeLargerThanImageSize
"INJECTED_KERNELS_DEPRECATED" -> Right InjectedKernelsDeprecated
"NEXT_HOP_ADDRESS_NOT_ASSIGNED" -> Right NextHopAddressNotAssigned
"NEXT_HOP_CANNOT_IP_FORWARD" -> Right NextHopCannotIPForward
"NEXT_HOP_INSTANCE_NOT_FOUND" -> Right NextHopInstanceNotFound
"NEXT_HOP_INSTANCE_NOT_ON_NETWORK" -> Right NextHopInstanceNotOnNetwork
"NEXT_HOP_NOT_RUNNING" -> Right NextHopNotRunning
"NO_RESULTS_ON_PAGE" -> Right NoResultsOnPage
"REQUIRED_TOS_AGREEMENT" -> Right RequiredTosAgreement
"RESOURCE_NOT_DELETED" -> Right ResourceNotDeleted
"SINGLE_INSTANCE_PROPERTY_TEMPLATE" -> Right SingleInstancePropertyTemplate
"UNREACHABLE" -> Right Unreachable
x -> Left ("Unable to parse OperationWarningsItemCode from: " <> x)
instance ToHttpApiData OperationWarningsItemCode where
toQueryParam = \case
DeprecatedResourceUsed -> "DEPRECATED_RESOURCE_USED"
DiskSizeLargerThanImageSize -> "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
InjectedKernelsDeprecated -> "INJECTED_KERNELS_DEPRECATED"
NextHopAddressNotAssigned -> "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
NextHopCannotIPForward -> "NEXT_HOP_CANNOT_IP_FORWARD"
NextHopInstanceNotFound -> "NEXT_HOP_INSTANCE_NOT_FOUND"
NextHopInstanceNotOnNetwork -> "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
NextHopNotRunning -> "NEXT_HOP_NOT_RUNNING"
NoResultsOnPage -> "NO_RESULTS_ON_PAGE"
RequiredTosAgreement -> "REQUIRED_TOS_AGREEMENT"
ResourceNotDeleted -> "RESOURCE_NOT_DELETED"
SingleInstancePropertyTemplate -> "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
Unreachable -> "UNREACHABLE"
instance FromJSON OperationWarningsItemCode where
parseJSON = parseJSONText "OperationWarningsItemCode"
instance ToJSON OperationWarningsItemCode where
toJSON = toJSONText
data ReplicaPoolAutoHealingPolicyActionType
= Reboot
| Recreate
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ReplicaPoolAutoHealingPolicyActionType
instance FromHttpApiData ReplicaPoolAutoHealingPolicyActionType where
parseQueryParam = \case
"REBOOT" -> Right Reboot
"RECREATE" -> Right Recreate
x -> Left ("Unable to parse ReplicaPoolAutoHealingPolicyActionType from: " <> x)
instance ToHttpApiData ReplicaPoolAutoHealingPolicyActionType where
toQueryParam = \case
Reboot -> "REBOOT"
Recreate -> "RECREATE"
instance FromJSON ReplicaPoolAutoHealingPolicyActionType where
parseJSON = parseJSONText "ReplicaPoolAutoHealingPolicyActionType"
instance ToJSON ReplicaPoolAutoHealingPolicyActionType where
toJSON = toJSONText
data OperationStatus
= Done
| Pending
| Running
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable OperationStatus
instance FromHttpApiData OperationStatus where
parseQueryParam = \case
"DONE" -> Right Done
"PENDING" -> Right Pending
"RUNNING" -> Right Running
x -> Left ("Unable to parse OperationStatus from: " <> x)
instance ToHttpApiData OperationStatus where
toQueryParam = \case
Done -> "DONE"
Pending -> "PENDING"
Running -> "RUNNING"
instance FromJSON OperationStatus where
parseJSON = parseJSONText "OperationStatus"
instance ToJSON OperationStatus where
toJSON = toJSONText