toImageState method
Implementation
ImageState toImageState() {
switch (this) {
case 'PENDING':
return ImageState.pending;
case 'AVAILABLE':
return ImageState.available;
case 'FAILED':
return ImageState.failed;
case 'COPYING':
return ImageState.copying;
case 'DELETING':
return ImageState.deleting;
}
throw Exception('$this is not known in enum ImageState');
}