toResourceStatus method
Implementation
ResourceStatus toResourceStatus() {
switch (this) {
case 'AVAILABLE':
return ResourceStatus.available;
case 'ZONAL_RESOURCE_INACCESSIBLE':
return ResourceStatus.zonalResourceInaccessible;
case 'LIMIT_EXCEEDED':
return ResourceStatus.limitExceeded;
case 'UNAVAILABLE':
return ResourceStatus.unavailable;
case 'PENDING':
return ResourceStatus.pending;
}
throw Exception('$this is not known in enum ResourceStatus');
}