
com.github.jobservice.client.model.WorkerAction Maven / Gradle / Ivy
The newest version!
/*
* Job Service
* Allows background operations to be sent to the workers, and for the operations to be tracked and controlled. You can check the progress of operations, and request to cancel, pause, or resume them. The primary use of this functionality is batch document processing. The service can send work to the Batch Worker, and then track the progress of that work.
*
* The version of the OpenAPI document: 1.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 com.github.jobservice.client.model;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
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.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.github.jobservice.job.client.JSON;
/**
* WorkerAction
*/
@JsonPropertyOrder({
WorkerAction.JSON_PROPERTY_TASK_CLASSIFIER,
WorkerAction.JSON_PROPERTY_TASK_API_VERSION,
WorkerAction.JSON_PROPERTY_TASK_DATA,
WorkerAction.JSON_PROPERTY_TASK_DATA_ENCODING,
WorkerAction.JSON_PROPERTY_TASK_PIPE,
WorkerAction.JSON_PROPERTY_TARGET_PIPE
})
@JsonTypeName("worker-action")
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-20T20:37:34.533041584Z[Etc/UTC]")
public class WorkerAction {
public static final String JSON_PROPERTY_TASK_CLASSIFIER = "taskClassifier";
private String taskClassifier;
public static final String JSON_PROPERTY_TASK_API_VERSION = "taskApiVersion";
private Integer taskApiVersion;
public static final String JSON_PROPERTY_TASK_DATA = "taskData";
private Object taskData;
/**
* Gets or Sets taskDataEncoding
*/
public enum TaskDataEncodingEnum {
UTF8("utf8"),
BASE64("base64");
private String value;
TaskDataEncodingEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TaskDataEncodingEnum fromValue(String value) {
for (TaskDataEncodingEnum b : TaskDataEncodingEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_TASK_DATA_ENCODING = "taskDataEncoding";
private TaskDataEncodingEnum taskDataEncoding;
public static final String JSON_PROPERTY_TASK_PIPE = "taskPipe";
private String taskPipe;
public static final String JSON_PROPERTY_TARGET_PIPE = "targetPipe";
private String targetPipe;
public WorkerAction() {
}
public WorkerAction taskClassifier(String taskClassifier) {
this.taskClassifier = taskClassifier;
return this;
}
/**
* Get taskClassifier
* @return taskClassifier
**/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TASK_CLASSIFIER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getTaskClassifier() {
return taskClassifier;
}
@JsonProperty(JSON_PROPERTY_TASK_CLASSIFIER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTaskClassifier(String taskClassifier) {
this.taskClassifier = taskClassifier;
}
public WorkerAction taskApiVersion(Integer taskApiVersion) {
this.taskApiVersion = taskApiVersion;
return this;
}
/**
* Get taskApiVersion
* @return taskApiVersion
**/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TASK_API_VERSION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Integer getTaskApiVersion() {
return taskApiVersion;
}
@JsonProperty(JSON_PROPERTY_TASK_API_VERSION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTaskApiVersion(Integer taskApiVersion) {
this.taskApiVersion = taskApiVersion;
}
public WorkerAction taskData(Object taskData) {
this.taskData = taskData;
return this;
}
/**
* Get taskData
* @return taskData
**/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TASK_DATA)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Object getTaskData() {
return taskData;
}
@JsonProperty(JSON_PROPERTY_TASK_DATA)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTaskData(Object taskData) {
this.taskData = taskData;
}
public WorkerAction taskDataEncoding(TaskDataEncodingEnum taskDataEncoding) {
this.taskDataEncoding = taskDataEncoding;
return this;
}
/**
* Get taskDataEncoding
* @return taskDataEncoding
**/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TASK_DATA_ENCODING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public TaskDataEncodingEnum getTaskDataEncoding() {
return taskDataEncoding;
}
@JsonProperty(JSON_PROPERTY_TASK_DATA_ENCODING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTaskDataEncoding(TaskDataEncodingEnum taskDataEncoding) {
this.taskDataEncoding = taskDataEncoding;
}
public WorkerAction taskPipe(String taskPipe) {
this.taskPipe = taskPipe;
return this;
}
/**
* Get taskPipe
* @return taskPipe
**/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TASK_PIPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getTaskPipe() {
return taskPipe;
}
@JsonProperty(JSON_PROPERTY_TASK_PIPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTaskPipe(String taskPipe) {
this.taskPipe = taskPipe;
}
public WorkerAction targetPipe(String targetPipe) {
this.targetPipe = targetPipe;
return this;
}
/**
* Get targetPipe
* @return targetPipe
**/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TARGET_PIPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getTargetPipe() {
return targetPipe;
}
@JsonProperty(JSON_PROPERTY_TARGET_PIPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTargetPipe(String targetPipe) {
this.targetPipe = targetPipe;
}
/**
* Return true if this worker-action object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WorkerAction workerAction = (WorkerAction) o;
return Objects.equals(this.taskClassifier, workerAction.taskClassifier) &&
Objects.equals(this.taskApiVersion, workerAction.taskApiVersion) &&
Objects.equals(this.taskData, workerAction.taskData) &&
Objects.equals(this.taskDataEncoding, workerAction.taskDataEncoding) &&
Objects.equals(this.taskPipe, workerAction.taskPipe) &&
Objects.equals(this.targetPipe, workerAction.targetPipe);
}
@Override
public int hashCode() {
return Objects.hash(taskClassifier, taskApiVersion, taskData, taskDataEncoding, taskPipe, targetPipe);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class WorkerAction {\n");
sb.append(" taskClassifier: ").append(toIndentedString(taskClassifier)).append("\n");
sb.append(" taskApiVersion: ").append(toIndentedString(taskApiVersion)).append("\n");
sb.append(" taskData: ").append(toIndentedString(taskData)).append("\n");
sb.append(" taskDataEncoding: ").append(toIndentedString(taskDataEncoding)).append("\n");
sb.append(" taskPipe: ").append(toIndentedString(taskPipe)).append("\n");
sb.append(" targetPipe: ").append(toIndentedString(targetPipe)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy