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 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; /** * Content/Work 写命令的来源快照。用于在写入 Canonical 前校验调用方看到的内容版本、 来源状态、授权快照和目标 owner 边界,避免只凭 chapterId/blockId 裸写。 */ @Schema(name = "ContentSourceSnapshot", description = "Content/Work 写命令的来源快照。用于在写入 Canonical 前校验调用方看到的内容版本、 来源状态、授权快照和目标 owner 边界,避免只凭 chapterId/blockId 裸写。 ") @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 ContentSourceSnapshot implements Serializable { private static final long serialVersionUID = 1L; private @Nullable String sourceType; private @Nullable String sourceId; private @Nullable Integer sourceVersion; private @Nullable String authorizationSnapshotId; private @Nullable Integer contentRevision; public ContentSourceSnapshot sourceType(@Nullable String sourceType) { this.sourceType = sourceType; return this; } /** * 来源类型,如 user_original、ai_suggestion、imported_content * @return sourceType */ @Schema(name = "sourceType", description = "来源类型,如 user_original、ai_suggestion、imported_content", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("sourceType") public @Nullable String getSourceType() { return sourceType; } @JsonProperty("sourceType") public void setSourceType(@Nullable String sourceType) { this.sourceType = sourceType; } public ContentSourceSnapshot sourceId(@Nullable String sourceId) { this.sourceId = sourceId; return this; } /** * 来源对象 ID * @return sourceId */ @Schema(name = "sourceId", description = "来源对象 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("sourceId") public @Nullable String getSourceId() { return sourceId; } @JsonProperty("sourceId") public void setSourceId(@Nullable String sourceId) { this.sourceId = sourceId; } public ContentSourceSnapshot 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 ContentSourceSnapshot 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 ContentSourceSnapshot contentRevision(@Nullable Integer contentRevision) { this.contentRevision = contentRevision; return this; } /** * 调用方看到的目标内容 revision * @return contentRevision */ @Schema(name = "contentRevision", description = "调用方看到的目标内容 revision", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("contentRevision") public @Nullable Integer getContentRevision() { return contentRevision; } @JsonProperty("contentRevision") public void setContentRevision(@Nullable Integer contentRevision) { this.contentRevision = contentRevision; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ContentSourceSnapshot contentSourceSnapshot = (ContentSourceSnapshot) o; return Objects.equals(this.sourceType, contentSourceSnapshot.sourceType) && Objects.equals(this.sourceId, contentSourceSnapshot.sourceId) && Objects.equals(this.sourceVersion, contentSourceSnapshot.sourceVersion) && Objects.equals(this.authorizationSnapshotId, contentSourceSnapshot.authorizationSnapshotId) && Objects.equals(this.contentRevision, contentSourceSnapshot.contentRevision); } @Override public int hashCode() { return Objects.hash(sourceType, sourceId, sourceVersion, authorizationSnapshotId, contentRevision); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ContentSourceSnapshot {\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(" authorizationSnapshotId: ").append(toIndentedString(authorizationSnapshotId)).append("\n"); sb.append(" contentRevision: ").append(toIndentedString(contentRevision)).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 "); } }