
org.camunda.community.rest.client.dto.FetchExternalTaskTopicDto Maven / Gradle / Ivy
The newest version!
/*
* 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.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
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;
/**
* FetchExternalTaskTopicDto
*/
@JsonPropertyOrder({
FetchExternalTaskTopicDto.JSON_PROPERTY_TOPIC_NAME,
FetchExternalTaskTopicDto.JSON_PROPERTY_LOCK_DURATION,
FetchExternalTaskTopicDto.JSON_PROPERTY_VARIABLES,
FetchExternalTaskTopicDto.JSON_PROPERTY_LOCAL_VARIABLES,
FetchExternalTaskTopicDto.JSON_PROPERTY_BUSINESS_KEY,
FetchExternalTaskTopicDto.JSON_PROPERTY_PROCESS_DEFINITION_ID,
FetchExternalTaskTopicDto.JSON_PROPERTY_PROCESS_DEFINITION_ID_IN,
FetchExternalTaskTopicDto.JSON_PROPERTY_PROCESS_DEFINITION_KEY,
FetchExternalTaskTopicDto.JSON_PROPERTY_PROCESS_DEFINITION_KEY_IN,
FetchExternalTaskTopicDto.JSON_PROPERTY_PROCESS_DEFINITION_VERSION_TAG,
FetchExternalTaskTopicDto.JSON_PROPERTY_WITHOUT_TENANT_ID,
FetchExternalTaskTopicDto.JSON_PROPERTY_TENANT_ID_IN,
FetchExternalTaskTopicDto.JSON_PROPERTY_PROCESS_VARIABLES,
FetchExternalTaskTopicDto.JSON_PROPERTY_DESERIALIZE_VALUES,
FetchExternalTaskTopicDto.JSON_PROPERTY_INCLUDE_EXTENSION_PROPERTIES
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-06-27T13:50:23.655629899Z[Etc/UTC]")
public class FetchExternalTaskTopicDto {
public static final String JSON_PROPERTY_TOPIC_NAME = "topicName";
private String topicName;
public static final String JSON_PROPERTY_LOCK_DURATION = "lockDuration";
private Long lockDuration;
public static final String JSON_PROPERTY_VARIABLES = "variables";
private JsonNullable> variables = JsonNullable.>undefined();
public static final String JSON_PROPERTY_LOCAL_VARIABLES = "localVariables";
private JsonNullable localVariables = JsonNullable.of(false);
public static final String JSON_PROPERTY_BUSINESS_KEY = "businessKey";
private JsonNullable businessKey = 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_ID_IN = "processDefinitionIdIn";
private JsonNullable> processDefinitionIdIn = 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_KEY_IN = "processDefinitionKeyIn";
private JsonNullable> processDefinitionKeyIn = JsonNullable.>undefined();
public static final String JSON_PROPERTY_PROCESS_DEFINITION_VERSION_TAG = "processDefinitionVersionTag";
private JsonNullable processDefinitionVersionTag = JsonNullable.undefined();
public static final String JSON_PROPERTY_WITHOUT_TENANT_ID = "withoutTenantId";
private JsonNullable withoutTenantId = JsonNullable.of(false);
public static final String JSON_PROPERTY_TENANT_ID_IN = "tenantIdIn";
private JsonNullable> tenantIdIn = JsonNullable.>undefined();
public static final String JSON_PROPERTY_PROCESS_VARIABLES = "processVariables";
private Map processVariables = new HashMap<>();
public static final String JSON_PROPERTY_DESERIALIZE_VALUES = "deserializeValues";
private JsonNullable deserializeValues = JsonNullable.of(false);
public static final String JSON_PROPERTY_INCLUDE_EXTENSION_PROPERTIES = "includeExtensionProperties";
private JsonNullable includeExtensionProperties = JsonNullable.of(false);
public FetchExternalTaskTopicDto() {
}
public FetchExternalTaskTopicDto topicName(String topicName) {
this.topicName = topicName;
return this;
}
/**
* **Mandatory.** The topic's name.
* @return topicName
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TOPIC_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getTopicName() {
return topicName;
}
@JsonProperty(JSON_PROPERTY_TOPIC_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTopicName(String topicName) {
this.topicName = topicName;
}
public FetchExternalTaskTopicDto lockDuration(Long lockDuration) {
this.lockDuration = lockDuration;
return this;
}
/**
* **Mandatory.** The duration to lock the external tasks for in milliseconds.
* @return lockDuration
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_LOCK_DURATION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Long getLockDuration() {
return lockDuration;
}
@JsonProperty(JSON_PROPERTY_LOCK_DURATION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setLockDuration(Long lockDuration) {
this.lockDuration = lockDuration;
}
public FetchExternalTaskTopicDto variables(List variables) {
this.variables = JsonNullable.>of(variables);
return this;
}
public FetchExternalTaskTopicDto addVariablesItem(String variablesItem) {
if (this.variables == null || !this.variables.isPresent()) {
this.variables = JsonNullable.>of(new ArrayList<>());
}
try {
this.variables.get().add(variablesItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* A JSON array of `String` values that represent variable names. For each result task belonging to this topic, the given variables are returned as well if they are accessible from the external task's execution. If not provided - all variables will be fetched.
* @return variables
**/
@javax.annotation.Nullable
@JsonIgnore
public List 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(List variables) {
this.variables = JsonNullable.>of(variables);
}
public FetchExternalTaskTopicDto localVariables(Boolean localVariables) {
this.localVariables = JsonNullable.of(localVariables);
return this;
}
/**
* If `true` only local variables will be fetched.
* @return localVariables
**/
@javax.annotation.Nullable
@JsonIgnore
public Boolean getLocalVariables() {
return localVariables.orElse(null);
}
@JsonProperty(JSON_PROPERTY_LOCAL_VARIABLES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getLocalVariables_JsonNullable() {
return localVariables;
}
@JsonProperty(JSON_PROPERTY_LOCAL_VARIABLES)
public void setLocalVariables_JsonNullable(JsonNullable localVariables) {
this.localVariables = localVariables;
}
public void setLocalVariables(Boolean localVariables) {
this.localVariables = JsonNullable.of(localVariables);
}
public FetchExternalTaskTopicDto businessKey(String businessKey) {
this.businessKey = JsonNullable.of(businessKey);
return this;
}
/**
* A `String` value which enables the filtering of tasks based on process instance business key.
* @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 FetchExternalTaskTopicDto processDefinitionId(String processDefinitionId) {
this.processDefinitionId = JsonNullable.of(processDefinitionId);
return this;
}
/**
* Filter tasks based on process definition id.
* @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 FetchExternalTaskTopicDto processDefinitionIdIn(List processDefinitionIdIn) {
this.processDefinitionIdIn = JsonNullable.>of(processDefinitionIdIn);
return this;
}
public FetchExternalTaskTopicDto addProcessDefinitionIdInItem(String processDefinitionIdInItem) {
if (this.processDefinitionIdIn == null || !this.processDefinitionIdIn.isPresent()) {
this.processDefinitionIdIn = JsonNullable.>of(new ArrayList<>());
}
try {
this.processDefinitionIdIn.get().add(processDefinitionIdInItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Filter tasks based on process definition ids.
* @return processDefinitionIdIn
**/
@javax.annotation.Nullable
@JsonIgnore
public List getProcessDefinitionIdIn() {
return processDefinitionIdIn.orElse(null);
}
@JsonProperty(JSON_PROPERTY_PROCESS_DEFINITION_ID_IN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getProcessDefinitionIdIn_JsonNullable() {
return processDefinitionIdIn;
}
@JsonProperty(JSON_PROPERTY_PROCESS_DEFINITION_ID_IN)
public void setProcessDefinitionIdIn_JsonNullable(JsonNullable> processDefinitionIdIn) {
this.processDefinitionIdIn = processDefinitionIdIn;
}
public void setProcessDefinitionIdIn(List processDefinitionIdIn) {
this.processDefinitionIdIn = JsonNullable.>of(processDefinitionIdIn);
}
public FetchExternalTaskTopicDto processDefinitionKey(String processDefinitionKey) {
this.processDefinitionKey = JsonNullable.of(processDefinitionKey);
return this;
}
/**
* Filter tasks based on process definition key.
* @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 FetchExternalTaskTopicDto processDefinitionKeyIn(List processDefinitionKeyIn) {
this.processDefinitionKeyIn = JsonNullable.>of(processDefinitionKeyIn);
return this;
}
public FetchExternalTaskTopicDto addProcessDefinitionKeyInItem(String processDefinitionKeyInItem) {
if (this.processDefinitionKeyIn == null || !this.processDefinitionKeyIn.isPresent()) {
this.processDefinitionKeyIn = JsonNullable.>of(new ArrayList<>());
}
try {
this.processDefinitionKeyIn.get().add(processDefinitionKeyInItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Filter tasks based on process definition keys.
* @return processDefinitionKeyIn
**/
@javax.annotation.Nullable
@JsonIgnore
public List getProcessDefinitionKeyIn() {
return processDefinitionKeyIn.orElse(null);
}
@JsonProperty(JSON_PROPERTY_PROCESS_DEFINITION_KEY_IN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getProcessDefinitionKeyIn_JsonNullable() {
return processDefinitionKeyIn;
}
@JsonProperty(JSON_PROPERTY_PROCESS_DEFINITION_KEY_IN)
public void setProcessDefinitionKeyIn_JsonNullable(JsonNullable> processDefinitionKeyIn) {
this.processDefinitionKeyIn = processDefinitionKeyIn;
}
public void setProcessDefinitionKeyIn(List processDefinitionKeyIn) {
this.processDefinitionKeyIn = JsonNullable.>of(processDefinitionKeyIn);
}
public FetchExternalTaskTopicDto processDefinitionVersionTag(String processDefinitionVersionTag) {
this.processDefinitionVersionTag = JsonNullable.of(processDefinitionVersionTag);
return this;
}
/**
* Filter tasks based on process definition version tag.
* @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 FetchExternalTaskTopicDto withoutTenantId(Boolean withoutTenantId) {
this.withoutTenantId = JsonNullable.of(withoutTenantId);
return this;
}
/**
* Filter tasks without tenant id.
* @return withoutTenantId
**/
@javax.annotation.Nullable
@JsonIgnore
public Boolean getWithoutTenantId() {
return withoutTenantId.orElse(null);
}
@JsonProperty(JSON_PROPERTY_WITHOUT_TENANT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getWithoutTenantId_JsonNullable() {
return withoutTenantId;
}
@JsonProperty(JSON_PROPERTY_WITHOUT_TENANT_ID)
public void setWithoutTenantId_JsonNullable(JsonNullable withoutTenantId) {
this.withoutTenantId = withoutTenantId;
}
public void setWithoutTenantId(Boolean withoutTenantId) {
this.withoutTenantId = JsonNullable.of(withoutTenantId);
}
public FetchExternalTaskTopicDto tenantIdIn(List tenantIdIn) {
this.tenantIdIn = JsonNullable.>of(tenantIdIn);
return this;
}
public FetchExternalTaskTopicDto addTenantIdInItem(String tenantIdInItem) {
if (this.tenantIdIn == null || !this.tenantIdIn.isPresent()) {
this.tenantIdIn = JsonNullable.>of(new ArrayList<>());
}
try {
this.tenantIdIn.get().add(tenantIdInItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Filter tasks based on tenant ids.
* @return tenantIdIn
**/
@javax.annotation.Nullable
@JsonIgnore
public List getTenantIdIn() {
return tenantIdIn.orElse(null);
}
@JsonProperty(JSON_PROPERTY_TENANT_ID_IN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getTenantIdIn_JsonNullable() {
return tenantIdIn;
}
@JsonProperty(JSON_PROPERTY_TENANT_ID_IN)
public void setTenantIdIn_JsonNullable(JsonNullable> tenantIdIn) {
this.tenantIdIn = tenantIdIn;
}
public void setTenantIdIn(List tenantIdIn) {
this.tenantIdIn = JsonNullable.>of(tenantIdIn);
}
public FetchExternalTaskTopicDto processVariables(Map processVariables) {
this.processVariables = processVariables;
return this;
}
public FetchExternalTaskTopicDto putProcessVariablesItem(String key, Object processVariablesItem) {
if (this.processVariables == null) {
this.processVariables = new HashMap<>();
}
this.processVariables.put(key, processVariablesItem);
return this;
}
/**
* A `JSON` object used for filtering tasks based on process instance variable values. A property name of the object represents a process variable name, while the property value represents the process variable value to filter tasks by.
* @return processVariables
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PROCESS_VARIABLES)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public Map getProcessVariables() {
return processVariables;
}
@JsonProperty(JSON_PROPERTY_PROCESS_VARIABLES)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public void setProcessVariables(Map processVariables) {
this.processVariables = processVariables;
}
public FetchExternalTaskTopicDto deserializeValues(Boolean deserializeValues) {
this.deserializeValues = JsonNullable.of(deserializeValues);
return this;
}
/**
* Determines whether serializable variable values (typically variables that store custom Java objects) should be deserialized on server side (default `false`). If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. Note that this requires the Java classes of the variable value to be on the REST API's classpath. If set to `false`, a serializable variable will be returned in its serialized format. For example, a variable that is serialized as XML will be returned as a JSON string containing XML.
* @return deserializeValues
**/
@javax.annotation.Nullable
@JsonIgnore
public Boolean getDeserializeValues() {
return deserializeValues.orElse(null);
}
@JsonProperty(JSON_PROPERTY_DESERIALIZE_VALUES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getDeserializeValues_JsonNullable() {
return deserializeValues;
}
@JsonProperty(JSON_PROPERTY_DESERIALIZE_VALUES)
public void setDeserializeValues_JsonNullable(JsonNullable deserializeValues) {
this.deserializeValues = deserializeValues;
}
public void setDeserializeValues(Boolean deserializeValues) {
this.deserializeValues = JsonNullable.of(deserializeValues);
}
public FetchExternalTaskTopicDto includeExtensionProperties(Boolean includeExtensionProperties) {
this.includeExtensionProperties = JsonNullable.of(includeExtensionProperties);
return this;
}
/**
* Determines whether custom extension properties defined in the BPMN activity of the external task (e.g. via the Extensions tab in the Camunda modeler) should be included in the response. Default: false
* @return includeExtensionProperties
**/
@javax.annotation.Nullable
@JsonIgnore
public Boolean getIncludeExtensionProperties() {
return includeExtensionProperties.orElse(null);
}
@JsonProperty(JSON_PROPERTY_INCLUDE_EXTENSION_PROPERTIES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getIncludeExtensionProperties_JsonNullable() {
return includeExtensionProperties;
}
@JsonProperty(JSON_PROPERTY_INCLUDE_EXTENSION_PROPERTIES)
public void setIncludeExtensionProperties_JsonNullable(JsonNullable includeExtensionProperties) {
this.includeExtensionProperties = includeExtensionProperties;
}
public void setIncludeExtensionProperties(Boolean includeExtensionProperties) {
this.includeExtensionProperties = JsonNullable.of(includeExtensionProperties);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FetchExternalTaskTopicDto fetchExternalTaskTopicDto = (FetchExternalTaskTopicDto) o;
return Objects.equals(this.topicName, fetchExternalTaskTopicDto.topicName) &&
Objects.equals(this.lockDuration, fetchExternalTaskTopicDto.lockDuration) &&
equalsNullable(this.variables, fetchExternalTaskTopicDto.variables) &&
equalsNullable(this.localVariables, fetchExternalTaskTopicDto.localVariables) &&
equalsNullable(this.businessKey, fetchExternalTaskTopicDto.businessKey) &&
equalsNullable(this.processDefinitionId, fetchExternalTaskTopicDto.processDefinitionId) &&
equalsNullable(this.processDefinitionIdIn, fetchExternalTaskTopicDto.processDefinitionIdIn) &&
equalsNullable(this.processDefinitionKey, fetchExternalTaskTopicDto.processDefinitionKey) &&
equalsNullable(this.processDefinitionKeyIn, fetchExternalTaskTopicDto.processDefinitionKeyIn) &&
equalsNullable(this.processDefinitionVersionTag, fetchExternalTaskTopicDto.processDefinitionVersionTag) &&
equalsNullable(this.withoutTenantId, fetchExternalTaskTopicDto.withoutTenantId) &&
equalsNullable(this.tenantIdIn, fetchExternalTaskTopicDto.tenantIdIn) &&
Objects.equals(this.processVariables, fetchExternalTaskTopicDto.processVariables) &&
equalsNullable(this.deserializeValues, fetchExternalTaskTopicDto.deserializeValues) &&
equalsNullable(this.includeExtensionProperties, fetchExternalTaskTopicDto.includeExtensionProperties);
}
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(topicName, lockDuration, hashCodeNullable(variables), hashCodeNullable(localVariables), hashCodeNullable(businessKey), hashCodeNullable(processDefinitionId), hashCodeNullable(processDefinitionIdIn), hashCodeNullable(processDefinitionKey), hashCodeNullable(processDefinitionKeyIn), hashCodeNullable(processDefinitionVersionTag), hashCodeNullable(withoutTenantId), hashCodeNullable(tenantIdIn), processVariables, hashCodeNullable(deserializeValues), hashCodeNullable(includeExtensionProperties));
}
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 FetchExternalTaskTopicDto {\n");
sb.append(" topicName: ").append(toIndentedString(topicName)).append("\n");
sb.append(" lockDuration: ").append(toIndentedString(lockDuration)).append("\n");
sb.append(" variables: ").append(toIndentedString(variables)).append("\n");
sb.append(" localVariables: ").append(toIndentedString(localVariables)).append("\n");
sb.append(" businessKey: ").append(toIndentedString(businessKey)).append("\n");
sb.append(" processDefinitionId: ").append(toIndentedString(processDefinitionId)).append("\n");
sb.append(" processDefinitionIdIn: ").append(toIndentedString(processDefinitionIdIn)).append("\n");
sb.append(" processDefinitionKey: ").append(toIndentedString(processDefinitionKey)).append("\n");
sb.append(" processDefinitionKeyIn: ").append(toIndentedString(processDefinitionKeyIn)).append("\n");
sb.append(" processDefinitionVersionTag: ").append(toIndentedString(processDefinitionVersionTag)).append("\n");
sb.append(" withoutTenantId: ").append(toIndentedString(withoutTenantId)).append("\n");
sb.append(" tenantIdIn: ").append(toIndentedString(tenantIdIn)).append("\n");
sb.append(" processVariables: ").append(toIndentedString(processVariables)).append("\n");
sb.append(" deserializeValues: ").append(toIndentedString(deserializeValues)).append("\n");
sb.append(" includeExtensionProperties: ").append(toIndentedString(includeExtensionProperties)).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 `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 `lockDuration` to the URL query string
if (getLockDuration() != null) {
try {
joiner.add(String.format("%slockDuration%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLockDuration()), "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 (int i = 0; i < getVariables().size(); i++) {
try {
joiner.add(String.format("%svariables%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getVariables().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
// add `localVariables` to the URL query string
if (getLocalVariables() != null) {
try {
joiner.add(String.format("%slocalVariables%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLocalVariables()), "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 `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 `processDefinitionIdIn` to the URL query string
if (getProcessDefinitionIdIn() != null) {
for (int i = 0; i < getProcessDefinitionIdIn().size(); i++) {
try {
joiner.add(String.format("%sprocessDefinitionIdIn%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getProcessDefinitionIdIn().get(i)), "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 `processDefinitionKeyIn` to the URL query string
if (getProcessDefinitionKeyIn() != null) {
for (int i = 0; i < getProcessDefinitionKeyIn().size(); i++) {
try {
joiner.add(String.format("%sprocessDefinitionKeyIn%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getProcessDefinitionKeyIn().get(i)), "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 `withoutTenantId` to the URL query string
if (getWithoutTenantId() != null) {
try {
joiner.add(String.format("%swithoutTenantId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getWithoutTenantId()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `tenantIdIn` to the URL query string
if (getTenantIdIn() != null) {
for (int i = 0; i < getTenantIdIn().size(); i++) {
try {
joiner.add(String.format("%stenantIdIn%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getTenantIdIn().get(i)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
// add `processVariables` to the URL query string
if (getProcessVariables() != null) {
for (String _key : getProcessVariables().keySet()) {
try {
joiner.add(String.format("%sprocessVariables%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix),
getProcessVariables().get(_key), URLEncoder.encode(String.valueOf(getProcessVariables().get(_key)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
// add `deserializeValues` to the URL query string
if (getDeserializeValues() != null) {
try {
joiner.add(String.format("%sdeserializeValues%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDeserializeValues()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `includeExtensionProperties` to the URL query string
if (getIncludeExtensionProperties() != null) {
try {
joiner.add(String.format("%sincludeExtensionProperties%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIncludeExtensionProperties()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy