Content 50 + AI 39 + Knowledge 59 + Market 32 + Account 33 + Meta 16 = 229 修复 Knowledge YAML 重复 key 重新生成 TypeScript 类型包(7 文件)+ Java DTO 骨架(626 类)
339 lines
9.4 KiB
Java
339 lines
9.4 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.JsonTypeName;
|
||
import com.fasterxml.jackson.annotation.JsonValue;
|
||
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;
|
||
|
||
/**
|
||
* CreateKnowledgeBindingPrecheckRequest
|
||
*/
|
||
|
||
@JsonTypeName("createKnowledgeBindingPrecheck_request")
|
||
@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 CreateKnowledgeBindingPrecheckRequest implements Serializable {
|
||
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
private String commandId;
|
||
|
||
/**
|
||
* 来源类型
|
||
*/
|
||
public enum SourceTypeEnum {
|
||
USER_KB("user_kb"),
|
||
|
||
MARKET_KB("market_kb"),
|
||
|
||
GLOBAL_KB("global_kb");
|
||
|
||
private final String value;
|
||
|
||
SourceTypeEnum(String value) {
|
||
this.value = value;
|
||
}
|
||
|
||
@JsonValue
|
||
public String getValue() {
|
||
return value;
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
return String.valueOf(value);
|
||
}
|
||
|
||
@JsonCreator
|
||
public static SourceTypeEnum fromValue(String value) {
|
||
for (SourceTypeEnum b : SourceTypeEnum.values()) {
|
||
if (b.value.equals(value)) {
|
||
return b;
|
||
}
|
||
}
|
||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||
}
|
||
}
|
||
|
||
private SourceTypeEnum sourceType;
|
||
|
||
private String sourceId;
|
||
|
||
private @Nullable Integer sourceVersion;
|
||
|
||
private @Nullable String handoffToken;
|
||
|
||
private @Nullable String authorizationSnapshotId;
|
||
|
||
/**
|
||
* Gets or Sets purposes
|
||
*/
|
||
public enum PurposesEnum {
|
||
SEARCH("search"),
|
||
|
||
GENERATE("generate"),
|
||
|
||
CHECK("check"),
|
||
|
||
EXPORT("export");
|
||
|
||
private final String value;
|
||
|
||
PurposesEnum(String value) {
|
||
this.value = value;
|
||
}
|
||
|
||
@JsonValue
|
||
public String getValue() {
|
||
return value;
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
return String.valueOf(value);
|
||
}
|
||
|
||
@JsonCreator
|
||
public static PurposesEnum fromValue(String value) {
|
||
for (PurposesEnum b : PurposesEnum.values()) {
|
||
if (b.value.equals(value)) {
|
||
return b;
|
||
}
|
||
}
|
||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||
}
|
||
}
|
||
|
||
@Valid
|
||
private List<PurposesEnum> purposes = new ArrayList<>();
|
||
|
||
public CreateKnowledgeBindingPrecheckRequest() {
|
||
super();
|
||
}
|
||
|
||
/**
|
||
* Constructor with only required parameters
|
||
*/
|
||
public CreateKnowledgeBindingPrecheckRequest(String commandId, SourceTypeEnum sourceType, String sourceId) {
|
||
this.commandId = commandId;
|
||
this.sourceType = sourceType;
|
||
this.sourceId = sourceId;
|
||
}
|
||
|
||
public CreateKnowledgeBindingPrecheckRequest 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 CreateKnowledgeBindingPrecheckRequest sourceType(SourceTypeEnum sourceType) {
|
||
this.sourceType = sourceType;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 来源类型
|
||
* @return sourceType
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "sourceType", description = "来源类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("sourceType")
|
||
public SourceTypeEnum getSourceType() {
|
||
return sourceType;
|
||
}
|
||
|
||
@JsonProperty("sourceType")
|
||
public void setSourceType(SourceTypeEnum sourceType) {
|
||
this.sourceType = sourceType;
|
||
}
|
||
|
||
public CreateKnowledgeBindingPrecheckRequest sourceId(String sourceId) {
|
||
this.sourceId = sourceId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 来源知识库 ID
|
||
* @return sourceId
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "sourceId", description = "来源知识库 ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("sourceId")
|
||
public String getSourceId() {
|
||
return sourceId;
|
||
}
|
||
|
||
@JsonProperty("sourceId")
|
||
public void setSourceId(String sourceId) {
|
||
this.sourceId = sourceId;
|
||
}
|
||
|
||
public CreateKnowledgeBindingPrecheckRequest 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 CreateKnowledgeBindingPrecheckRequest handoffToken(@Nullable String handoffToken) {
|
||
this.handoffToken = handoffToken;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 市场 handoff token(市场知识库时必填)
|
||
* @return handoffToken
|
||
*/
|
||
|
||
@Schema(name = "handoffToken", description = "市场 handoff token(市场知识库时必填)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("handoffToken")
|
||
public @Nullable String getHandoffToken() {
|
||
return handoffToken;
|
||
}
|
||
|
||
@JsonProperty("handoffToken")
|
||
public void setHandoffToken(@Nullable String handoffToken) {
|
||
this.handoffToken = handoffToken;
|
||
}
|
||
|
||
public CreateKnowledgeBindingPrecheckRequest 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 CreateKnowledgeBindingPrecheckRequest purposes(List<PurposesEnum> purposes) {
|
||
this.purposes = purposes;
|
||
return this;
|
||
}
|
||
|
||
public CreateKnowledgeBindingPrecheckRequest addPurposesItem(PurposesEnum purposesItem) {
|
||
if (this.purposes == null) {
|
||
this.purposes = new ArrayList<>();
|
||
}
|
||
this.purposes.add(purposesItem);
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 请求的用途
|
||
* @return purposes
|
||
*/
|
||
|
||
@Schema(name = "purposes", description = "请求的用途", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("purposes")
|
||
public List<PurposesEnum> getPurposes() {
|
||
return purposes;
|
||
}
|
||
|
||
@JsonProperty("purposes")
|
||
public void setPurposes(List<PurposesEnum> purposes) {
|
||
this.purposes = purposes;
|
||
}
|
||
|
||
@Override
|
||
public boolean equals(Object o) {
|
||
if (this == o) {
|
||
return true;
|
||
}
|
||
if (o == null || getClass() != o.getClass()) {
|
||
return false;
|
||
}
|
||
CreateKnowledgeBindingPrecheckRequest createKnowledgeBindingPrecheckRequest = (CreateKnowledgeBindingPrecheckRequest) o;
|
||
return Objects.equals(this.commandId, createKnowledgeBindingPrecheckRequest.commandId) &&
|
||
Objects.equals(this.sourceType, createKnowledgeBindingPrecheckRequest.sourceType) &&
|
||
Objects.equals(this.sourceId, createKnowledgeBindingPrecheckRequest.sourceId) &&
|
||
Objects.equals(this.sourceVersion, createKnowledgeBindingPrecheckRequest.sourceVersion) &&
|
||
Objects.equals(this.handoffToken, createKnowledgeBindingPrecheckRequest.handoffToken) &&
|
||
Objects.equals(this.authorizationSnapshotId, createKnowledgeBindingPrecheckRequest.authorizationSnapshotId) &&
|
||
Objects.equals(this.purposes, createKnowledgeBindingPrecheckRequest.purposes);
|
||
}
|
||
|
||
@Override
|
||
public int hashCode() {
|
||
return Objects.hash(commandId, sourceType, sourceId, sourceVersion, handoffToken, authorizationSnapshotId, purposes);
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
StringBuilder sb = new StringBuilder();
|
||
sb.append("class CreateKnowledgeBindingPrecheckRequest {\n");
|
||
sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n");
|
||
sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n");
|
||
sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n");
|
||
sb.append(" sourceVersion: ").append(toIndentedString(sourceVersion)).append("\n");
|
||
sb.append(" handoffToken: ").append(toIndentedString(handoffToken)).append("\n");
|
||
sb.append(" authorizationSnapshotId: ").append(toIndentedString(authorizationSnapshotId)).append("\n");
|
||
sb.append(" purposes: ").append(toIndentedString(purposes)).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 ");
|
||
}
|
||
}
|
||
|