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 /** 028 * create instance with all properties 029 */ 030 @JsonCreator 031 TaskTokenImpl(@JsonProperty("taskId") final String taskId, @JsonProperty("uriPath") final String uriPath) { 032 this.taskId = taskId; 033 this.uriPath = uriPath; 034 } 035 036 /** 037 * create empty instance 038 */ 039 public TaskTokenImpl() { 040 } 041 042 /** 043 * <p>The ID for the task. Used to find the status of the task.</p> 044 */ 045 046 public String getTaskId() { 047 return this.taskId; 048 } 049 050 /** 051 * <p>The URI path to poll for the status of the task.</p> 052 */ 053 054 public String getUriPath() { 055 return this.uriPath; 056 } 057 058 public void setTaskId(final String taskId) { 059 this.taskId = taskId; 060 } 061 062 public void setUriPath(final String uriPath) { 063 this.uriPath = uriPath; 064 } 065 066 @Override 067 public boolean equals(Object o) { 068 if (this == o) 069 return true; 070 071 if (o == null || getClass() != o.getClass()) 072 return false; 073 074 TaskTokenImpl that = (TaskTokenImpl) o; 075 076 return new EqualsBuilder().append(taskId, that.taskId).append(uriPath, that.uriPath).isEquals(); 077 } 078 079 @Override 080 public int hashCode() { 081 return new HashCodeBuilder(17, 37).append(taskId).append(uriPath).toHashCode(); 082 } 083 084}