oh-my-muse/docs/api-contracts/generated/java/com/muse/dto/CreatePlanningCandidateRequest.java
zizi 10d1f97d3f feat(api): 全量补齐 6 模块 OpenAPI 契约(229 接口)+ 重新生成类型
Content 50 + AI 39 + Knowledge 59 + Market 32 + Account 33 + Meta 16 = 229
修复 Knowledge YAML 重复 key
重新生成 TypeScript 类型包(7 文件)+ Java DTO 骨架(626 类)
2026-05-24 15:06:11 +08:00

239 lines
7.0 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 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;
/**
* 创建规划候选任务请求
*/
@Schema(name = "CreatePlanningCandidateRequest", description = "创建规划候选任务请求")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-05-24T15:05:54.603829+08:00[Asia/Shanghai]", comments = "Generator version: 7.22.0")
public class CreatePlanningCandidateRequest implements Serializable {
private static final long serialVersionUID = 1L;
private String sectionKey;
/**
* 任务类型: generate - 生成新内容 supplement - 补全已有内容 organize - 整理已有内容 multi_option - 生成多组选项
*/
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 TaskTypeEnum taskType;
private @Nullable Object context;
private @Nullable String commandId;
private @Nullable CreatePlanningCandidateRequestSourceSnapshot sourceSnapshot;
public CreatePlanningCandidateRequest() {
super();
}
/**
* Constructor with only required parameters
*/
public CreatePlanningCandidateRequest(String sectionKey, TaskTypeEnum taskType) {
this.sectionKey = sectionKey;
this.taskType = taskType;
}
public CreatePlanningCandidateRequest sectionKey(String sectionKey) {
this.sectionKey = sectionKey;
return this;
}
/**
* 目标规划项标识
* @return sectionKey
*/
@NotNull
@Schema(name = "sectionKey", description = "目标规划项标识", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("sectionKey")
public String getSectionKey() {
return sectionKey;
}
@JsonProperty("sectionKey")
public void setSectionKey(String sectionKey) {
this.sectionKey = sectionKey;
}
public CreatePlanningCandidateRequest taskType(TaskTypeEnum taskType) {
this.taskType = taskType;
return this;
}
/**
* 任务类型: generate - 生成新内容 supplement - 补全已有内容 organize - 整理已有内容 multi_option - 生成多组选项
* @return taskType
*/
@NotNull
@Schema(name = "taskType", description = "任务类型: generate - 生成新内容 supplement - 补全已有内容 organize - 整理已有内容 multi_option - 生成多组选项 ", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("taskType")
public TaskTypeEnum getTaskType() {
return taskType;
}
@JsonProperty("taskType")
public void setTaskType(TaskTypeEnum taskType) {
this.taskType = taskType;
}
public CreatePlanningCandidateRequest context(@Nullable Object context) {
this.context = context;
return this;
}
/**
* 生成上下文,如已有规划内容、用户指令等
* @return context
*/
@Schema(name = "context", description = "生成上下文,如已有规划内容、用户指令等", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("context")
public @Nullable Object getContext() {
return context;
}
@JsonProperty("context")
public void setContext(@Nullable Object context) {
this.context = context;
}
public CreatePlanningCandidateRequest commandId(@Nullable String commandId) {
this.commandId = commandId;
return this;
}
/**
* 幂等键
* @return commandId
*/
@Schema(name = "commandId", description = "幂等键", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("commandId")
public @Nullable String getCommandId() {
return commandId;
}
@JsonProperty("commandId")
public void setCommandId(@Nullable String commandId) {
this.commandId = commandId;
}
public CreatePlanningCandidateRequest 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;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreatePlanningCandidateRequest createPlanningCandidateRequest = (CreatePlanningCandidateRequest) o;
return Objects.equals(this.sectionKey, createPlanningCandidateRequest.sectionKey) &&
Objects.equals(this.taskType, createPlanningCandidateRequest.taskType) &&
Objects.equals(this.context, createPlanningCandidateRequest.context) &&
Objects.equals(this.commandId, createPlanningCandidateRequest.commandId) &&
Objects.equals(this.sourceSnapshot, createPlanningCandidateRequest.sourceSnapshot);
}
@Override
public int hashCode() {
return Objects.hash(sectionKey, taskType, context, commandId, sourceSnapshot);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreatePlanningCandidateRequest {\n");
sb.append(" sectionKey: ").append(toIndentedString(sectionKey)).append("\n");
sb.append(" taskType: ").append(toIndentedString(taskType)).append("\n");
sb.append(" context: ").append(toIndentedString(context)).append("\n");
sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n");
sb.append(" sourceSnapshot: ").append(toIndentedString(sourceSnapshot)).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 ");
}
}