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

366 lines
9.7 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.UUID;
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;
/**
* RecheckSourceStatusRequest
*/
@JsonTypeName("recheckSourceStatus_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 RecheckSourceStatusRequest implements Serializable {
private static final long serialVersionUID = 1L;
private String commandId;
private String sourceType;
private UUID sourceId;
private @Nullable Integer sourceVersion;
/**
* 用途
*/
public enum PurposeEnum {
BIND("bind"),
GENERATE("generate"),
EXPORT("export"),
PUBLISH("publish"),
CONFIRM("confirm"),
INSTALL("install"),
HANDOFF("handoff");
private final String value;
PurposeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static PurposeEnum fromValue(String value) {
for (PurposeEnum b : PurposeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private PurposeEnum purpose;
/**
* 目标 owner
*/
public enum TargetOwnerEnum {
CONTENT("content"),
KNOWLEDGE("knowledge"),
AI("ai"),
MARKET("market"),
ACCOUNT("account");
private final String value;
TargetOwnerEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TargetOwnerEnum fromValue(String value) {
for (TargetOwnerEnum b : TargetOwnerEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private TargetOwnerEnum targetOwner;
private UUID targetId;
private @Nullable String authorizationSnapshotId;
public RecheckSourceStatusRequest() {
super();
}
/**
* Constructor with only required parameters
*/
public RecheckSourceStatusRequest(String commandId, String sourceType, UUID sourceId, PurposeEnum purpose, TargetOwnerEnum targetOwner, UUID targetId) {
this.commandId = commandId;
this.sourceType = sourceType;
this.sourceId = sourceId;
this.purpose = purpose;
this.targetOwner = targetOwner;
this.targetId = targetId;
}
public RecheckSourceStatusRequest 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 RecheckSourceStatusRequest sourceType(String sourceType) {
this.sourceType = sourceType;
return this;
}
/**
* 来源对象类型
* @return sourceType
*/
@NotNull
@Schema(name = "sourceType", description = "来源对象类型", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("sourceType")
public String getSourceType() {
return sourceType;
}
@JsonProperty("sourceType")
public void setSourceType(String sourceType) {
this.sourceType = sourceType;
}
public RecheckSourceStatusRequest sourceId(UUID sourceId) {
this.sourceId = sourceId;
return this;
}
/**
* 来源对象 ID
* @return sourceId
*/
@NotNull @Valid
@Schema(name = "sourceId", description = "来源对象 ID", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("sourceId")
public UUID getSourceId() {
return sourceId;
}
@JsonProperty("sourceId")
public void setSourceId(UUID sourceId) {
this.sourceId = sourceId;
}
public RecheckSourceStatusRequest 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 RecheckSourceStatusRequest purpose(PurposeEnum purpose) {
this.purpose = purpose;
return this;
}
/**
* 用途
* @return purpose
*/
@NotNull
@Schema(name = "purpose", description = "用途", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("purpose")
public PurposeEnum getPurpose() {
return purpose;
}
@JsonProperty("purpose")
public void setPurpose(PurposeEnum purpose) {
this.purpose = purpose;
}
public RecheckSourceStatusRequest targetOwner(TargetOwnerEnum targetOwner) {
this.targetOwner = targetOwner;
return this;
}
/**
* 目标 owner
* @return targetOwner
*/
@NotNull
@Schema(name = "targetOwner", description = "目标 owner", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("targetOwner")
public TargetOwnerEnum getTargetOwner() {
return targetOwner;
}
@JsonProperty("targetOwner")
public void setTargetOwner(TargetOwnerEnum targetOwner) {
this.targetOwner = targetOwner;
}
public RecheckSourceStatusRequest targetId(UUID targetId) {
this.targetId = targetId;
return this;
}
/**
* 目标对象 ID
* @return targetId
*/
@NotNull @Valid
@Schema(name = "targetId", description = "目标对象 ID", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("targetId")
public UUID getTargetId() {
return targetId;
}
@JsonProperty("targetId")
public void setTargetId(UUID targetId) {
this.targetId = targetId;
}
public RecheckSourceStatusRequest authorizationSnapshotId(@Nullable String authorizationSnapshotId) {
this.authorizationSnapshotId = authorizationSnapshotId;
return this;
}
/**
* 调用方当前持有的授权快照
* @return authorizationSnapshotId
*/
@Schema(name = "authorizationSnapshotId", description = "调用方当前持有的授权快照", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("authorizationSnapshotId")
public @Nullable String getAuthorizationSnapshotId() {
return authorizationSnapshotId;
}
@JsonProperty("authorizationSnapshotId")
public void setAuthorizationSnapshotId(@Nullable String authorizationSnapshotId) {
this.authorizationSnapshotId = authorizationSnapshotId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
RecheckSourceStatusRequest recheckSourceStatusRequest = (RecheckSourceStatusRequest) o;
return Objects.equals(this.commandId, recheckSourceStatusRequest.commandId) &&
Objects.equals(this.sourceType, recheckSourceStatusRequest.sourceType) &&
Objects.equals(this.sourceId, recheckSourceStatusRequest.sourceId) &&
Objects.equals(this.sourceVersion, recheckSourceStatusRequest.sourceVersion) &&
Objects.equals(this.purpose, recheckSourceStatusRequest.purpose) &&
Objects.equals(this.targetOwner, recheckSourceStatusRequest.targetOwner) &&
Objects.equals(this.targetId, recheckSourceStatusRequest.targetId) &&
Objects.equals(this.authorizationSnapshotId, recheckSourceStatusRequest.authorizationSnapshotId);
}
@Override
public int hashCode() {
return Objects.hash(commandId, sourceType, sourceId, sourceVersion, purpose, targetOwner, targetId, authorizationSnapshotId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RecheckSourceStatusRequest {\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(" purpose: ").append(toIndentedString(purpose)).append("\n");
sb.append(" targetOwner: ").append(toIndentedString(targetOwner)).append("\n");
sb.append(" targetId: ").append(toIndentedString(targetId)).append("\n");
sb.append(" authorizationSnapshotId: ").append(toIndentedString(authorizationSnapshotId)).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 ");
}
}