oh-my-muse/docs/api-contracts/generated/java/com/muse/dto/GetKBProcessingTask200ResponseAllOfData.java

426 lines
12 KiB
Java

package com.muse.dto;
import java.net.URI;
import java.util.Objects;
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.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.lang.Nullable;
import java.io.Serializable;
import java.time.OffsetDateTime;
import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*;
import jakarta.annotation.Generated;
/**
* GetKBProcessingTask200ResponseAllOfData
*/
@JsonTypeName("getKBProcessingTask_200_response_allOf_data")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-05-24T16:47:40.290595+08:00[Asia/Shanghai]", comments = "Generator version: 7.22.0")
public class GetKBProcessingTask200ResponseAllOfData implements Serializable {
private static final long serialVersionUID = 1L;
private @Nullable String taskId;
private @Nullable String taskType;
/**
* Gets or Sets status
*/
public enum StatusEnum {
QUEUED("queued"),
SCANNING("scanning"),
CLEANING("cleaning"),
PARSING("parsing"),
INDEXING("indexing"),
COMPLETED("completed"),
FAILED("failed"),
CANCELLING("cancelling");
private final String value;
StatusEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static StatusEnum fromValue(String value) {
for (StatusEnum b : StatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private @Nullable StatusEnum status;
private @Nullable String stage;
private @Nullable Float progress;
private @Nullable Integer documentCount;
private @Nullable Integer failedCount;
private @Nullable String failureReason;
private @Nullable Boolean retryable;
@Valid
private List<String> nextActions = new ArrayList<>();
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
private @Nullable OffsetDateTime startedAt;
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
private @Nullable OffsetDateTime updatedAt;
public GetKBProcessingTask200ResponseAllOfData taskId(@Nullable String taskId) {
this.taskId = taskId;
return this;
}
/**
* Get taskId
* @return taskId
*/
@Schema(name = "taskId", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("taskId")
public @Nullable String getTaskId() {
return taskId;
}
@JsonProperty("taskId")
public void setTaskId(@Nullable String taskId) {
this.taskId = taskId;
}
public GetKBProcessingTask200ResponseAllOfData taskType(@Nullable String taskType) {
this.taskType = taskType;
return this;
}
/**
* Get taskType
* @return taskType
*/
@Schema(name = "taskType", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("taskType")
public @Nullable String getTaskType() {
return taskType;
}
@JsonProperty("taskType")
public void setTaskType(@Nullable String taskType) {
this.taskType = taskType;
}
public GetKBProcessingTask200ResponseAllOfData status(@Nullable StatusEnum status) {
this.status = status;
return this;
}
/**
* Get status
* @return status
*/
@Schema(name = "status", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("status")
public @Nullable StatusEnum getStatus() {
return status;
}
@JsonProperty("status")
public void setStatus(@Nullable StatusEnum status) {
this.status = status;
}
public GetKBProcessingTask200ResponseAllOfData stage(@Nullable String stage) {
this.stage = stage;
return this;
}
/**
* Get stage
* @return stage
*/
@Schema(name = "stage", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("stage")
public @Nullable String getStage() {
return stage;
}
@JsonProperty("stage")
public void setStage(@Nullable String stage) {
this.stage = stage;
}
public GetKBProcessingTask200ResponseAllOfData progress(@Nullable Float progress) {
this.progress = progress;
return this;
}
/**
* 进度百分比 0-100
* @return progress
*/
@Schema(name = "progress", description = "进度百分比 0-100", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("progress")
public @Nullable Float getProgress() {
return progress;
}
@JsonProperty("progress")
public void setProgress(@Nullable Float progress) {
this.progress = progress;
}
public GetKBProcessingTask200ResponseAllOfData documentCount(@Nullable Integer documentCount) {
this.documentCount = documentCount;
return this;
}
/**
* Get documentCount
* @return documentCount
*/
@Schema(name = "documentCount", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("documentCount")
public @Nullable Integer getDocumentCount() {
return documentCount;
}
@JsonProperty("documentCount")
public void setDocumentCount(@Nullable Integer documentCount) {
this.documentCount = documentCount;
}
public GetKBProcessingTask200ResponseAllOfData failedCount(@Nullable Integer failedCount) {
this.failedCount = failedCount;
return this;
}
/**
* Get failedCount
* @return failedCount
*/
@Schema(name = "failedCount", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("failedCount")
public @Nullable Integer getFailedCount() {
return failedCount;
}
@JsonProperty("failedCount")
public void setFailedCount(@Nullable Integer failedCount) {
this.failedCount = failedCount;
}
public GetKBProcessingTask200ResponseAllOfData failureReason(@Nullable String failureReason) {
this.failureReason = failureReason;
return this;
}
/**
* Get failureReason
* @return failureReason
*/
@Schema(name = "failureReason", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("failureReason")
public @Nullable String getFailureReason() {
return failureReason;
}
@JsonProperty("failureReason")
public void setFailureReason(@Nullable String failureReason) {
this.failureReason = failureReason;
}
public GetKBProcessingTask200ResponseAllOfData retryable(@Nullable Boolean retryable) {
this.retryable = retryable;
return this;
}
/**
* Get retryable
* @return retryable
*/
@Schema(name = "retryable", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("retryable")
public @Nullable Boolean getRetryable() {
return retryable;
}
@JsonProperty("retryable")
public void setRetryable(@Nullable Boolean retryable) {
this.retryable = retryable;
}
public GetKBProcessingTask200ResponseAllOfData nextActions(List<String> nextActions) {
this.nextActions = nextActions;
return this;
}
public GetKBProcessingTask200ResponseAllOfData addNextActionsItem(String nextActionsItem) {
if (this.nextActions == null) {
this.nextActions = new ArrayList<>();
}
this.nextActions.add(nextActionsItem);
return this;
}
/**
* Get nextActions
* @return nextActions
*/
@Schema(name = "nextActions", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("nextActions")
public List<String> getNextActions() {
return nextActions;
}
@JsonProperty("nextActions")
public void setNextActions(List<String> nextActions) {
this.nextActions = nextActions;
}
public GetKBProcessingTask200ResponseAllOfData startedAt(@Nullable OffsetDateTime startedAt) {
this.startedAt = startedAt;
return this;
}
/**
* Get startedAt
* @return startedAt
*/
@Valid
@Schema(name = "startedAt", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("startedAt")
public @Nullable OffsetDateTime getStartedAt() {
return startedAt;
}
@JsonProperty("startedAt")
public void setStartedAt(@Nullable OffsetDateTime startedAt) {
this.startedAt = startedAt;
}
public GetKBProcessingTask200ResponseAllOfData updatedAt(@Nullable OffsetDateTime updatedAt) {
this.updatedAt = updatedAt;
return this;
}
/**
* Get updatedAt
* @return updatedAt
*/
@Valid
@Schema(name = "updatedAt", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("updatedAt")
public @Nullable OffsetDateTime getUpdatedAt() {
return updatedAt;
}
@JsonProperty("updatedAt")
public void setUpdatedAt(@Nullable OffsetDateTime updatedAt) {
this.updatedAt = updatedAt;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetKBProcessingTask200ResponseAllOfData getKBProcessingTask200ResponseAllOfData = (GetKBProcessingTask200ResponseAllOfData) o;
return Objects.equals(this.taskId, getKBProcessingTask200ResponseAllOfData.taskId) &&
Objects.equals(this.taskType, getKBProcessingTask200ResponseAllOfData.taskType) &&
Objects.equals(this.status, getKBProcessingTask200ResponseAllOfData.status) &&
Objects.equals(this.stage, getKBProcessingTask200ResponseAllOfData.stage) &&
Objects.equals(this.progress, getKBProcessingTask200ResponseAllOfData.progress) &&
Objects.equals(this.documentCount, getKBProcessingTask200ResponseAllOfData.documentCount) &&
Objects.equals(this.failedCount, getKBProcessingTask200ResponseAllOfData.failedCount) &&
Objects.equals(this.failureReason, getKBProcessingTask200ResponseAllOfData.failureReason) &&
Objects.equals(this.retryable, getKBProcessingTask200ResponseAllOfData.retryable) &&
Objects.equals(this.nextActions, getKBProcessingTask200ResponseAllOfData.nextActions) &&
Objects.equals(this.startedAt, getKBProcessingTask200ResponseAllOfData.startedAt) &&
Objects.equals(this.updatedAt, getKBProcessingTask200ResponseAllOfData.updatedAt);
}
@Override
public int hashCode() {
return Objects.hash(taskId, taskType, status, stage, progress, documentCount, failedCount, failureReason, retryable, nextActions, startedAt, updatedAt);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GetKBProcessingTask200ResponseAllOfData {\n");
sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n");
sb.append(" taskType: ").append(toIndentedString(taskType)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" stage: ").append(toIndentedString(stage)).append("\n");
sb.append(" progress: ").append(toIndentedString(progress)).append("\n");
sb.append(" documentCount: ").append(toIndentedString(documentCount)).append("\n");
sb.append(" failedCount: ").append(toIndentedString(failedCount)).append("\n");
sb.append(" failureReason: ").append(toIndentedString(failureReason)).append("\n");
sb.append(" retryable: ").append(toIndentedString(retryable)).append("\n");
sb.append(" nextActions: ").append(toIndentedString(nextActions)).append("\n");
sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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(@Nullable Object o) {
return o == null ? "null" : o.toString().replace("\n", "\n ");
}
}