toBulkEmailStatus method

BulkEmailStatus toBulkEmailStatus()

Implementation

BulkEmailStatus toBulkEmailStatus() {
  switch (this) {
    case 'SUCCESS':
      return BulkEmailStatus.success;
    case 'MESSAGE_REJECTED':
      return BulkEmailStatus.messageRejected;
    case 'MAIL_FROM_DOMAIN_NOT_VERIFIED':
      return BulkEmailStatus.mailFromDomainNotVerified;
    case 'CONFIGURATION_SET_NOT_FOUND':
      return BulkEmailStatus.configurationSetNotFound;
    case 'TEMPLATE_NOT_FOUND':
      return BulkEmailStatus.templateNotFound;
    case 'ACCOUNT_SUSPENDED':
      return BulkEmailStatus.accountSuspended;
    case 'ACCOUNT_THROTTLED':
      return BulkEmailStatus.accountThrottled;
    case 'ACCOUNT_DAILY_QUOTA_EXCEEDED':
      return BulkEmailStatus.accountDailyQuotaExceeded;
    case 'INVALID_SENDING_POOL_NAME':
      return BulkEmailStatus.invalidSendingPoolName;
    case 'ACCOUNT_SENDING_PAUSED':
      return BulkEmailStatus.accountSendingPaused;
    case 'CONFIGURATION_SET_SENDING_PAUSED':
      return BulkEmailStatus.configurationSetSendingPaused;
    case 'INVALID_PARAMETER':
      return BulkEmailStatus.invalidParameter;
    case 'TRANSIENT_FAILURE':
      return BulkEmailStatus.transientFailure;
    case 'FAILED':
      return BulkEmailStatus.failed;
  }
  throw Exception('$this is not known in enum BulkEmailStatus');
}