class JobQueueBatch implements Serializable {

    public Boolean isValid() {
        switch (status) {
            case QUEUED:
                return submitTime != null && aggregatorID == null;
            case RUNNING:
                return submitTime != null && startTime != null && updateTime != null && aggregatorID != null;
            case COMPLETED:
            case FAILED:
                return submitTime != null && startTime != null && updateTime != null && completeTime != null && aggregatorID == null;
            default:
                return false;
        }
    }

    public  JobQueueBatch();
    public  JobQueueBatch(UUID jobID,
                         UUID orgID,
                         String providerID,
                         List<String> patients,
                         List<ResourceType> resourceTypes,
                         OffsetDateTime since,
                         OffsetDateTime transactionTime);

}