533 lines
15 KiB
Java
533 lines
15 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.JsonValue;
|
||
import com.muse.dto.CreatePlanningCandidateRequestSourceSnapshot;
|
||
import java.time.OffsetDateTime;
|
||
import java.util.ArrayList;
|
||
import java.util.Arrays;
|
||
import java.util.List;
|
||
import java.util.UUID;
|
||
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;
|
||
|
||
/**
|
||
* AI Orchestration owner 提供给 Content/Work 的解析任务投影
|
||
*/
|
||
|
||
@Schema(name = "ParseJobDetail", description = "AI Orchestration owner 提供给 Content/Work 的解析任务投影")
|
||
@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 ParseJobDetail implements Serializable {
|
||
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
private UUID id;
|
||
|
||
private UUID workId;
|
||
|
||
private @Nullable UUID importTaskId;
|
||
|
||
/**
|
||
* Gets or Sets status
|
||
*/
|
||
public enum StatusEnum {
|
||
QUEUED("queued"),
|
||
|
||
PROCESSING("processing"),
|
||
|
||
COMPLETED("completed"),
|
||
|
||
FAILED("failed");
|
||
|
||
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 StatusEnum status;
|
||
|
||
private @Nullable Integer progress;
|
||
|
||
private @Nullable Integer totalChapters;
|
||
|
||
private @Nullable Integer confirmedChapters;
|
||
|
||
private @Nullable Integer pendingChapters;
|
||
|
||
private @Nullable String errorMessage;
|
||
|
||
private @Nullable String failedStage;
|
||
|
||
private @Nullable Boolean retryable;
|
||
|
||
@Valid
|
||
private List<String> nextActions = new ArrayList<>();
|
||
|
||
private @Nullable Integer parseConfigVersion;
|
||
|
||
private @Nullable CreatePlanningCandidateRequestSourceSnapshot sourceSnapshot;
|
||
|
||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
||
private OffsetDateTime createdAt;
|
||
|
||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
||
private @Nullable OffsetDateTime completedAt;
|
||
|
||
public ParseJobDetail() {
|
||
super();
|
||
}
|
||
|
||
/**
|
||
* Constructor with only required parameters
|
||
*/
|
||
public ParseJobDetail(UUID id, UUID workId, StatusEnum status, OffsetDateTime createdAt) {
|
||
this.id = id;
|
||
this.workId = workId;
|
||
this.status = status;
|
||
this.createdAt = createdAt;
|
||
}
|
||
|
||
public ParseJobDetail id(UUID id) {
|
||
this.id = id;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get id
|
||
* @return id
|
||
*/
|
||
@NotNull @Valid
|
||
@Schema(name = "id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("id")
|
||
public UUID getId() {
|
||
return id;
|
||
}
|
||
|
||
@JsonProperty("id")
|
||
public void setId(UUID id) {
|
||
this.id = id;
|
||
}
|
||
|
||
public ParseJobDetail workId(UUID workId) {
|
||
this.workId = workId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get workId
|
||
* @return workId
|
||
*/
|
||
@NotNull @Valid
|
||
@Schema(name = "workId", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("workId")
|
||
public UUID getWorkId() {
|
||
return workId;
|
||
}
|
||
|
||
@JsonProperty("workId")
|
||
public void setWorkId(UUID workId) {
|
||
this.workId = workId;
|
||
}
|
||
|
||
public ParseJobDetail importTaskId(@Nullable UUID importTaskId) {
|
||
this.importTaskId = importTaskId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get importTaskId
|
||
* @return importTaskId
|
||
*/
|
||
@Valid
|
||
@Schema(name = "importTaskId", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("importTaskId")
|
||
public @Nullable UUID getImportTaskId() {
|
||
return importTaskId;
|
||
}
|
||
|
||
@JsonProperty("importTaskId")
|
||
public void setImportTaskId(@Nullable UUID importTaskId) {
|
||
this.importTaskId = importTaskId;
|
||
}
|
||
|
||
public ParseJobDetail status(StatusEnum status) {
|
||
this.status = status;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get status
|
||
* @return status
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("status")
|
||
public StatusEnum getStatus() {
|
||
return status;
|
||
}
|
||
|
||
@JsonProperty("status")
|
||
public void setStatus(StatusEnum status) {
|
||
this.status = status;
|
||
}
|
||
|
||
public ParseJobDetail progress(@Nullable Integer 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 Integer getProgress() {
|
||
return progress;
|
||
}
|
||
|
||
@JsonProperty("progress")
|
||
public void setProgress(@Nullable Integer progress) {
|
||
this.progress = progress;
|
||
}
|
||
|
||
public ParseJobDetail totalChapters(@Nullable Integer totalChapters) {
|
||
this.totalChapters = totalChapters;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 检测到的总章节数
|
||
* @return totalChapters
|
||
*/
|
||
|
||
@Schema(name = "totalChapters", description = "检测到的总章节数", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("totalChapters")
|
||
public @Nullable Integer getTotalChapters() {
|
||
return totalChapters;
|
||
}
|
||
|
||
@JsonProperty("totalChapters")
|
||
public void setTotalChapters(@Nullable Integer totalChapters) {
|
||
this.totalChapters = totalChapters;
|
||
}
|
||
|
||
public ParseJobDetail confirmedChapters(@Nullable Integer confirmedChapters) {
|
||
this.confirmedChapters = confirmedChapters;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 已确认章节数
|
||
* @return confirmedChapters
|
||
*/
|
||
|
||
@Schema(name = "confirmedChapters", description = "已确认章节数", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("confirmedChapters")
|
||
public @Nullable Integer getConfirmedChapters() {
|
||
return confirmedChapters;
|
||
}
|
||
|
||
@JsonProperty("confirmedChapters")
|
||
public void setConfirmedChapters(@Nullable Integer confirmedChapters) {
|
||
this.confirmedChapters = confirmedChapters;
|
||
}
|
||
|
||
public ParseJobDetail pendingChapters(@Nullable Integer pendingChapters) {
|
||
this.pendingChapters = pendingChapters;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 待审阅章节数
|
||
* @return pendingChapters
|
||
*/
|
||
|
||
@Schema(name = "pendingChapters", description = "待审阅章节数", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("pendingChapters")
|
||
public @Nullable Integer getPendingChapters() {
|
||
return pendingChapters;
|
||
}
|
||
|
||
@JsonProperty("pendingChapters")
|
||
public void setPendingChapters(@Nullable Integer pendingChapters) {
|
||
this.pendingChapters = pendingChapters;
|
||
}
|
||
|
||
public ParseJobDetail errorMessage(@Nullable String errorMessage) {
|
||
this.errorMessage = errorMessage;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get errorMessage
|
||
* @return errorMessage
|
||
*/
|
||
|
||
@Schema(name = "errorMessage", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("errorMessage")
|
||
public @Nullable String getErrorMessage() {
|
||
return errorMessage;
|
||
}
|
||
|
||
@JsonProperty("errorMessage")
|
||
public void setErrorMessage(@Nullable String errorMessage) {
|
||
this.errorMessage = errorMessage;
|
||
}
|
||
|
||
public ParseJobDetail failedStage(@Nullable String failedStage) {
|
||
this.failedStage = failedStage;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get failedStage
|
||
* @return failedStage
|
||
*/
|
||
|
||
@Schema(name = "failedStage", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("failedStage")
|
||
public @Nullable String getFailedStage() {
|
||
return failedStage;
|
||
}
|
||
|
||
@JsonProperty("failedStage")
|
||
public void setFailedStage(@Nullable String failedStage) {
|
||
this.failedStage = failedStage;
|
||
}
|
||
|
||
public ParseJobDetail 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 ParseJobDetail nextActions(List<String> nextActions) {
|
||
this.nextActions = nextActions;
|
||
return this;
|
||
}
|
||
|
||
public ParseJobDetail 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 ParseJobDetail parseConfigVersion(@Nullable Integer parseConfigVersion) {
|
||
this.parseConfigVersion = parseConfigVersion;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 解析配置版本
|
||
* @return parseConfigVersion
|
||
*/
|
||
|
||
@Schema(name = "parseConfigVersion", description = "解析配置版本", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("parseConfigVersion")
|
||
public @Nullable Integer getParseConfigVersion() {
|
||
return parseConfigVersion;
|
||
}
|
||
|
||
@JsonProperty("parseConfigVersion")
|
||
public void setParseConfigVersion(@Nullable Integer parseConfigVersion) {
|
||
this.parseConfigVersion = parseConfigVersion;
|
||
}
|
||
|
||
public ParseJobDetail sourceSnapshot(@Nullable CreatePlanningCandidateRequestSourceSnapshot sourceSnapshot) {
|
||
this.sourceSnapshot = sourceSnapshot;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get sourceSnapshot
|
||
* @return sourceSnapshot
|
||
*/
|
||
@Valid
|
||
@Schema(name = "sourceSnapshot", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("sourceSnapshot")
|
||
public @Nullable CreatePlanningCandidateRequestSourceSnapshot getSourceSnapshot() {
|
||
return sourceSnapshot;
|
||
}
|
||
|
||
@JsonProperty("sourceSnapshot")
|
||
public void setSourceSnapshot(@Nullable CreatePlanningCandidateRequestSourceSnapshot sourceSnapshot) {
|
||
this.sourceSnapshot = sourceSnapshot;
|
||
}
|
||
|
||
public ParseJobDetail createdAt(OffsetDateTime createdAt) {
|
||
this.createdAt = createdAt;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get createdAt
|
||
* @return createdAt
|
||
*/
|
||
@NotNull @Valid
|
||
@Schema(name = "createdAt", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("createdAt")
|
||
public OffsetDateTime getCreatedAt() {
|
||
return createdAt;
|
||
}
|
||
|
||
@JsonProperty("createdAt")
|
||
public void setCreatedAt(OffsetDateTime createdAt) {
|
||
this.createdAt = createdAt;
|
||
}
|
||
|
||
public ParseJobDetail completedAt(@Nullable OffsetDateTime completedAt) {
|
||
this.completedAt = completedAt;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get completedAt
|
||
* @return completedAt
|
||
*/
|
||
@Valid
|
||
@Schema(name = "completedAt", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("completedAt")
|
||
public @Nullable OffsetDateTime getCompletedAt() {
|
||
return completedAt;
|
||
}
|
||
|
||
@JsonProperty("completedAt")
|
||
public void setCompletedAt(@Nullable OffsetDateTime completedAt) {
|
||
this.completedAt = completedAt;
|
||
}
|
||
|
||
@Override
|
||
public boolean equals(Object o) {
|
||
if (this == o) {
|
||
return true;
|
||
}
|
||
if (o == null || getClass() != o.getClass()) {
|
||
return false;
|
||
}
|
||
ParseJobDetail parseJobDetail = (ParseJobDetail) o;
|
||
return Objects.equals(this.id, parseJobDetail.id) &&
|
||
Objects.equals(this.workId, parseJobDetail.workId) &&
|
||
Objects.equals(this.importTaskId, parseJobDetail.importTaskId) &&
|
||
Objects.equals(this.status, parseJobDetail.status) &&
|
||
Objects.equals(this.progress, parseJobDetail.progress) &&
|
||
Objects.equals(this.totalChapters, parseJobDetail.totalChapters) &&
|
||
Objects.equals(this.confirmedChapters, parseJobDetail.confirmedChapters) &&
|
||
Objects.equals(this.pendingChapters, parseJobDetail.pendingChapters) &&
|
||
Objects.equals(this.errorMessage, parseJobDetail.errorMessage) &&
|
||
Objects.equals(this.failedStage, parseJobDetail.failedStage) &&
|
||
Objects.equals(this.retryable, parseJobDetail.retryable) &&
|
||
Objects.equals(this.nextActions, parseJobDetail.nextActions) &&
|
||
Objects.equals(this.parseConfigVersion, parseJobDetail.parseConfigVersion) &&
|
||
Objects.equals(this.sourceSnapshot, parseJobDetail.sourceSnapshot) &&
|
||
Objects.equals(this.createdAt, parseJobDetail.createdAt) &&
|
||
Objects.equals(this.completedAt, parseJobDetail.completedAt);
|
||
}
|
||
|
||
@Override
|
||
public int hashCode() {
|
||
return Objects.hash(id, workId, importTaskId, status, progress, totalChapters, confirmedChapters, pendingChapters, errorMessage, failedStage, retryable, nextActions, parseConfigVersion, sourceSnapshot, createdAt, completedAt);
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
StringBuilder sb = new StringBuilder();
|
||
sb.append("class ParseJobDetail {\n");
|
||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||
sb.append(" workId: ").append(toIndentedString(workId)).append("\n");
|
||
sb.append(" importTaskId: ").append(toIndentedString(importTaskId)).append("\n");
|
||
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
||
sb.append(" progress: ").append(toIndentedString(progress)).append("\n");
|
||
sb.append(" totalChapters: ").append(toIndentedString(totalChapters)).append("\n");
|
||
sb.append(" confirmedChapters: ").append(toIndentedString(confirmedChapters)).append("\n");
|
||
sb.append(" pendingChapters: ").append(toIndentedString(pendingChapters)).append("\n");
|
||
sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n");
|
||
sb.append(" failedStage: ").append(toIndentedString(failedStage)).append("\n");
|
||
sb.append(" retryable: ").append(toIndentedString(retryable)).append("\n");
|
||
sb.append(" nextActions: ").append(toIndentedString(nextActions)).append("\n");
|
||
sb.append(" parseConfigVersion: ").append(toIndentedString(parseConfigVersion)).append("\n");
|
||
sb.append(" sourceSnapshot: ").append(toIndentedString(sourceSnapshot)).append("\n");
|
||
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
|
||
sb.append(" completedAt: ").append(toIndentedString(completedAt)).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 ");
|
||
}
|
||
}
|
||
|