toCode method
Implementation
Code toCode() {
switch (this) {
case 'ACCESS_DENIED_EXCEPTION':
return Code.accessDeniedException;
case 'INTERNAL_SERVER_EXCEPTION':
return Code.internalServerException;
case 'MALWARE_DETECTED':
return Code.malwareDetected;
case 'RESOURCE_NOT_FOUND_EXCEPTION':
return Code.resourceNotFoundException;
case 'SERVICE_QUOTA_EXCEEDED_EXCEPTION':
return Code.serviceQuotaExceededException;
case 'VALIDATION_EXCEPTION':
return Code.validationException;
case 'MALWARE_SCAN_ENCRYPTED_FILE':
return Code.malwareScanEncryptedFile;
}
throw Exception('$this is not known in enum Code');
}