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 FromText OperationWarningsItemCode where
fromText = \case
"DEPRECATED_RESOURCE_USED" -> Just DeprecatedResourceUsed
"DISK_SIZE_LARGER_THAN_IMAGE_SIZE" -> Just DiskSizeLargerThanImageSize
"INJECTED_KERNELS_DEPRECATED" -> Just InjectedKernelsDeprecated
"NEXT_HOP_ADDRESS_NOT_ASSIGNED" -> Just NextHopAddressNotAssigned
"NEXT_HOP_CANNOT_IP_FORWARD" -> Just NextHopCannotIPForward
"NEXT_HOP_INSTANCE_NOT_FOUND" -> Just NextHopInstanceNotFound
"NEXT_HOP_INSTANCE_NOT_ON_NETWORK" -> Just NextHopInstanceNotOnNetwork
"NEXT_HOP_NOT_RUNNING" -> Just NextHopNotRunning
"NO_RESULTS_ON_PAGE" -> Just NoResultsOnPage
"REQUIRED_TOS_AGREEMENT" -> Just RequiredTosAgreement
"RESOURCE_NOT_DELETED" -> Just ResourceNotDeleted
"SINGLE_INSTANCE_PROPERTY_TEMPLATE" -> Just SingleInstancePropertyTemplate
"UNREACHABLE" -> Just Unreachable
_ -> Nothing
instance ToText OperationWarningsItemCode where
toText = \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 FromText ReplicaPoolAutoHealingPolicyActionType where
fromText = \case
"REBOOT" -> Just Reboot
"RECREATE" -> Just Recreate
_ -> Nothing
instance ToText ReplicaPoolAutoHealingPolicyActionType where
toText = \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 FromText OperationStatus where
fromText = \case
"DONE" -> Just Done
"PENDING" -> Just Pending
"RUNNING" -> Just Running
_ -> Nothing
instance ToText OperationStatus where
toText = \case
Done -> "DONE"
Pending -> "PENDING"
Running -> "RUNNING"
instance FromJSON OperationStatus where
parseJSON = parseJSONText "OperationStatus"
instance ToJSON OperationStatus where
toJSON = toJSONText