oh-my-muse/docs/api-contracts/generated/java/com/muse/dto/AcceptSuggestionResult.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

298 lines
9.5 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.AcceptSuggestionResultFollowupTasksInner;
import com.muse.dto.AcceptSuggestionResultKnowledgeDraftResult;
import com.muse.dto.AcceptSuggestionResultSourceAttribution;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
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;
/**
* AcceptSuggestionResult
*/
@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 AcceptSuggestionResult implements Serializable {
private static final long serialVersionUID = 1L;
private Integer revision;
private @Nullable Integer wordCount;
/**
* 候选归档结果
*/
public enum SuggestionStatusEnum {
ACCEPTED("accepted"),
ARCHIVED("archived");
private final String value;
SuggestionStatusEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static SuggestionStatusEnum fromValue(String value) {
for (SuggestionStatusEnum b : SuggestionStatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private SuggestionStatusEnum suggestionStatus;
private @Nullable String candidateDecisionArchiveRef;
private @Nullable AcceptSuggestionResultSourceAttribution sourceAttribution;
private @Nullable AcceptSuggestionResultKnowledgeDraftResult knowledgeDraftResult;
@Valid
private List<@Valid AcceptSuggestionResultFollowupTasksInner> followupTasks = new ArrayList<>();
public AcceptSuggestionResult() {
super();
}
/**
* Constructor with only required parameters
*/
public AcceptSuggestionResult(Integer revision, SuggestionStatusEnum suggestionStatus) {
this.revision = revision;
this.suggestionStatus = suggestionStatus;
}
public AcceptSuggestionResult revision(Integer revision) {
this.revision = revision;
return this;
}
/**
* Block 保存成功后的新 revision
* @return revision
*/
@NotNull
@Schema(name = "revision", description = "Block 保存成功后的新 revision", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("revision")
public Integer getRevision() {
return revision;
}
@JsonProperty("revision")
public void setRevision(Integer revision) {
this.revision = revision;
}
public AcceptSuggestionResult wordCount(@Nullable Integer wordCount) {
this.wordCount = wordCount;
return this;
}
/**
* 当前字数
* @return wordCount
*/
@Schema(name = "wordCount", description = "当前字数", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("wordCount")
public @Nullable Integer getWordCount() {
return wordCount;
}
@JsonProperty("wordCount")
public void setWordCount(@Nullable Integer wordCount) {
this.wordCount = wordCount;
}
public AcceptSuggestionResult suggestionStatus(SuggestionStatusEnum suggestionStatus) {
this.suggestionStatus = suggestionStatus;
return this;
}
/**
* 候选归档结果
* @return suggestionStatus
*/
@NotNull
@Schema(name = "suggestionStatus", description = "候选归档结果", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("suggestionStatus")
public SuggestionStatusEnum getSuggestionStatus() {
return suggestionStatus;
}
@JsonProperty("suggestionStatus")
public void setSuggestionStatus(SuggestionStatusEnum suggestionStatus) {
this.suggestionStatus = suggestionStatus;
}
public AcceptSuggestionResult candidateDecisionArchiveRef(@Nullable String candidateDecisionArchiveRef) {
this.candidateDecisionArchiveRef = candidateDecisionArchiveRef;
return this;
}
/**
* Candidate Decision Archive 引用
* @return candidateDecisionArchiveRef
*/
@Schema(name = "candidateDecisionArchiveRef", description = "Candidate Decision Archive 引用", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("candidateDecisionArchiveRef")
public @Nullable String getCandidateDecisionArchiveRef() {
return candidateDecisionArchiveRef;
}
@JsonProperty("candidateDecisionArchiveRef")
public void setCandidateDecisionArchiveRef(@Nullable String candidateDecisionArchiveRef) {
this.candidateDecisionArchiveRef = candidateDecisionArchiveRef;
}
public AcceptSuggestionResult sourceAttribution(@Nullable AcceptSuggestionResultSourceAttribution sourceAttribution) {
this.sourceAttribution = sourceAttribution;
return this;
}
/**
* Get sourceAttribution
* @return sourceAttribution
*/
@Valid
@Schema(name = "sourceAttribution", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("sourceAttribution")
public @Nullable AcceptSuggestionResultSourceAttribution getSourceAttribution() {
return sourceAttribution;
}
@JsonProperty("sourceAttribution")
public void setSourceAttribution(@Nullable AcceptSuggestionResultSourceAttribution sourceAttribution) {
this.sourceAttribution = sourceAttribution;
}
public AcceptSuggestionResult knowledgeDraftResult(@Nullable AcceptSuggestionResultKnowledgeDraftResult knowledgeDraftResult) {
this.knowledgeDraftResult = knowledgeDraftResult;
return this;
}
/**
* Get knowledgeDraftResult
* @return knowledgeDraftResult
*/
@Valid
@Schema(name = "knowledgeDraftResult", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("knowledgeDraftResult")
public @Nullable AcceptSuggestionResultKnowledgeDraftResult getKnowledgeDraftResult() {
return knowledgeDraftResult;
}
@JsonProperty("knowledgeDraftResult")
public void setKnowledgeDraftResult(@Nullable AcceptSuggestionResultKnowledgeDraftResult knowledgeDraftResult) {
this.knowledgeDraftResult = knowledgeDraftResult;
}
public AcceptSuggestionResult followupTasks(List<@Valid AcceptSuggestionResultFollowupTasksInner> followupTasks) {
this.followupTasks = followupTasks;
return this;
}
public AcceptSuggestionResult addFollowupTasksItem(AcceptSuggestionResultFollowupTasksInner followupTasksItem) {
if (this.followupTasks == null) {
this.followupTasks = new ArrayList<>();
}
this.followupTasks.add(followupTasksItem);
return this;
}
/**
* 保存后触发的异步任务摘要列表
* @return followupTasks
*/
@Valid
@Schema(name = "followupTasks", description = "保存后触发的异步任务摘要列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("followupTasks")
public List<@Valid AcceptSuggestionResultFollowupTasksInner> getFollowupTasks() {
return followupTasks;
}
@JsonProperty("followupTasks")
public void setFollowupTasks(List<@Valid AcceptSuggestionResultFollowupTasksInner> followupTasks) {
this.followupTasks = followupTasks;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AcceptSuggestionResult acceptSuggestionResult = (AcceptSuggestionResult) o;
return Objects.equals(this.revision, acceptSuggestionResult.revision) &&
Objects.equals(this.wordCount, acceptSuggestionResult.wordCount) &&
Objects.equals(this.suggestionStatus, acceptSuggestionResult.suggestionStatus) &&
Objects.equals(this.candidateDecisionArchiveRef, acceptSuggestionResult.candidateDecisionArchiveRef) &&
Objects.equals(this.sourceAttribution, acceptSuggestionResult.sourceAttribution) &&
Objects.equals(this.knowledgeDraftResult, acceptSuggestionResult.knowledgeDraftResult) &&
Objects.equals(this.followupTasks, acceptSuggestionResult.followupTasks);
}
@Override
public int hashCode() {
return Objects.hash(revision, wordCount, suggestionStatus, candidateDecisionArchiveRef, sourceAttribution, knowledgeDraftResult, followupTasks);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AcceptSuggestionResult {\n");
sb.append(" revision: ").append(toIndentedString(revision)).append("\n");
sb.append(" wordCount: ").append(toIndentedString(wordCount)).append("\n");
sb.append(" suggestionStatus: ").append(toIndentedString(suggestionStatus)).append("\n");
sb.append(" candidateDecisionArchiveRef: ").append(toIndentedString(candidateDecisionArchiveRef)).append("\n");
sb.append(" sourceAttribution: ").append(toIndentedString(sourceAttribution)).append("\n");
sb.append(" knowledgeDraftResult: ").append(toIndentedString(knowledgeDraftResult)).append("\n");
sb.append(" followupTasks: ").append(toIndentedString(followupTasks)).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 ");
}
}