001 002package com.commercetools.ml.models.common; 003 004import java.time.*; 005import java.util.*; 006 007import com.fasterxml.jackson.annotation.JsonCreator; 008import com.fasterxml.jackson.annotation.JsonProperty; 009import com.fasterxml.jackson.databind.annotation.*; 010 011import io.vrap.rmf.base.client.ModelBase; 012import io.vrap.rmf.base.client.utils.Generated; 013 014import org.apache.commons.lang3.builder.EqualsBuilder; 015import org.apache.commons.lang3.builder.HashCodeBuilder; 016 017/** 018 * <p>Represents a URL path to poll to get the results of an Asynchronous Request.</p> 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class TaskTokenImpl implements TaskToken, ModelBase { 022 023 private String taskId; 024 025 private String uriPath; 026 027 @JsonCreator 028 TaskTokenImpl(@JsonProperty("taskId") final String taskId, @JsonProperty("uriPath") final String uriPath) { 029 this.taskId = taskId; 030 this.uriPath = uriPath; 031 } 032 033 public TaskTokenImpl() { 034 } 035 036 /** 037 * <p>The ID for the task. Used to find the status of the task.</p> 038 */ 039 040 public String getTaskId() { 041 return this.taskId; 042 } 043 044 /** 045 * <p>The URI path to poll for the status of the task.</p> 046 */ 047 048 public String getUriPath() { 049 return this.uriPath; 050 } 051 052 public void setTaskId(final String taskId) { 053 this.taskId = taskId; 054 } 055 056 public void setUriPath(final String uriPath) { 057 this.uriPath = uriPath; 058 } 059 060 @Override 061 public boolean equals(Object o) { 062 if (this == o) 063 return true; 064 065 if (o == null || getClass() != o.getClass()) 066 return false; 067 068 TaskTokenImpl that = (TaskTokenImpl) o; 069 070 return new EqualsBuilder().append(taskId, that.taskId).append(uriPath, that.uriPath).isEquals(); 071 } 072 073 @Override 074 public int hashCode() { 075 return new HashCodeBuilder(17, 37).append(taskId).append(uriPath).toHashCode(); 076 } 077 078}