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 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; /** * SourceStatusQueryRequest */ @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 SourceStatusQueryRequest implements Serializable { private static final long serialVersionUID = 1L; private String sourceType; private UUID sourceId; /** * 用途 */ 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 Integer sourceVersion; private @Nullable String authorizationSnapshotId; public SourceStatusQueryRequest() { super(); } /** * Constructor with only required parameters */ public SourceStatusQueryRequest(String sourceType, UUID sourceId, PurposeEnum purpose, TargetOwnerEnum targetOwner, UUID targetId) { this.sourceType = sourceType; this.sourceId = sourceId; this.purpose = purpose; this.targetOwner = targetOwner; this.targetId = targetId; } public SourceStatusQueryRequest 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 SourceStatusQueryRequest 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 SourceStatusQueryRequest 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 SourceStatusQueryRequest 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 SourceStatusQueryRequest 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 SourceStatusQueryRequest 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 SourceStatusQueryRequest 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; } SourceStatusQueryRequest sourceStatusQueryRequest = (SourceStatusQueryRequest) o; return Objects.equals(this.sourceType, sourceStatusQueryRequest.sourceType) && Objects.equals(this.sourceId, sourceStatusQueryRequest.sourceId) && Objects.equals(this.purpose, sourceStatusQueryRequest.purpose) && Objects.equals(this.targetOwner, sourceStatusQueryRequest.targetOwner) && Objects.equals(this.targetId, sourceStatusQueryRequest.targetId) && Objects.equals(this.sourceVersion, sourceStatusQueryRequest.sourceVersion) && Objects.equals(this.authorizationSnapshotId, sourceStatusQueryRequest.authorizationSnapshotId); } @Override public int hashCode() { return Objects.hash(sourceType, sourceId, purpose, targetOwner, targetId, sourceVersion, authorizationSnapshotId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SourceStatusQueryRequest {\n"); sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); sb.append(" sourceId: ").append(toIndentedString(sourceId)).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(" sourceVersion: ").append(toIndentedString(sourceVersion)).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 "); } }