toBounceType method

BounceType toBounceType()

Implementation

BounceType toBounceType() {
  switch (this) {
    case 'DoesNotExist':
      return BounceType.doesNotExist;
    case 'MessageTooLarge':
      return BounceType.messageTooLarge;
    case 'ExceededQuota':
      return BounceType.exceededQuota;
    case 'ContentRejected':
      return BounceType.contentRejected;
    case 'Undefined':
      return BounceType.undefined;
    case 'TemporaryFailure':
      return BounceType.temporaryFailure;
  }
  throw Exception('$this is not known in enum BounceType');
}