001/* 002 * Copyright 2020 Global Biodiversity Information Facility (GBIF) 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.gbif.api.model.pipelines; 017 018import org.gbif.api.annotation.Generated; 019import org.gbif.api.model.crawler.DatasetProcessStatus; 020 021import java.util.Objects; 022import java.util.Set; 023import java.util.UUID; 024 025public class IngestionProcess { 026 027 private UUID datasetKey; 028 private String datasetTitle; 029 private int attempt; 030 private DatasetProcessStatus crawlInfo; 031 private Set<PipelineExecution> pipelineExecutions; 032 033 public UUID getDatasetKey() { 034 return datasetKey; 035 } 036 037 public IngestionProcess setDatasetKey(UUID datasetKey) { 038 this.datasetKey = datasetKey; 039 return this; 040 } 041 042 public String getDatasetTitle() { 043 return datasetTitle; 044 } 045 046 public IngestionProcess setDatasetTitle(String datasetTitle) { 047 this.datasetTitle = datasetTitle; 048 return this; 049 } 050 051 public int getAttempt() { 052 return attempt; 053 } 054 055 public IngestionProcess setAttempt(int attempt) { 056 this.attempt = attempt; 057 return this; 058 } 059 060 public DatasetProcessStatus getCrawlInfo() { 061 return crawlInfo; 062 } 063 064 public IngestionProcess setCrawlInfo(DatasetProcessStatus crawlInfo) { 065 this.crawlInfo = crawlInfo; 066 return this; 067 } 068 069 public Set<PipelineExecution> getPipelineExecutions() { 070 return pipelineExecutions; 071 } 072 073 public IngestionProcess setPipelineExecutions(Set<PipelineExecution> pipelineExecutions) { 074 this.pipelineExecutions = pipelineExecutions; 075 return this; 076 } 077 078 @Generated 079 @Override 080 public boolean equals(Object o) { 081 if (this == o) return true; 082 if (o == null || getClass() != o.getClass()) return false; 083 IngestionProcess that = (IngestionProcess) o; 084 return attempt == that.attempt && Objects.equals(datasetKey, that.datasetKey); 085 } 086 087 @Generated 088 @Override 089 public int hashCode() { 090 return Objects.hash(datasetKey, attempt); 091 } 092}