553 lines
14 KiB
Java
553 lines
14 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 java.time.OffsetDateTime;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
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;
|
|
|
|
/**
|
|
* AiTaskDetail
|
|
*/
|
|
|
|
@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 AiTaskDetail implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private UUID taskId;
|
|
|
|
/**
|
|
* Gets or Sets taskType
|
|
*/
|
|
public enum TaskTypeEnum {
|
|
GENERATION("generation"),
|
|
|
|
CONTINUATION("continuation"),
|
|
|
|
EXPANSION("expansion"),
|
|
|
|
POLISH("polish"),
|
|
|
|
DETECTION("detection"),
|
|
|
|
PLANNING("planning");
|
|
|
|
private final String value;
|
|
|
|
TaskTypeEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static TaskTypeEnum fromValue(String value) {
|
|
for (TaskTypeEnum b : TaskTypeEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private TaskTypeEnum taskType;
|
|
|
|
private UUID agentId;
|
|
|
|
private @Nullable String agentName;
|
|
|
|
private @Nullable UUID workId;
|
|
|
|
private @Nullable UUID blockId;
|
|
|
|
/**
|
|
* Gets or Sets status
|
|
*/
|
|
public enum StatusEnum {
|
|
QUEUED("queued"),
|
|
|
|
RUNNING("running"),
|
|
|
|
STREAMING("streaming"),
|
|
|
|
COMPLETED("completed"),
|
|
|
|
FAILED("failed"),
|
|
|
|
CANCELLED("cancelled");
|
|
|
|
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 UUID suggestionId;
|
|
|
|
private @Nullable Integer sourceVersion;
|
|
|
|
private @Nullable String sourceSnapshotId;
|
|
|
|
private @Nullable String runtimePermissionEnvelopeId;
|
|
|
|
@Valid
|
|
private Map<String, Double> qualityScores = new HashMap<>();
|
|
|
|
private @Nullable String errorMessage;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private OffsetDateTime createdAt;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private @Nullable OffsetDateTime completedAt;
|
|
|
|
public AiTaskDetail() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public AiTaskDetail(UUID taskId, TaskTypeEnum taskType, UUID agentId, StatusEnum status, OffsetDateTime createdAt) {
|
|
this.taskId = taskId;
|
|
this.taskType = taskType;
|
|
this.agentId = agentId;
|
|
this.status = status;
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
public AiTaskDetail taskId(UUID taskId) {
|
|
this.taskId = taskId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get taskId
|
|
* @return taskId
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "taskId", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("taskId")
|
|
public UUID getTaskId() {
|
|
return taskId;
|
|
}
|
|
|
|
@JsonProperty("taskId")
|
|
public void setTaskId(UUID taskId) {
|
|
this.taskId = taskId;
|
|
}
|
|
|
|
public AiTaskDetail taskType(TaskTypeEnum taskType) {
|
|
this.taskType = taskType;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get taskType
|
|
* @return taskType
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "taskType", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("taskType")
|
|
public TaskTypeEnum getTaskType() {
|
|
return taskType;
|
|
}
|
|
|
|
@JsonProperty("taskType")
|
|
public void setTaskType(TaskTypeEnum taskType) {
|
|
this.taskType = taskType;
|
|
}
|
|
|
|
public AiTaskDetail agentId(UUID agentId) {
|
|
this.agentId = agentId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get agentId
|
|
* @return agentId
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "agentId", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("agentId")
|
|
public UUID getAgentId() {
|
|
return agentId;
|
|
}
|
|
|
|
@JsonProperty("agentId")
|
|
public void setAgentId(UUID agentId) {
|
|
this.agentId = agentId;
|
|
}
|
|
|
|
public AiTaskDetail agentName(@Nullable String agentName) {
|
|
this.agentName = agentName;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get agentName
|
|
* @return agentName
|
|
*/
|
|
|
|
@Schema(name = "agentName", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("agentName")
|
|
public @Nullable String getAgentName() {
|
|
return agentName;
|
|
}
|
|
|
|
@JsonProperty("agentName")
|
|
public void setAgentName(@Nullable String agentName) {
|
|
this.agentName = agentName;
|
|
}
|
|
|
|
public AiTaskDetail workId(@Nullable UUID workId) {
|
|
this.workId = workId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get workId
|
|
* @return workId
|
|
*/
|
|
@Valid
|
|
@Schema(name = "workId", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("workId")
|
|
public @Nullable UUID getWorkId() {
|
|
return workId;
|
|
}
|
|
|
|
@JsonProperty("workId")
|
|
public void setWorkId(@Nullable UUID workId) {
|
|
this.workId = workId;
|
|
}
|
|
|
|
public AiTaskDetail blockId(@Nullable UUID blockId) {
|
|
this.blockId = blockId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get blockId
|
|
* @return blockId
|
|
*/
|
|
@Valid
|
|
@Schema(name = "blockId", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("blockId")
|
|
public @Nullable UUID getBlockId() {
|
|
return blockId;
|
|
}
|
|
|
|
@JsonProperty("blockId")
|
|
public void setBlockId(@Nullable UUID blockId) {
|
|
this.blockId = blockId;
|
|
}
|
|
|
|
public AiTaskDetail 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 AiTaskDetail suggestionId(@Nullable UUID suggestionId) {
|
|
this.suggestionId = suggestionId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 任务完成后关联的候选 ID
|
|
* @return suggestionId
|
|
*/
|
|
@Valid
|
|
@Schema(name = "suggestionId", description = "任务完成后关联的候选 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("suggestionId")
|
|
public @Nullable UUID getSuggestionId() {
|
|
return suggestionId;
|
|
}
|
|
|
|
@JsonProperty("suggestionId")
|
|
public void setSuggestionId(@Nullable UUID suggestionId) {
|
|
this.suggestionId = suggestionId;
|
|
}
|
|
|
|
public AiTaskDetail sourceVersion(@Nullable Integer sourceVersion) {
|
|
this.sourceVersion = sourceVersion;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 来源版本
|
|
* @return sourceVersion
|
|
*/
|
|
|
|
@Schema(name = "sourceVersion", description = "来源版本", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("sourceVersion")
|
|
public @Nullable Integer getSourceVersion() {
|
|
return sourceVersion;
|
|
}
|
|
|
|
@JsonProperty("sourceVersion")
|
|
public void setSourceVersion(@Nullable Integer sourceVersion) {
|
|
this.sourceVersion = sourceVersion;
|
|
}
|
|
|
|
public AiTaskDetail sourceSnapshotId(@Nullable String sourceSnapshotId) {
|
|
this.sourceSnapshotId = sourceSnapshotId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 服务端记录的来源快照 ID
|
|
* @return sourceSnapshotId
|
|
*/
|
|
|
|
@Schema(name = "sourceSnapshotId", description = "服务端记录的来源快照 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("sourceSnapshotId")
|
|
public @Nullable String getSourceSnapshotId() {
|
|
return sourceSnapshotId;
|
|
}
|
|
|
|
@JsonProperty("sourceSnapshotId")
|
|
public void setSourceSnapshotId(@Nullable String sourceSnapshotId) {
|
|
this.sourceSnapshotId = sourceSnapshotId;
|
|
}
|
|
|
|
public AiTaskDetail runtimePermissionEnvelopeId(@Nullable String runtimePermissionEnvelopeId) {
|
|
this.runtimePermissionEnvelopeId = runtimePermissionEnvelopeId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 服务端生成的运行权限包 ID
|
|
* @return runtimePermissionEnvelopeId
|
|
*/
|
|
|
|
@Schema(name = "runtimePermissionEnvelopeId", description = "服务端生成的运行权限包 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("runtimePermissionEnvelopeId")
|
|
public @Nullable String getRuntimePermissionEnvelopeId() {
|
|
return runtimePermissionEnvelopeId;
|
|
}
|
|
|
|
@JsonProperty("runtimePermissionEnvelopeId")
|
|
public void setRuntimePermissionEnvelopeId(@Nullable String runtimePermissionEnvelopeId) {
|
|
this.runtimePermissionEnvelopeId = runtimePermissionEnvelopeId;
|
|
}
|
|
|
|
public AiTaskDetail qualityScores(Map<String, Double> qualityScores) {
|
|
this.qualityScores = qualityScores;
|
|
return this;
|
|
}
|
|
|
|
public AiTaskDetail putQualityScoresItem(String key, Double qualityScoresItem) {
|
|
if (this.qualityScores == null) {
|
|
this.qualityScores = new HashMap<>();
|
|
}
|
|
this.qualityScores.put(key, qualityScoresItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 各质量维度评分
|
|
* @return qualityScores
|
|
*/
|
|
|
|
@Schema(name = "qualityScores", description = "各质量维度评分", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("qualityScores")
|
|
public Map<String, Double> getQualityScores() {
|
|
return qualityScores;
|
|
}
|
|
|
|
@JsonProperty("qualityScores")
|
|
public void setQualityScores(Map<String, Double> qualityScores) {
|
|
this.qualityScores = qualityScores;
|
|
}
|
|
|
|
public AiTaskDetail 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 AiTaskDetail 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 AiTaskDetail 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;
|
|
}
|
|
AiTaskDetail aiTaskDetail = (AiTaskDetail) o;
|
|
return Objects.equals(this.taskId, aiTaskDetail.taskId) &&
|
|
Objects.equals(this.taskType, aiTaskDetail.taskType) &&
|
|
Objects.equals(this.agentId, aiTaskDetail.agentId) &&
|
|
Objects.equals(this.agentName, aiTaskDetail.agentName) &&
|
|
Objects.equals(this.workId, aiTaskDetail.workId) &&
|
|
Objects.equals(this.blockId, aiTaskDetail.blockId) &&
|
|
Objects.equals(this.status, aiTaskDetail.status) &&
|
|
Objects.equals(this.suggestionId, aiTaskDetail.suggestionId) &&
|
|
Objects.equals(this.sourceVersion, aiTaskDetail.sourceVersion) &&
|
|
Objects.equals(this.sourceSnapshotId, aiTaskDetail.sourceSnapshotId) &&
|
|
Objects.equals(this.runtimePermissionEnvelopeId, aiTaskDetail.runtimePermissionEnvelopeId) &&
|
|
Objects.equals(this.qualityScores, aiTaskDetail.qualityScores) &&
|
|
Objects.equals(this.errorMessage, aiTaskDetail.errorMessage) &&
|
|
Objects.equals(this.createdAt, aiTaskDetail.createdAt) &&
|
|
Objects.equals(this.completedAt, aiTaskDetail.completedAt);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(taskId, taskType, agentId, agentName, workId, blockId, status, suggestionId, sourceVersion, sourceSnapshotId, runtimePermissionEnvelopeId, qualityScores, errorMessage, createdAt, completedAt);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class AiTaskDetail {\n");
|
|
sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n");
|
|
sb.append(" taskType: ").append(toIndentedString(taskType)).append("\n");
|
|
sb.append(" agentId: ").append(toIndentedString(agentId)).append("\n");
|
|
sb.append(" agentName: ").append(toIndentedString(agentName)).append("\n");
|
|
sb.append(" workId: ").append(toIndentedString(workId)).append("\n");
|
|
sb.append(" blockId: ").append(toIndentedString(blockId)).append("\n");
|
|
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
|
sb.append(" suggestionId: ").append(toIndentedString(suggestionId)).append("\n");
|
|
sb.append(" sourceVersion: ").append(toIndentedString(sourceVersion)).append("\n");
|
|
sb.append(" sourceSnapshotId: ").append(toIndentedString(sourceSnapshotId)).append("\n");
|
|
sb.append(" runtimePermissionEnvelopeId: ").append(toIndentedString(runtimePermissionEnvelopeId)).append("\n");
|
|
sb.append(" qualityScores: ").append(toIndentedString(qualityScores)).append("\n");
|
|
sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).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 ");
|
|
}
|
|
}
|
|
|