Content 50 + AI 39 + Knowledge 59 + Market 32 + Account 33 + Meta 16 = 229 修复 Knowledge YAML 重复 key 重新生成 TypeScript 类型包(7 文件)+ Java DTO 骨架(626 类)
409 lines
13 KiB
Java
409 lines
13 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 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;
|
||
|
||
/**
|
||
* AcceptSuggestionRequest
|
||
*/
|
||
|
||
@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 AcceptSuggestionRequest implements Serializable {
|
||
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
private String commandId;
|
||
|
||
private Integer expectedRevision;
|
||
|
||
/**
|
||
* 接受模式:原样接受或修改后合并
|
||
*/
|
||
public enum AcceptModeEnum {
|
||
ACCEPT_AS_IS("accept_as_is"),
|
||
|
||
MERGE_AFTER_EDIT("merge_after_edit");
|
||
|
||
private final String value;
|
||
|
||
AcceptModeEnum(String value) {
|
||
this.value = value;
|
||
}
|
||
|
||
@JsonValue
|
||
public String getValue() {
|
||
return value;
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
return String.valueOf(value);
|
||
}
|
||
|
||
@JsonCreator
|
||
public static AcceptModeEnum fromValue(String value) {
|
||
for (AcceptModeEnum b : AcceptModeEnum.values()) {
|
||
if (b.value.equals(value)) {
|
||
return b;
|
||
}
|
||
}
|
||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||
}
|
||
}
|
||
|
||
private AcceptModeEnum acceptMode;
|
||
|
||
private @Nullable String finalContent;
|
||
|
||
private @Nullable Integer qualityResultVersion;
|
||
|
||
private @Nullable String outputComplianceResultId;
|
||
|
||
private @Nullable String staticCheckResultId;
|
||
|
||
private @Nullable String sourceSnapshotId;
|
||
|
||
private @Nullable Integer sourceVersion;
|
||
|
||
private @Nullable String authorizationSnapshotId;
|
||
|
||
private @Nullable String workAssetUsePrecheckId;
|
||
|
||
private @Nullable String auditReason;
|
||
|
||
public AcceptSuggestionRequest() {
|
||
super();
|
||
}
|
||
|
||
/**
|
||
* Constructor with only required parameters
|
||
*/
|
||
public AcceptSuggestionRequest(String commandId, Integer expectedRevision, AcceptModeEnum acceptMode) {
|
||
this.commandId = commandId;
|
||
this.expectedRevision = expectedRevision;
|
||
this.acceptMode = acceptMode;
|
||
}
|
||
|
||
public AcceptSuggestionRequest commandId(String commandId) {
|
||
this.commandId = commandId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 幂等键
|
||
* @return commandId
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "commandId", description = "幂等键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("commandId")
|
||
public String getCommandId() {
|
||
return commandId;
|
||
}
|
||
|
||
@JsonProperty("commandId")
|
||
public void setCommandId(String commandId) {
|
||
this.commandId = commandId;
|
||
}
|
||
|
||
public AcceptSuggestionRequest expectedRevision(Integer expectedRevision) {
|
||
this.expectedRevision = expectedRevision;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 目标 Block 当前 revision(乐观锁)
|
||
* @return expectedRevision
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "expectedRevision", description = "目标 Block 当前 revision(乐观锁)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("expectedRevision")
|
||
public Integer getExpectedRevision() {
|
||
return expectedRevision;
|
||
}
|
||
|
||
@JsonProperty("expectedRevision")
|
||
public void setExpectedRevision(Integer expectedRevision) {
|
||
this.expectedRevision = expectedRevision;
|
||
}
|
||
|
||
public AcceptSuggestionRequest acceptMode(AcceptModeEnum acceptMode) {
|
||
this.acceptMode = acceptMode;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 接受模式:原样接受或修改后合并
|
||
* @return acceptMode
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "acceptMode", description = "接受模式:原样接受或修改后合并", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("acceptMode")
|
||
public AcceptModeEnum getAcceptMode() {
|
||
return acceptMode;
|
||
}
|
||
|
||
@JsonProperty("acceptMode")
|
||
public void setAcceptMode(AcceptModeEnum acceptMode) {
|
||
this.acceptMode = acceptMode;
|
||
}
|
||
|
||
public AcceptSuggestionRequest finalContent(@Nullable String finalContent) {
|
||
this.finalContent = finalContent;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 修改后合并时的最终内容(acceptMode=merge_after_edit 时必填)
|
||
* @return finalContent
|
||
*/
|
||
|
||
@Schema(name = "finalContent", description = "修改后合并时的最终内容(acceptMode=merge_after_edit 时必填)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("finalContent")
|
||
public @Nullable String getFinalContent() {
|
||
return finalContent;
|
||
}
|
||
|
||
@JsonProperty("finalContent")
|
||
public void setFinalContent(@Nullable String finalContent) {
|
||
this.finalContent = finalContent;
|
||
}
|
||
|
||
public AcceptSuggestionRequest qualityResultVersion(@Nullable Integer qualityResultVersion) {
|
||
this.qualityResultVersion = qualityResultVersion;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 候选质量结果版本
|
||
* @return qualityResultVersion
|
||
*/
|
||
|
||
@Schema(name = "qualityResultVersion", description = "候选质量结果版本", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("qualityResultVersion")
|
||
public @Nullable Integer getQualityResultVersion() {
|
||
return qualityResultVersion;
|
||
}
|
||
|
||
@JsonProperty("qualityResultVersion")
|
||
public void setQualityResultVersion(@Nullable Integer qualityResultVersion) {
|
||
this.qualityResultVersion = qualityResultVersion;
|
||
}
|
||
|
||
public AcceptSuggestionRequest outputComplianceResultId(@Nullable String outputComplianceResultId) {
|
||
this.outputComplianceResultId = outputComplianceResultId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 输出合规结果 ID
|
||
* @return outputComplianceResultId
|
||
*/
|
||
|
||
@Schema(name = "outputComplianceResultId", description = "输出合规结果 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("outputComplianceResultId")
|
||
public @Nullable String getOutputComplianceResultId() {
|
||
return outputComplianceResultId;
|
||
}
|
||
|
||
@JsonProperty("outputComplianceResultId")
|
||
public void setOutputComplianceResultId(@Nullable String outputComplianceResultId) {
|
||
this.outputComplianceResultId = outputComplianceResultId;
|
||
}
|
||
|
||
public AcceptSuggestionRequest staticCheckResultId(@Nullable String staticCheckResultId) {
|
||
this.staticCheckResultId = staticCheckResultId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 静态检查结果 ID
|
||
* @return staticCheckResultId
|
||
*/
|
||
|
||
@Schema(name = "staticCheckResultId", description = "静态检查结果 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("staticCheckResultId")
|
||
public @Nullable String getStaticCheckResultId() {
|
||
return staticCheckResultId;
|
||
}
|
||
|
||
@JsonProperty("staticCheckResultId")
|
||
public void setStaticCheckResultId(@Nullable String staticCheckResultId) {
|
||
this.staticCheckResultId = staticCheckResultId;
|
||
}
|
||
|
||
public AcceptSuggestionRequest 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 AcceptSuggestionRequest 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 AcceptSuggestionRequest authorizationSnapshotId(@Nullable String authorizationSnapshotId) {
|
||
this.authorizationSnapshotId = authorizationSnapshotId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 授权快照 ID
|
||
* @return authorizationSnapshotId
|
||
*/
|
||
|
||
@Schema(name = "authorizationSnapshotId", description = "授权快照 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("authorizationSnapshotId")
|
||
public @Nullable String getAuthorizationSnapshotId() {
|
||
return authorizationSnapshotId;
|
||
}
|
||
|
||
@JsonProperty("authorizationSnapshotId")
|
||
public void setAuthorizationSnapshotId(@Nullable String authorizationSnapshotId) {
|
||
this.authorizationSnapshotId = authorizationSnapshotId;
|
||
}
|
||
|
||
public AcceptSuggestionRequest workAssetUsePrecheckId(@Nullable String workAssetUsePrecheckId) {
|
||
this.workAssetUsePrecheckId = workAssetUsePrecheckId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 使用市场作品资产作为参考或上下文时的预检 ID
|
||
* @return workAssetUsePrecheckId
|
||
*/
|
||
|
||
@Schema(name = "workAssetUsePrecheckId", description = "使用市场作品资产作为参考或上下文时的预检 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("workAssetUsePrecheckId")
|
||
public @Nullable String getWorkAssetUsePrecheckId() {
|
||
return workAssetUsePrecheckId;
|
||
}
|
||
|
||
@JsonProperty("workAssetUsePrecheckId")
|
||
public void setWorkAssetUsePrecheckId(@Nullable String workAssetUsePrecheckId) {
|
||
this.workAssetUsePrecheckId = workAssetUsePrecheckId;
|
||
}
|
||
|
||
public AcceptSuggestionRequest auditReason(@Nullable String auditReason) {
|
||
this.auditReason = auditReason;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 用户接受/修改合并原因
|
||
* @return auditReason
|
||
*/
|
||
|
||
@Schema(name = "auditReason", description = "用户接受/修改合并原因", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("auditReason")
|
||
public @Nullable String getAuditReason() {
|
||
return auditReason;
|
||
}
|
||
|
||
@JsonProperty("auditReason")
|
||
public void setAuditReason(@Nullable String auditReason) {
|
||
this.auditReason = auditReason;
|
||
}
|
||
|
||
@Override
|
||
public boolean equals(Object o) {
|
||
if (this == o) {
|
||
return true;
|
||
}
|
||
if (o == null || getClass() != o.getClass()) {
|
||
return false;
|
||
}
|
||
AcceptSuggestionRequest acceptSuggestionRequest = (AcceptSuggestionRequest) o;
|
||
return Objects.equals(this.commandId, acceptSuggestionRequest.commandId) &&
|
||
Objects.equals(this.expectedRevision, acceptSuggestionRequest.expectedRevision) &&
|
||
Objects.equals(this.acceptMode, acceptSuggestionRequest.acceptMode) &&
|
||
Objects.equals(this.finalContent, acceptSuggestionRequest.finalContent) &&
|
||
Objects.equals(this.qualityResultVersion, acceptSuggestionRequest.qualityResultVersion) &&
|
||
Objects.equals(this.outputComplianceResultId, acceptSuggestionRequest.outputComplianceResultId) &&
|
||
Objects.equals(this.staticCheckResultId, acceptSuggestionRequest.staticCheckResultId) &&
|
||
Objects.equals(this.sourceSnapshotId, acceptSuggestionRequest.sourceSnapshotId) &&
|
||
Objects.equals(this.sourceVersion, acceptSuggestionRequest.sourceVersion) &&
|
||
Objects.equals(this.authorizationSnapshotId, acceptSuggestionRequest.authorizationSnapshotId) &&
|
||
Objects.equals(this.workAssetUsePrecheckId, acceptSuggestionRequest.workAssetUsePrecheckId) &&
|
||
Objects.equals(this.auditReason, acceptSuggestionRequest.auditReason);
|
||
}
|
||
|
||
@Override
|
||
public int hashCode() {
|
||
return Objects.hash(commandId, expectedRevision, acceptMode, finalContent, qualityResultVersion, outputComplianceResultId, staticCheckResultId, sourceSnapshotId, sourceVersion, authorizationSnapshotId, workAssetUsePrecheckId, auditReason);
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
StringBuilder sb = new StringBuilder();
|
||
sb.append("class AcceptSuggestionRequest {\n");
|
||
sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n");
|
||
sb.append(" expectedRevision: ").append(toIndentedString(expectedRevision)).append("\n");
|
||
sb.append(" acceptMode: ").append(toIndentedString(acceptMode)).append("\n");
|
||
sb.append(" finalContent: ").append(toIndentedString(finalContent)).append("\n");
|
||
sb.append(" qualityResultVersion: ").append(toIndentedString(qualityResultVersion)).append("\n");
|
||
sb.append(" outputComplianceResultId: ").append(toIndentedString(outputComplianceResultId)).append("\n");
|
||
sb.append(" staticCheckResultId: ").append(toIndentedString(staticCheckResultId)).append("\n");
|
||
sb.append(" sourceSnapshotId: ").append(toIndentedString(sourceSnapshotId)).append("\n");
|
||
sb.append(" sourceVersion: ").append(toIndentedString(sourceVersion)).append("\n");
|
||
sb.append(" authorizationSnapshotId: ").append(toIndentedString(authorizationSnapshotId)).append("\n");
|
||
sb.append(" workAssetUsePrecheckId: ").append(toIndentedString(workAssetUsePrecheckId)).append("\n");
|
||
sb.append(" auditReason: ").append(toIndentedString(auditReason)).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 ");
|
||
}
|
||
}
|
||
|