437 lines
12 KiB
Java
437 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.JsonValue;
|
||
import com.muse.dto.PlanningCandidateDetailDiff;
|
||
import com.muse.dto.PlanningCandidateDetailQualityResult;
|
||
import com.muse.dto.PlanningCandidateDetailSourceSnapshot;
|
||
import java.time.OffsetDateTime;
|
||
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 = "PlanningCandidateDetail", 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 PlanningCandidateDetail implements Serializable {
|
||
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
private UUID id;
|
||
|
||
private String sectionKey;
|
||
|
||
/**
|
||
* Gets or Sets taskType
|
||
*/
|
||
public enum TaskTypeEnum {
|
||
GENERATE("generate"),
|
||
|
||
SUPPLEMENT("supplement"),
|
||
|
||
ORGANIZE("organize"),
|
||
|
||
MULTI_OPTION("multi_option");
|
||
|
||
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 @Nullable TaskTypeEnum taskType;
|
||
|
||
/**
|
||
* Gets or Sets status
|
||
*/
|
||
public enum StatusEnum {
|
||
PENDING("pending"),
|
||
|
||
CONFIRMED("confirmed"),
|
||
|
||
DISCARDED("discarded");
|
||
|
||
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 Object content;
|
||
|
||
private Integer revision;
|
||
|
||
private @Nullable PlanningCandidateDetailQualityResult qualityResult;
|
||
|
||
private @Nullable PlanningCandidateDetailDiff diff;
|
||
|
||
private @Nullable PlanningCandidateDetailSourceSnapshot sourceSnapshot;
|
||
|
||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
||
private OffsetDateTime createdAt;
|
||
|
||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
||
private @Nullable OffsetDateTime confirmedAt;
|
||
|
||
public PlanningCandidateDetail() {
|
||
super();
|
||
}
|
||
|
||
/**
|
||
* Constructor with only required parameters
|
||
*/
|
||
public PlanningCandidateDetail(UUID id, String sectionKey, StatusEnum status, Object content, Integer revision, OffsetDateTime createdAt) {
|
||
this.id = id;
|
||
this.sectionKey = sectionKey;
|
||
this.status = status;
|
||
this.content = content;
|
||
this.revision = revision;
|
||
this.createdAt = createdAt;
|
||
}
|
||
|
||
public PlanningCandidateDetail 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 PlanningCandidateDetail sectionKey(String sectionKey) {
|
||
this.sectionKey = sectionKey;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get sectionKey
|
||
* @return sectionKey
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "sectionKey", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("sectionKey")
|
||
public String getSectionKey() {
|
||
return sectionKey;
|
||
}
|
||
|
||
@JsonProperty("sectionKey")
|
||
public void setSectionKey(String sectionKey) {
|
||
this.sectionKey = sectionKey;
|
||
}
|
||
|
||
public PlanningCandidateDetail taskType(@Nullable TaskTypeEnum taskType) {
|
||
this.taskType = taskType;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get taskType
|
||
* @return taskType
|
||
*/
|
||
|
||
@Schema(name = "taskType", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("taskType")
|
||
public @Nullable TaskTypeEnum getTaskType() {
|
||
return taskType;
|
||
}
|
||
|
||
@JsonProperty("taskType")
|
||
public void setTaskType(@Nullable TaskTypeEnum taskType) {
|
||
this.taskType = taskType;
|
||
}
|
||
|
||
public PlanningCandidateDetail 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 PlanningCandidateDetail content(Object content) {
|
||
this.content = content;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 候选内容(结构化 JSON)
|
||
* @return content
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "content", description = "候选内容(结构化 JSON)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("content")
|
||
public Object getContent() {
|
||
return content;
|
||
}
|
||
|
||
@JsonProperty("content")
|
||
public void setContent(Object content) {
|
||
this.content = content;
|
||
}
|
||
|
||
public PlanningCandidateDetail revision(Integer revision) {
|
||
this.revision = revision;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get revision
|
||
* @return revision
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "revision", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("revision")
|
||
public Integer getRevision() {
|
||
return revision;
|
||
}
|
||
|
||
@JsonProperty("revision")
|
||
public void setRevision(Integer revision) {
|
||
this.revision = revision;
|
||
}
|
||
|
||
public PlanningCandidateDetail qualityResult(@Nullable PlanningCandidateDetailQualityResult qualityResult) {
|
||
this.qualityResult = qualityResult;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get qualityResult
|
||
* @return qualityResult
|
||
*/
|
||
@Valid
|
||
@Schema(name = "qualityResult", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("qualityResult")
|
||
public @Nullable PlanningCandidateDetailQualityResult getQualityResult() {
|
||
return qualityResult;
|
||
}
|
||
|
||
@JsonProperty("qualityResult")
|
||
public void setQualityResult(@Nullable PlanningCandidateDetailQualityResult qualityResult) {
|
||
this.qualityResult = qualityResult;
|
||
}
|
||
|
||
public PlanningCandidateDetail diff(@Nullable PlanningCandidateDetailDiff diff) {
|
||
this.diff = diff;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get diff
|
||
* @return diff
|
||
*/
|
||
@Valid
|
||
@Schema(name = "diff", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("diff")
|
||
public @Nullable PlanningCandidateDetailDiff getDiff() {
|
||
return diff;
|
||
}
|
||
|
||
@JsonProperty("diff")
|
||
public void setDiff(@Nullable PlanningCandidateDetailDiff diff) {
|
||
this.diff = diff;
|
||
}
|
||
|
||
public PlanningCandidateDetail sourceSnapshot(@Nullable PlanningCandidateDetailSourceSnapshot sourceSnapshot) {
|
||
this.sourceSnapshot = sourceSnapshot;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get sourceSnapshot
|
||
* @return sourceSnapshot
|
||
*/
|
||
@Valid
|
||
@Schema(name = "sourceSnapshot", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("sourceSnapshot")
|
||
public @Nullable PlanningCandidateDetailSourceSnapshot getSourceSnapshot() {
|
||
return sourceSnapshot;
|
||
}
|
||
|
||
@JsonProperty("sourceSnapshot")
|
||
public void setSourceSnapshot(@Nullable PlanningCandidateDetailSourceSnapshot sourceSnapshot) {
|
||
this.sourceSnapshot = sourceSnapshot;
|
||
}
|
||
|
||
public PlanningCandidateDetail 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 PlanningCandidateDetail confirmedAt(@Nullable OffsetDateTime confirmedAt) {
|
||
this.confirmedAt = confirmedAt;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get confirmedAt
|
||
* @return confirmedAt
|
||
*/
|
||
@Valid
|
||
@Schema(name = "confirmedAt", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("confirmedAt")
|
||
public @Nullable OffsetDateTime getConfirmedAt() {
|
||
return confirmedAt;
|
||
}
|
||
|
||
@JsonProperty("confirmedAt")
|
||
public void setConfirmedAt(@Nullable OffsetDateTime confirmedAt) {
|
||
this.confirmedAt = confirmedAt;
|
||
}
|
||
|
||
@Override
|
||
public boolean equals(Object o) {
|
||
if (this == o) {
|
||
return true;
|
||
}
|
||
if (o == null || getClass() != o.getClass()) {
|
||
return false;
|
||
}
|
||
PlanningCandidateDetail planningCandidateDetail = (PlanningCandidateDetail) o;
|
||
return Objects.equals(this.id, planningCandidateDetail.id) &&
|
||
Objects.equals(this.sectionKey, planningCandidateDetail.sectionKey) &&
|
||
Objects.equals(this.taskType, planningCandidateDetail.taskType) &&
|
||
Objects.equals(this.status, planningCandidateDetail.status) &&
|
||
Objects.equals(this.content, planningCandidateDetail.content) &&
|
||
Objects.equals(this.revision, planningCandidateDetail.revision) &&
|
||
Objects.equals(this.qualityResult, planningCandidateDetail.qualityResult) &&
|
||
Objects.equals(this.diff, planningCandidateDetail.diff) &&
|
||
Objects.equals(this.sourceSnapshot, planningCandidateDetail.sourceSnapshot) &&
|
||
Objects.equals(this.createdAt, planningCandidateDetail.createdAt) &&
|
||
Objects.equals(this.confirmedAt, planningCandidateDetail.confirmedAt);
|
||
}
|
||
|
||
@Override
|
||
public int hashCode() {
|
||
return Objects.hash(id, sectionKey, taskType, status, content, revision, qualityResult, diff, sourceSnapshot, createdAt, confirmedAt);
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
StringBuilder sb = new StringBuilder();
|
||
sb.append("class PlanningCandidateDetail {\n");
|
||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||
sb.append(" sectionKey: ").append(toIndentedString(sectionKey)).append("\n");
|
||
sb.append(" taskType: ").append(toIndentedString(taskType)).append("\n");
|
||
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
||
sb.append(" content: ").append(toIndentedString(content)).append("\n");
|
||
sb.append(" revision: ").append(toIndentedString(revision)).append("\n");
|
||
sb.append(" qualityResult: ").append(toIndentedString(qualityResult)).append("\n");
|
||
sb.append(" diff: ").append(toIndentedString(diff)).append("\n");
|
||
sb.append(" sourceSnapshot: ").append(toIndentedString(sourceSnapshot)).append("\n");
|
||
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
|
||
sb.append(" confirmedAt: ").append(toIndentedString(confirmedAt)).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 ");
|
||
}
|
||
}
|
||
|