toInstanceStateChangeReasonCode method
Implementation
InstanceStateChangeReasonCode toInstanceStateChangeReasonCode() {
switch (this) {
case 'INTERNAL_ERROR':
return InstanceStateChangeReasonCode.internalError;
case 'VALIDATION_ERROR':
return InstanceStateChangeReasonCode.validationError;
case 'INSTANCE_FAILURE':
return InstanceStateChangeReasonCode.instanceFailure;
case 'BOOTSTRAP_FAILURE':
return InstanceStateChangeReasonCode.bootstrapFailure;
case 'CLUSTER_TERMINATED':
return InstanceStateChangeReasonCode.clusterTerminated;
}
throw Exception('$this is not known in enum InstanceStateChangeReasonCode');
}