toImageBuilderState method

ImageBuilderState toImageBuilderState()

Implementation

ImageBuilderState toImageBuilderState() {
  switch (this) {
    case 'PENDING':
      return ImageBuilderState.pending;
    case 'UPDATING_AGENT':
      return ImageBuilderState.updatingAgent;
    case 'RUNNING':
      return ImageBuilderState.running;
    case 'STOPPING':
      return ImageBuilderState.stopping;
    case 'STOPPED':
      return ImageBuilderState.stopped;
    case 'REBOOTING':
      return ImageBuilderState.rebooting;
    case 'SNAPSHOTTING':
      return ImageBuilderState.snapshotting;
    case 'DELETING':
      return ImageBuilderState.deleting;
    case 'FAILED':
      return ImageBuilderState.failed;
  }
  throw Exception('$this is not known in enum ImageBuilderState');
}