toCampaignStatus method
Implementation
CampaignStatus toCampaignStatus() {
switch (this) {
case 'SCHEDULED':
return CampaignStatus.scheduled;
case 'EXECUTING':
return CampaignStatus.executing;
case 'PENDING_NEXT_RUN':
return CampaignStatus.pendingNextRun;
case 'COMPLETED':
return CampaignStatus.completed;
case 'PAUSED':
return CampaignStatus.paused;
case 'DELETED':
return CampaignStatus.deleted;
case 'INVALID':
return CampaignStatus.invalid;
}
throw Exception('$this is not known in enum CampaignStatus');
}