toChannelState method

ChannelState toChannelState()

Implementation

ChannelState toChannelState() {
  switch (this) {
    case 'CREATING':
      return ChannelState.creating;
    case 'CREATE_FAILED':
      return ChannelState.createFailed;
    case 'IDLE':
      return ChannelState.idle;
    case 'STARTING':
      return ChannelState.starting;
    case 'RUNNING':
      return ChannelState.running;
    case 'RECOVERING':
      return ChannelState.recovering;
    case 'STOPPING':
      return ChannelState.stopping;
    case 'DELETING':
      return ChannelState.deleting;
    case 'DELETED':
      return ChannelState.deleted;
    case 'UPDATING':
      return ChannelState.updating;
    case 'UPDATE_FAILED':
      return ChannelState.updateFailed;
  }
  throw Exception('$this is not known in enum ChannelState');
}