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.time.OffsetDateTime; import org.springframework.format.annotation.DateTimeFormat; 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; /** * MetaSchemaSummary */ @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 MetaSchemaSummary implements Serializable { private static final long serialVersionUID = 1L; private String schemaKey; private String displayName; /** * Gets or Sets scope */ public enum ScopeEnum { GLOBAL("global"), TENANT("tenant"), USER("user"), WORK("work"); private final String value; ScopeEnum(String value) { this.value = value; } @JsonValue public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } @JsonCreator public static ScopeEnum fromValue(String value) { for (ScopeEnum b : ScopeEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } private ScopeEnum scope; private @Nullable String targetType; private Integer activeVersion; private @Nullable Integer grayVersion; private @Nullable Integer draftVersion; private @Nullable Integer fieldCount; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime updatedAt; public MetaSchemaSummary() { super(); } /** * Constructor with only required parameters */ public MetaSchemaSummary(String schemaKey, String displayName, ScopeEnum scope, Integer activeVersion) { this.schemaKey = schemaKey; this.displayName = displayName; this.scope = scope; this.activeVersion = activeVersion; } public MetaSchemaSummary schemaKey(String schemaKey) { this.schemaKey = schemaKey; return this; } /** * Schema 业务标识 * @return schemaKey */ @NotNull @Schema(name = "schemaKey", description = "Schema 业务标识", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("schemaKey") public String getSchemaKey() { return schemaKey; } @JsonProperty("schemaKey") public void setSchemaKey(String schemaKey) { this.schemaKey = schemaKey; } public MetaSchemaSummary displayName(String displayName) { this.displayName = displayName; return this; } /** * 显示名称 * @return displayName */ @NotNull @Schema(name = "displayName", description = "显示名称", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("displayName") public String getDisplayName() { return displayName; } @JsonProperty("displayName") public void setDisplayName(String displayName) { this.displayName = displayName; } public MetaSchemaSummary scope(ScopeEnum scope) { this.scope = scope; return this; } /** * Get scope * @return scope */ @NotNull @Schema(name = "scope", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("scope") public ScopeEnum getScope() { return scope; } @JsonProperty("scope") public void setScope(ScopeEnum scope) { this.scope = scope; } public MetaSchemaSummary targetType(@Nullable String targetType) { this.targetType = targetType; return this; } /** * 目标类型(work / chapter / block / agent / knowledge_base) * @return targetType */ @Schema(name = "targetType", description = "目标类型(work / chapter / block / agent / knowledge_base)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("targetType") public @Nullable String getTargetType() { return targetType; } @JsonProperty("targetType") public void setTargetType(@Nullable String targetType) { this.targetType = targetType; } public MetaSchemaSummary activeVersion(Integer activeVersion) { this.activeVersion = activeVersion; return this; } /** * 当前激活版本号 * @return activeVersion */ @NotNull @Schema(name = "activeVersion", description = "当前激活版本号", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("activeVersion") public Integer getActiveVersion() { return activeVersion; } @JsonProperty("activeVersion") public void setActiveVersion(Integer activeVersion) { this.activeVersion = activeVersion; } public MetaSchemaSummary grayVersion(@Nullable Integer grayVersion) { this.grayVersion = grayVersion; return this; } /** * 当前灰度版本号(若有) * @return grayVersion */ @Schema(name = "grayVersion", description = "当前灰度版本号(若有)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("grayVersion") public @Nullable Integer getGrayVersion() { return grayVersion; } @JsonProperty("grayVersion") public void setGrayVersion(@Nullable Integer grayVersion) { this.grayVersion = grayVersion; } public MetaSchemaSummary draftVersion(@Nullable Integer draftVersion) { this.draftVersion = draftVersion; return this; } /** * 最新草稿版本号(若有) * @return draftVersion */ @Schema(name = "draftVersion", description = "最新草稿版本号(若有)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("draftVersion") public @Nullable Integer getDraftVersion() { return draftVersion; } @JsonProperty("draftVersion") public void setDraftVersion(@Nullable Integer draftVersion) { this.draftVersion = draftVersion; } public MetaSchemaSummary fieldCount(@Nullable Integer fieldCount) { this.fieldCount = fieldCount; return this; } /** * 字段数量 * @return fieldCount */ @Schema(name = "fieldCount", description = "字段数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("fieldCount") public @Nullable Integer getFieldCount() { return fieldCount; } @JsonProperty("fieldCount") public void setFieldCount(@Nullable Integer fieldCount) { this.fieldCount = fieldCount; } public MetaSchemaSummary updatedAt(@Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } /** * Get updatedAt * @return updatedAt */ @Valid @Schema(name = "updatedAt", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("updatedAt") public @Nullable OffsetDateTime getUpdatedAt() { return updatedAt; } @JsonProperty("updatedAt") public void setUpdatedAt(@Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } MetaSchemaSummary metaSchemaSummary = (MetaSchemaSummary) o; return Objects.equals(this.schemaKey, metaSchemaSummary.schemaKey) && Objects.equals(this.displayName, metaSchemaSummary.displayName) && Objects.equals(this.scope, metaSchemaSummary.scope) && Objects.equals(this.targetType, metaSchemaSummary.targetType) && Objects.equals(this.activeVersion, metaSchemaSummary.activeVersion) && Objects.equals(this.grayVersion, metaSchemaSummary.grayVersion) && Objects.equals(this.draftVersion, metaSchemaSummary.draftVersion) && Objects.equals(this.fieldCount, metaSchemaSummary.fieldCount) && Objects.equals(this.updatedAt, metaSchemaSummary.updatedAt); } @Override public int hashCode() { return Objects.hash(schemaKey, displayName, scope, targetType, activeVersion, grayVersion, draftVersion, fieldCount, updatedAt); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MetaSchemaSummary {\n"); sb.append(" schemaKey: ").append(toIndentedString(schemaKey)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" targetType: ").append(toIndentedString(targetType)).append("\n"); sb.append(" activeVersion: ").append(toIndentedString(activeVersion)).append("\n"); sb.append(" grayVersion: ").append(toIndentedString(grayVersion)).append("\n"); sb.append(" draftVersion: ").append(toIndentedString(draftVersion)).append("\n"); sb.append(" fieldCount: ").append(toIndentedString(fieldCount)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 "); } }