io.camunda.tasklist.generated.model.FormResponse Maven / Gradle / Ivy
/*
* Tasklist REST API
* Tasklist is a ready-to-use API application to rapidly implement business processes alongside user tasks in Zeebe.
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.camunda.tasklist.generated.model;
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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.StringJoiner;
/**
* FormResponse
*/
@JsonPropertyOrder({
FormResponse.JSON_PROPERTY_ID,
FormResponse.JSON_PROPERTY_PROCESS_DEFINITION_KEY,
FormResponse.JSON_PROPERTY_TITLE,
FormResponse.JSON_PROPERTY_SCHEMA,
FormResponse.JSON_PROPERTY_VERSION,
FormResponse.JSON_PROPERTY_TENANT_ID,
FormResponse.JSON_PROPERTY_IS_DELETED
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-28T19:05:36.804206600Z[Etc/UTC]", comments = "Generator version: 7.8.0")
public class FormResponse {
public static final String JSON_PROPERTY_ID = "id";
private String id;
public static final String JSON_PROPERTY_PROCESS_DEFINITION_KEY = "processDefinitionKey";
private String processDefinitionKey;
public static final String JSON_PROPERTY_TITLE = "title";
private String title;
public static final String JSON_PROPERTY_SCHEMA = "schema";
private String schema;
public static final String JSON_PROPERTY_VERSION = "version";
private Long version;
public static final String JSON_PROPERTY_TENANT_ID = "tenantId";
private String tenantId;
public static final String JSON_PROPERTY_IS_DELETED = "isDeleted";
private Boolean isDeleted;
public FormResponse() {
}
public FormResponse id(String id) {
this.id = id;
return this;
}
/**
* The unique identifier of the embedded form within one process.
* @return id
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
}
public FormResponse processDefinitionKey(String processDefinitionKey) {
this.processDefinitionKey = processDefinitionKey;
return this;
}
/**
* Reference to process definition (renamed equivalent of `Form.processDefinitionId` field).
* @return processDefinitionKey
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PROCESS_DEFINITION_KEY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getProcessDefinitionKey() {
return processDefinitionKey;
}
@JsonProperty(JSON_PROPERTY_PROCESS_DEFINITION_KEY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setProcessDefinitionKey(String processDefinitionKey) {
this.processDefinitionKey = processDefinitionKey;
}
public FormResponse title(String title) {
this.title = title;
return this;
}
/**
* The title of the form.
* @return title
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TITLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTitle() {
return title;
}
@JsonProperty(JSON_PROPERTY_TITLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTitle(String title) {
this.title = title;
}
public FormResponse schema(String schema) {
this.schema = schema;
return this;
}
/**
* The form content.
* @return schema
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SCHEMA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSchema() {
return schema;
}
@JsonProperty(JSON_PROPERTY_SCHEMA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSchema(String schema) {
this.schema = schema;
}
public FormResponse version(Long version) {
this.version = version;
return this;
}
/**
* The version field is null in the case of an embedded form, while it represents the deployed form's version in other scenarios.
* @return version
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_VERSION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getVersion() {
return version;
}
@JsonProperty(JSON_PROPERTY_VERSION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setVersion(Long version) {
this.version = version;
}
public FormResponse tenantId(String tenantId) {
this.tenantId = tenantId;
return this;
}
/**
* The tenant ID associated with the form.
* @return tenantId
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TENANT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTenantId() {
return tenantId;
}
@JsonProperty(JSON_PROPERTY_TENANT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public FormResponse isDeleted(Boolean isDeleted) {
this.isDeleted = isDeleted;
return this;
}
/**
* Indicates whether the deployed form is deleted or not on Zeebe. This field is false by default, in the case of an embedded form.
* @return isDeleted
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_IS_DELETED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getIsDeleted() {
return isDeleted;
}
@JsonProperty(JSON_PROPERTY_IS_DELETED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setIsDeleted(Boolean isDeleted) {
this.isDeleted = isDeleted;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FormResponse formResponse = (FormResponse) o;
return Objects.equals(this.id, formResponse.id) &&
Objects.equals(this.processDefinitionKey, formResponse.processDefinitionKey) &&
Objects.equals(this.title, formResponse.title) &&
Objects.equals(this.schema, formResponse.schema) &&
Objects.equals(this.version, formResponse.version) &&
Objects.equals(this.tenantId, formResponse.tenantId) &&
Objects.equals(this.isDeleted, formResponse.isDeleted);
}
@Override
public int hashCode() {
return Objects.hash(id, processDefinitionKey, title, schema, version, tenantId, isDeleted);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FormResponse {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" processDefinitionKey: ").append(toIndentedString(processDefinitionKey)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" schema: ").append(toIndentedString(schema)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n");
sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).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 `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 `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 `title` to the URL query string
if (getTitle() != null) {
try {
joiner.add(String.format("%stitle%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTitle()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `schema` to the URL query string
if (getSchema() != null) {
try {
joiner.add(String.format("%sschema%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSchema()), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
// add `version` to the URL query string
if (getVersion() != null) {
try {
joiner.add(String.format("%sversion%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVersion()), "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 `isDeleted` to the URL query string
if (getIsDeleted() != null) {
try {
joiner.add(String.format("%sisDeleted%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsDeleted()), "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