package io.apibuilder.internal.v0.models; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.lang.Long; import java.lang.String; import java.util.UUID; import lombok.Data; import me.geso.tinyvalidator.constraints.NotNull; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.12.8 * User agent: apibuilder app.apibuilder.io/apicollective/apibuilder-internal/0.12.8/java_aws_lambda_pojo_client * * WARNING: not all features (notably unions) and data types work with the java generator yet. * Java POJO generator is designed to be used with AWS Lambdas. * If you are considering using this library, would like to request/discuss features, or would like to share how you're using it, please contact daniel.kirby@gilt.com * */ @Data @JsonIgnoreProperties( ignoreUnknown = true ) public class Task { @NotNull protected UUID guid; @NotNull protected TaskData data; @NotNull protected Long numberAttempts; protected String lastError; public Task(UUID guid, TaskData data, Long numberAttempts, String lastError) { this.guid = guid; this.data = data; this.numberAttempts = numberAttempts; this.lastError = lastError; } public Task() { } public UUID getGuid() { return guid; } public void setGuid(UUID guid) { this.guid = guid; } public TaskData getData() { return data; } public void setData(TaskData data) { this.data = data; } /** * Records the number of times we have attempted to run this task. Commonly we increment number attempts, process the task, and if succeeds we then delete the task. If it fails, we update last_error. This allows us to retry a task say twice; after which we no longer process the task (can notify an admin of the error). */ public Long getNumberAttempts() { return numberAttempts; } public void setNumberAttempts(Long numberAttempts) { this.numberAttempts = numberAttempts; } public String getLastError() { return lastError; } public void setLastError(String lastError) { this.lastError = lastError; } }