Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.camunda.community.rest.client.dto.LockedExternalTaskDto Maven / Gradle / Ivy
/*
* Camunda Platform REST API
* OpenApi Spec for Camunda Platform REST API.
*
* The version of the OpenAPI document: 7.21.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.camunda.community.rest.client.dto;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
import org.camunda.community.rest.client.dto.VariableValueDto;
import org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.StringJoiner;
/**
* LockedExternalTaskDto
*/
@JsonPropertyOrder({
LockedExternalTaskDto.JSON_PROPERTY_ACTIVITY_ID,
LockedExternalTaskDto.JSON_PROPERTY_ACTIVITY_INSTANCE_ID,
LockedExternalTaskDto.JSON_PROPERTY_ERROR_MESSAGE,
LockedExternalTaskDto.JSON_PROPERTY_ERROR_DETAILS,
LockedExternalTaskDto.JSON_PROPERTY_EXECUTION_ID,
LockedExternalTaskDto.JSON_PROPERTY_ID,
LockedExternalTaskDto.JSON_PROPERTY_LOCK_EXPIRATION_TIME,
LockedExternalTaskDto.JSON_PROPERTY_PROCESS_DEFINITION_ID,
LockedExternalTaskDto.JSON_PROPERTY_PROCESS_DEFINITION_KEY,
LockedExternalTaskDto.JSON_PROPERTY_PROCESS_DEFINITION_VERSION_TAG,
LockedExternalTaskDto.JSON_PROPERTY_PROCESS_INSTANCE_ID,
LockedExternalTaskDto.JSON_PROPERTY_TENANT_ID,
LockedExternalTaskDto.JSON_PROPERTY_RETRIES,
LockedExternalTaskDto.JSON_PROPERTY_SUSPENDED,
LockedExternalTaskDto.JSON_PROPERTY_WORKER_ID,
LockedExternalTaskDto.JSON_PROPERTY_PRIORITY,
LockedExternalTaskDto.JSON_PROPERTY_TOPIC_NAME,
LockedExternalTaskDto.JSON_PROPERTY_BUSINESS_KEY,
LockedExternalTaskDto.JSON_PROPERTY_VARIABLES
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-06-27T13:50:23.655629899Z[Etc/UTC]")
public class LockedExternalTaskDto {
public static final String JSON_PROPERTY_ACTIVITY_ID = "activityId";
private JsonNullable activityId = JsonNullable.undefined();
public static final String JSON_PROPERTY_ACTIVITY_INSTANCE_ID = "activityInstanceId";
private JsonNullable activityInstanceId = JsonNullable.undefined();
public static final String JSON_PROPERTY_ERROR_MESSAGE = "errorMessage";
private JsonNullable errorMessage = JsonNullable.undefined();
public static final String JSON_PROPERTY_ERROR_DETAILS = "errorDetails";
private JsonNullable errorDetails = JsonNullable.undefined();
public static final String JSON_PROPERTY_EXECUTION_ID = "executionId";
private JsonNullable executionId = JsonNullable.undefined();
public static final String JSON_PROPERTY_ID = "id";
private JsonNullable id = JsonNullable.undefined();
public static final String JSON_PROPERTY_LOCK_EXPIRATION_TIME = "lockExpirationTime";
private JsonNullable lockExpirationTime = JsonNullable.undefined();
public static final String JSON_PROPERTY_PROCESS_DEFINITION_ID = "processDefinitionId";
private JsonNullable processDefinitionId = JsonNullable.undefined();
public static final String JSON_PROPERTY_PROCESS_DEFINITION_KEY = "processDefinitionKey";
private JsonNullable processDefinitionKey = JsonNullable.undefined();
public static final String JSON_PROPERTY_PROCESS_DEFINITION_VERSION_TAG = "processDefinitionVersionTag";
private JsonNullable processDefinitionVersionTag = JsonNullable.undefined();
public static final String JSON_PROPERTY_PROCESS_INSTANCE_ID = "processInstanceId";
private JsonNullable processInstanceId = JsonNullable.undefined();
public static final String JSON_PROPERTY_TENANT_ID = "tenantId";
private JsonNullable tenantId = JsonNullable.undefined();
public static final String JSON_PROPERTY_RETRIES = "retries";
private JsonNullable retries = JsonNullable.undefined();
public static final String JSON_PROPERTY_SUSPENDED = "suspended";
private JsonNullable suspended = JsonNullable.undefined();
public static final String JSON_PROPERTY_WORKER_ID = "workerId";
private JsonNullable workerId = JsonNullable.undefined();
public static final String JSON_PROPERTY_PRIORITY = "priority";
private JsonNullable priority = JsonNullable.undefined();
public static final String JSON_PROPERTY_TOPIC_NAME = "topicName";
private JsonNullable topicName = JsonNullable.undefined();
public static final String JSON_PROPERTY_BUSINESS_KEY = "businessKey";
private JsonNullable businessKey = JsonNullable.undefined();
public static final String JSON_PROPERTY_VARIABLES = "variables";
private JsonNullable> variables = JsonNullable.>undefined();
public LockedExternalTaskDto() {
}
public LockedExternalTaskDto activityId(String activityId) {
this.activityId = JsonNullable.of(activityId);
return this;
}
/**
* The id of the activity that this external task belongs to.
* @return activityId
**/
@javax.annotation.Nullable
@JsonIgnore
public String getActivityId() {
return activityId.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ACTIVITY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getActivityId_JsonNullable() {
return activityId;
}
@JsonProperty(JSON_PROPERTY_ACTIVITY_ID)
public void setActivityId_JsonNullable(JsonNullable activityId) {
this.activityId = activityId;
}
public void setActivityId(String activityId) {
this.activityId = JsonNullable.of(activityId);
}
public LockedExternalTaskDto activityInstanceId(String activityInstanceId) {
this.activityInstanceId = JsonNullable.of(activityInstanceId);
return this;
}
/**
* The id of the activity instance that the external task belongs to.
* @return activityInstanceId
**/
@javax.annotation.Nullable
@JsonIgnore
public String getActivityInstanceId() {
return activityInstanceId.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ACTIVITY_INSTANCE_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getActivityInstanceId_JsonNullable() {
return activityInstanceId;
}
@JsonProperty(JSON_PROPERTY_ACTIVITY_INSTANCE_ID)
public void setActivityInstanceId_JsonNullable(JsonNullable activityInstanceId) {
this.activityInstanceId = activityInstanceId;
}
public void setActivityInstanceId(String activityInstanceId) {
this.activityInstanceId = JsonNullable.of(activityInstanceId);
}
public LockedExternalTaskDto errorMessage(String errorMessage) {
this.errorMessage = JsonNullable.of(errorMessage);
return this;
}
/**
* The full error message submitted with the latest reported failure executing this task;`null` if no failure was reported previously or if no error message was submitted
* @return errorMessage
**/
@javax.annotation.Nullable
@JsonIgnore
public String getErrorMessage() {
return errorMessage.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ERROR_MESSAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getErrorMessage_JsonNullable() {
return errorMessage;
}
@JsonProperty(JSON_PROPERTY_ERROR_MESSAGE)
public void setErrorMessage_JsonNullable(JsonNullable errorMessage) {
this.errorMessage = errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = JsonNullable.of(errorMessage);
}
public LockedExternalTaskDto errorDetails(String errorDetails) {
this.errorDetails = JsonNullable.of(errorDetails);
return this;
}
/**
* The error details submitted with the latest reported failure executing this task.`null` if no failure was reported previously or if no error details was submitted
* @return errorDetails
**/
@javax.annotation.Nullable
@JsonIgnore
public String getErrorDetails() {
return errorDetails.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ERROR_DETAILS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getErrorDetails_JsonNullable() {
return errorDetails;
}
@JsonProperty(JSON_PROPERTY_ERROR_DETAILS)
public void setErrorDetails_JsonNullable(JsonNullable errorDetails) {
this.errorDetails = errorDetails;
}
public void setErrorDetails(String errorDetails) {
this.errorDetails = JsonNullable.of(errorDetails);
}
public LockedExternalTaskDto executionId(String executionId) {
this.executionId = JsonNullable.of(executionId);
return this;
}
/**
* The id of the execution that the external task belongs to.
* @return executionId
**/
@javax.annotation.Nullable
@JsonIgnore
public String getExecutionId() {
return executionId.orElse(null);
}
@JsonProperty(JSON_PROPERTY_EXECUTION_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getExecutionId_JsonNullable() {
return executionId;
}
@JsonProperty(JSON_PROPERTY_EXECUTION_ID)
public void setExecutionId_JsonNullable(JsonNullable executionId) {
this.executionId = executionId;
}
public void setExecutionId(String executionId) {
this.executionId = JsonNullable.of(executionId);
}
public LockedExternalTaskDto id(String id) {
this.id = JsonNullable.of(id);
return this;
}
/**
* The id of the external task.
* @return id
**/
@javax.annotation.Nullable
@JsonIgnore
public String getId() {
return id.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getId_JsonNullable() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
public void setId_JsonNullable(JsonNullable id) {
this.id = id;
}
public void setId(String id) {
this.id = JsonNullable.of(id);
}
public LockedExternalTaskDto lockExpirationTime(OffsetDateTime lockExpirationTime) {
this.lockExpirationTime = JsonNullable.of(lockExpirationTime);
return this;
}
/**
* The date that the task's most recent lock expires or has expired.
* @return lockExpirationTime
**/
@javax.annotation.Nullable
@JsonIgnore
public OffsetDateTime getLockExpirationTime() {
return lockExpirationTime.orElse(null);
}
@JsonProperty(JSON_PROPERTY_LOCK_EXPIRATION_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getLockExpirationTime_JsonNullable() {
return lockExpirationTime;
}
@JsonProperty(JSON_PROPERTY_LOCK_EXPIRATION_TIME)
public void setLockExpirationTime_JsonNullable(JsonNullable lockExpirationTime) {
this.lockExpirationTime = lockExpirationTime;
}
public void setLockExpirationTime(OffsetDateTime lockExpirationTime) {
this.lockExpirationTime = JsonNullable.of(lockExpirationTime);
}
public LockedExternalTaskDto processDefinitionId(String processDefinitionId) {
this.processDefinitionId = JsonNullable.of(processDefinitionId);
return this;
}
/**
* The id of the process definition the external task is defined in.
* @return processDefinitionId
**/
@javax.annotation.Nullable
@JsonIgnore
public String getProcessDefinitionId() {
return processDefinitionId.orElse(null);
}
@JsonProperty(JSON_PROPERTY_PROCESS_DEFINITION_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getProcessDefinitionId_JsonNullable() {
return processDefinitionId;
}
@JsonProperty(JSON_PROPERTY_PROCESS_DEFINITION_ID)
public void setProcessDefinitionId_JsonNullable(JsonNullable processDefinitionId) {
this.processDefinitionId = processDefinitionId;
}
public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = JsonNullable.of(processDefinitionId);
}
public LockedExternalTaskDto processDefinitionKey(String processDefinitionKey) {
this.processDefinitionKey = JsonNullable.of(processDefinitionKey);
return this;
}
/**
* The key of the process definition the external task is defined in.
* @return processDefinitionKey
**/
@javax.annotation.Nullable
@JsonIgnore
public String getProcessDefinitionKey() {
return processDefinitionKey.orElse(null);
}
@JsonProperty(JSON_PROPERTY_PROCESS_DEFINITION_KEY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getProcessDefinitionKey_JsonNullable() {
return processDefinitionKey;
}
@JsonProperty(JSON_PROPERTY_PROCESS_DEFINITION_KEY)
public void setProcessDefinitionKey_JsonNullable(JsonNullable processDefinitionKey) {
this.processDefinitionKey = processDefinitionKey;
}
public void setProcessDefinitionKey(String processDefinitionKey) {
this.processDefinitionKey = JsonNullable.of(processDefinitionKey);
}
public LockedExternalTaskDto processDefinitionVersionTag(String processDefinitionVersionTag) {
this.processDefinitionVersionTag = JsonNullable.of(processDefinitionVersionTag);
return this;
}
/**
* The version tag of the process definition the external task is defined in.
* @return processDefinitionVersionTag
**/
@javax.annotation.Nullable
@JsonIgnore
public String getProcessDefinitionVersionTag() {
return processDefinitionVersionTag.orElse(null);
}
@JsonProperty(JSON_PROPERTY_PROCESS_DEFINITION_VERSION_TAG)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getProcessDefinitionVersionTag_JsonNullable() {
return processDefinitionVersionTag;
}
@JsonProperty(JSON_PROPERTY_PROCESS_DEFINITION_VERSION_TAG)
public void setProcessDefinitionVersionTag_JsonNullable(JsonNullable processDefinitionVersionTag) {
this.processDefinitionVersionTag = processDefinitionVersionTag;
}
public void setProcessDefinitionVersionTag(String processDefinitionVersionTag) {
this.processDefinitionVersionTag = JsonNullable.of(processDefinitionVersionTag);
}
public LockedExternalTaskDto processInstanceId(String processInstanceId) {
this.processInstanceId = JsonNullable.of(processInstanceId);
return this;
}
/**
* The id of the process instance the external task belongs to.
* @return processInstanceId
**/
@javax.annotation.Nullable
@JsonIgnore
public String getProcessInstanceId() {
return processInstanceId.orElse(null);
}
@JsonProperty(JSON_PROPERTY_PROCESS_INSTANCE_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getProcessInstanceId_JsonNullable() {
return processInstanceId;
}
@JsonProperty(JSON_PROPERTY_PROCESS_INSTANCE_ID)
public void setProcessInstanceId_JsonNullable(JsonNullable processInstanceId) {
this.processInstanceId = processInstanceId;
}
public void setProcessInstanceId(String processInstanceId) {
this.processInstanceId = JsonNullable.of(processInstanceId);
}
public LockedExternalTaskDto tenantId(String tenantId) {
this.tenantId = JsonNullable.of(tenantId);
return this;
}
/**
* The id of the tenant the external task belongs to.
* @return tenantId
**/
@javax.annotation.Nullable
@JsonIgnore
public String getTenantId() {
return tenantId.orElse(null);
}
@JsonProperty(JSON_PROPERTY_TENANT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getTenantId_JsonNullable() {
return tenantId;
}
@JsonProperty(JSON_PROPERTY_TENANT_ID)
public void setTenantId_JsonNullable(JsonNullable tenantId) {
this.tenantId = tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = JsonNullable.of(tenantId);
}
public LockedExternalTaskDto retries(Integer retries) {
this.retries = JsonNullable.of(retries);
return this;
}
/**
* The number of retries the task currently has left.
* @return retries
**/
@javax.annotation.Nullable
@JsonIgnore
public Integer getRetries() {
return retries.orElse(null);
}
@JsonProperty(JSON_PROPERTY_RETRIES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getRetries_JsonNullable() {
return retries;
}
@JsonProperty(JSON_PROPERTY_RETRIES)
public void setRetries_JsonNullable(JsonNullable retries) {
this.retries = retries;
}
public void setRetries(Integer retries) {
this.retries = JsonNullable.of(retries);
}
public LockedExternalTaskDto suspended(Boolean suspended) {
this.suspended = JsonNullable.of(suspended);
return this;
}
/**
* Whether the process instance the external task belongs to is suspended.
* @return suspended
**/
@javax.annotation.Nullable
@JsonIgnore
public Boolean getSuspended() {
return suspended.orElse(null);
}
@JsonProperty(JSON_PROPERTY_SUSPENDED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getSuspended_JsonNullable() {
return suspended;
}
@JsonProperty(JSON_PROPERTY_SUSPENDED)
public void setSuspended_JsonNullable(JsonNullable suspended) {
this.suspended = suspended;
}
public void setSuspended(Boolean suspended) {
this.suspended = JsonNullable.of(suspended);
}
public LockedExternalTaskDto workerId(String workerId) {
this.workerId = JsonNullable.of(workerId);
return this;
}
/**
* The id of the worker that posesses or posessed the most recent lock.
* @return workerId
**/
@javax.annotation.Nullable
@JsonIgnore
public String getWorkerId() {
return workerId.orElse(null);
}
@JsonProperty(JSON_PROPERTY_WORKER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getWorkerId_JsonNullable() {
return workerId;
}
@JsonProperty(JSON_PROPERTY_WORKER_ID)
public void setWorkerId_JsonNullable(JsonNullable workerId) {
this.workerId = workerId;
}
public void setWorkerId(String workerId) {
this.workerId = JsonNullable.of(workerId);
}
public LockedExternalTaskDto priority(Long priority) {
this.priority = JsonNullable.of(priority);
return this;
}
/**
* The priority of the external task.
* @return priority
**/
@javax.annotation.Nullable
@JsonIgnore
public Long getPriority() {
return priority.orElse(null);
}
@JsonProperty(JSON_PROPERTY_PRIORITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getPriority_JsonNullable() {
return priority;
}
@JsonProperty(JSON_PROPERTY_PRIORITY)
public void setPriority_JsonNullable(JsonNullable priority) {
this.priority = priority;
}
public void setPriority(Long priority) {
this.priority = JsonNullable.of(priority);
}
public LockedExternalTaskDto topicName(String topicName) {
this.topicName = JsonNullable.of(topicName);
return this;
}
/**
* The topic name of the external task.
* @return topicName
**/
@javax.annotation.Nullable
@JsonIgnore
public String getTopicName() {
return topicName.orElse(null);
}
@JsonProperty(JSON_PROPERTY_TOPIC_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getTopicName_JsonNullable() {
return topicName;
}
@JsonProperty(JSON_PROPERTY_TOPIC_NAME)
public void setTopicName_JsonNullable(JsonNullable topicName) {
this.topicName = topicName;
}
public void setTopicName(String topicName) {
this.topicName = JsonNullable.of(topicName);
}
public LockedExternalTaskDto businessKey(String businessKey) {
this.businessKey = JsonNullable.of(businessKey);
return this;
}
/**
* The business key of the process instance the external task belongs to.
* @return businessKey
**/
@javax.annotation.Nullable
@JsonIgnore
public String getBusinessKey() {
return businessKey.orElse(null);
}
@JsonProperty(JSON_PROPERTY_BUSINESS_KEY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getBusinessKey_JsonNullable() {
return businessKey;
}
@JsonProperty(JSON_PROPERTY_BUSINESS_KEY)
public void setBusinessKey_JsonNullable(JsonNullable businessKey) {
this.businessKey = businessKey;
}
public void setBusinessKey(String businessKey) {
this.businessKey = JsonNullable.of(businessKey);
}
public LockedExternalTaskDto variables(Map variables) {
this.variables = JsonNullable.>of(variables);
return this;
}
public LockedExternalTaskDto putVariablesItem(String key, VariableValueDto variablesItem) {
if (this.variables == null || !this.variables.isPresent()) {
this.variables = JsonNullable.>of(new HashMap<>());
}
try {
this.variables.get().put(key, variablesItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* A JSON object containing a property for each of the requested variables. The key is the variable name, the value is a JSON object of serialized variable values with the following properties:
* @return variables
**/
@javax.annotation.Nullable
@JsonIgnore
public Map getVariables() {
return variables.orElse(null);
}
@JsonProperty(JSON_PROPERTY_VARIABLES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getVariables_JsonNullable() {
return variables;
}
@JsonProperty(JSON_PROPERTY_VARIABLES)
public void setVariables_JsonNullable(JsonNullable> variables) {
this.variables = variables;
}
public void setVariables(Map variables) {
this.variables = JsonNullable.>of(variables);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
LockedExternalTaskDto lockedExternalTaskDto = (LockedExternalTaskDto) o;
return equalsNullable(this.activityId, lockedExternalTaskDto.activityId) &&
equalsNullable(this.activityInstanceId, lockedExternalTaskDto.activityInstanceId) &&
equalsNullable(this.errorMessage, lockedExternalTaskDto.errorMessage) &&
equalsNullable(this.errorDetails, lockedExternalTaskDto.errorDetails) &&
equalsNullable(this.executionId, lockedExternalTaskDto.executionId) &&
equalsNullable(this.id, lockedExternalTaskDto.id) &&
equalsNullable(this.lockExpirationTime, lockedExternalTaskDto.lockExpirationTime) &&
equalsNullable(this.processDefinitionId, lockedExternalTaskDto.processDefinitionId) &&
equalsNullable(this.processDefinitionKey, lockedExternalTaskDto.processDefinitionKey) &&
equalsNullable(this.processDefinitionVersionTag, lockedExternalTaskDto.processDefinitionVersionTag) &&
equalsNullable(this.processInstanceId, lockedExternalTaskDto.processInstanceId) &&
equalsNullable(this.tenantId, lockedExternalTaskDto.tenantId) &&
equalsNullable(this.retries, lockedExternalTaskDto.retries) &&
equalsNullable(this.suspended, lockedExternalTaskDto.suspended) &&
equalsNullable(this.workerId, lockedExternalTaskDto.workerId) &&
equalsNullable(this.priority, lockedExternalTaskDto.priority) &&
equalsNullable(this.topicName, lockedExternalTaskDto.topicName) &&
equalsNullable(this.businessKey, lockedExternalTaskDto.businessKey) &&
equalsNullable(this.variables, lockedExternalTaskDto.variables);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}
@Override
public int hashCode() {
return Objects.hash(hashCodeNullable(activityId), hashCodeNullable(activityInstanceId), hashCodeNullable(errorMessage), hashCodeNullable(errorDetails), hashCodeNullable(executionId), hashCodeNullable(id), hashCodeNullable(lockExpirationTime), hashCodeNullable(processDefinitionId), hashCodeNullable(processDefinitionKey), hashCodeNullable(processDefinitionVersionTag), hashCodeNullable(processInstanceId), hashCodeNullable(tenantId), hashCodeNullable(retries), hashCodeNullable(suspended), hashCodeNullable(workerId), hashCodeNullable(priority), hashCodeNullable(topicName), hashCodeNullable(businessKey), hashCodeNullable(variables));
}
private static int hashCodeNullable(JsonNullable a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class LockedExternalTaskDto {\n");
sb.append(" activityId: ").append(toIndentedString(activityId)).append("\n");
sb.append(" activityInstanceId: ").append(toIndentedString(activityInstanceId)).append("\n");
sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n");
sb.append(" errorDetails: ").append(toIndentedString(errorDetails)).append("\n");
sb.append(" executionId: ").append(toIndentedString(executionId)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" lockExpirationTime: ").append(toIndentedString(lockExpirationTime)).append("\n");
sb.append(" processDefinitionId: ").append(toIndentedString(processDefinitionId)).append("\n");
sb.append(" processDefinitionKey: ").append(toIndentedString(processDefinitionKey)).append("\n");
sb.append(" processDefinitionVersionTag: ").append(toIndentedString(processDefinitionVersionTag)).append("\n");
sb.append(" processInstanceId: ").append(toIndentedString(processInstanceId)).append("\n");
sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n");
sb.append(" retries: ").append(toIndentedString(retries)).append("\n");
sb.append(" suspended: ").append(toIndentedString(suspended)).append("\n");
sb.append(" workerId: ").append(toIndentedString(workerId)).append("\n");
sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
sb.append(" topicName: ").append(toIndentedString(topicName)).append("\n");
sb.append(" businessKey: ").append(toIndentedString(businessKey)).append("\n");
sb.append(" variables: ").append(toIndentedString(variables)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* Convert the instance into URL query string.
*
* @return URL query string
*/
public String toUrlQueryString() {
return toUrlQueryString(null);
}
/**
* Convert the instance into URL query string.
*
* @param prefix prefix of the query string
* @return URL query string
*/
public String toUrlQueryString(String prefix) {
String suffix = "";
String containerSuffix = "";
String containerPrefix = "";
if (prefix == null) {
// style=form, explode=true, e.g. /pet?name=cat&type=manx
prefix = "";
} else {
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
prefix = prefix + "[";
suffix = "]";
containerSuffix = "]";
containerPrefix = "[";
}
StringJoiner joiner = new StringJoiner("&");
// add `activityId` to the URL query string
if (getActivityId() != null) {
try {
joiner.add(String.format("%sactivityId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActivityId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `activityInstanceId` to the URL query string
if (getActivityInstanceId() != null) {
try {
joiner.add(String.format("%sactivityInstanceId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActivityInstanceId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `errorMessage` to the URL query string
if (getErrorMessage() != null) {
try {
joiner.add(String.format("%serrorMessage%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getErrorMessage()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `errorDetails` to the URL query string
if (getErrorDetails() != null) {
try {
joiner.add(String.format("%serrorDetails%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getErrorDetails()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `executionId` to the URL query string
if (getExecutionId() != null) {
try {
joiner.add(String.format("%sexecutionId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getExecutionId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `id` to the URL query string
if (getId() != null) {
try {
joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `lockExpirationTime` to the URL query string
if (getLockExpirationTime() != null) {
try {
joiner.add(String.format("%slockExpirationTime%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLockExpirationTime()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `processDefinitionId` to the URL query string
if (getProcessDefinitionId() != null) {
try {
joiner.add(String.format("%sprocessDefinitionId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getProcessDefinitionId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `processDefinitionKey` to the URL query string
if (getProcessDefinitionKey() != null) {
try {
joiner.add(String.format("%sprocessDefinitionKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getProcessDefinitionKey()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `processDefinitionVersionTag` to the URL query string
if (getProcessDefinitionVersionTag() != null) {
try {
joiner.add(String.format("%sprocessDefinitionVersionTag%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getProcessDefinitionVersionTag()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `processInstanceId` to the URL query string
if (getProcessInstanceId() != null) {
try {
joiner.add(String.format("%sprocessInstanceId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getProcessInstanceId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `tenantId` to the URL query string
if (getTenantId() != null) {
try {
joiner.add(String.format("%stenantId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTenantId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `retries` to the URL query string
if (getRetries() != null) {
try {
joiner.add(String.format("%sretries%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRetries()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `suspended` to the URL query string
if (getSuspended() != null) {
try {
joiner.add(String.format("%ssuspended%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSuspended()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `workerId` to the URL query string
if (getWorkerId() != null) {
try {
joiner.add(String.format("%sworkerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getWorkerId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `priority` to the URL query string
if (getPriority() != null) {
try {
joiner.add(String.format("%spriority%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPriority()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `topicName` to the URL query string
if (getTopicName() != null) {
try {
joiner.add(String.format("%stopicName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTopicName()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `businessKey` to the URL query string
if (getBusinessKey() != null) {
try {
joiner.add(String.format("%sbusinessKey%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBusinessKey()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `variables` to the URL query string
if (getVariables() != null) {
for (String _key : getVariables().keySet()) {
if (getVariables().get(_key) != null) {
joiner.add(getVariables().get(_key).toUrlQueryString(String.format("%svariables%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix))));
}
}
}
return joiner.toString();
}
}