oh-my-muse/docs/api-contracts/generated/java/com/muse/dto/CreateKnowledgeBindingPrecheckRequest.java

436 lines
12 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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-24T16:47:40.290595+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 Integer sourceVersion;
/**
* 来源状态快照;不能用 needs_recheck 表达重验,重验原因由 actionPolicy 返回
*/
public enum SourceStatusEnum {
AVAILABLE("available"),
AUTHORIZATION_EXPIRED("authorization_expired"),
SOURCE_DELISTED("source_delisted"),
SOURCE_RECALLED("source_recalled"),
SOURCE_REVOKED("source_revoked"),
UNAVAILABLE("unavailable");
private final String value;
SourceStatusEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static SourceStatusEnum fromValue(String value) {
for (SourceStatusEnum b : SourceStatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private SourceStatusEnum sourceStatus;
private @Nullable String handoffToken;
private String authorizationSummaryId;
private 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, Integer sourceVersion, SourceStatusEnum sourceStatus, String authorizationSummaryId, String authorizationSnapshotId) {
this.commandId = commandId;
this.sourceType = sourceType;
this.sourceId = sourceId;
this.sourceVersion = sourceVersion;
this.sourceStatus = sourceStatus;
this.authorizationSummaryId = authorizationSummaryId;
this.authorizationSnapshotId = authorizationSnapshotId;
}
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(Integer sourceVersion) {
this.sourceVersion = sourceVersion;
return this;
}
/**
* 来源版本
* @return sourceVersion
*/
@NotNull
@Schema(name = "sourceVersion", description = "来源版本", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("sourceVersion")
public Integer getSourceVersion() {
return sourceVersion;
}
@JsonProperty("sourceVersion")
public void setSourceVersion(Integer sourceVersion) {
this.sourceVersion = sourceVersion;
}
public CreateKnowledgeBindingPrecheckRequest sourceStatus(SourceStatusEnum sourceStatus) {
this.sourceStatus = sourceStatus;
return this;
}
/**
* 来源状态快照;不能用 needs_recheck 表达重验,重验原因由 actionPolicy 返回
* @return sourceStatus
*/
@NotNull
@Schema(name = "sourceStatus", description = "来源状态快照;不能用 needs_recheck 表达重验,重验原因由 actionPolicy 返回", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("sourceStatus")
public SourceStatusEnum getSourceStatus() {
return sourceStatus;
}
@JsonProperty("sourceStatus")
public void setSourceStatus(SourceStatusEnum sourceStatus) {
this.sourceStatus = sourceStatus;
}
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 authorizationSummaryId(String authorizationSummaryId) {
this.authorizationSummaryId = authorizationSummaryId;
return this;
}
/**
* Market 生成的来源侧授权摘要 ID
* @return authorizationSummaryId
*/
@NotNull
@Schema(name = "authorizationSummaryId", description = "Market 生成的来源侧授权摘要 ID", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("authorizationSummaryId")
public String getAuthorizationSummaryId() {
return authorizationSummaryId;
}
@JsonProperty("authorizationSummaryId")
public void setAuthorizationSummaryId(String authorizationSummaryId) {
this.authorizationSummaryId = authorizationSummaryId;
}
public CreateKnowledgeBindingPrecheckRequest authorizationSnapshotId(String authorizationSnapshotId) {
this.authorizationSnapshotId = authorizationSnapshotId;
return this;
}
/**
* 授权快照 ID
* @return authorizationSnapshotId
*/
@NotNull
@Schema(name = "authorizationSnapshotId", description = "授权快照 ID", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("authorizationSnapshotId")
public String getAuthorizationSnapshotId() {
return authorizationSnapshotId;
}
@JsonProperty("authorizationSnapshotId")
public void setAuthorizationSnapshotId(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.sourceStatus, createKnowledgeBindingPrecheckRequest.sourceStatus) &&
Objects.equals(this.handoffToken, createKnowledgeBindingPrecheckRequest.handoffToken) &&
Objects.equals(this.authorizationSummaryId, createKnowledgeBindingPrecheckRequest.authorizationSummaryId) &&
Objects.equals(this.authorizationSnapshotId, createKnowledgeBindingPrecheckRequest.authorizationSnapshotId) &&
Objects.equals(this.purposes, createKnowledgeBindingPrecheckRequest.purposes);
}
@Override
public int hashCode() {
return Objects.hash(commandId, sourceType, sourceId, sourceVersion, sourceStatus, handoffToken, authorizationSummaryId, 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(" sourceStatus: ").append(toIndentedString(sourceStatus)).append("\n");
sb.append(" handoffToken: ").append(toIndentedString(handoffToken)).append("\n");
sb.append(" authorizationSummaryId: ").append(toIndentedString(authorizationSummaryId)).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 ");
}
}