toServerStatus method
Implementation
ServerStatus toServerStatus() {
switch (this) {
case 'BACKING_UP':
return ServerStatus.backingUp;
case 'CONNECTION_LOST':
return ServerStatus.connectionLost;
case 'CREATING':
return ServerStatus.creating;
case 'DELETING':
return ServerStatus.deleting;
case 'MODIFYING':
return ServerStatus.modifying;
case 'FAILED':
return ServerStatus.failed;
case 'HEALTHY':
return ServerStatus.healthy;
case 'RUNNING':
return ServerStatus.running;
case 'RESTORING':
return ServerStatus.restoring;
case 'SETUP':
return ServerStatus.setup;
case 'UNDER_MAINTENANCE':
return ServerStatus.underMaintenance;
case 'UNHEALTHY':
return ServerStatus.unhealthy;
case 'TERMINATED':
return ServerStatus.terminated;
}
throw Exception('$this is not known in enum ServerStatus');
}