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

520 lines
15 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.JsonValue;
import com.muse.dto.GrayRulesSummary;
import com.muse.dto.MetaField;
import com.muse.dto.MetaSchemaDetailInheritedSchemasInner;
import com.muse.dto.MetaSchemaImpactSummary;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
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;
/**
* MetaSchemaDetail
*/
@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 MetaSchemaDetail implements Serializable {
private static final long serialVersionUID = 1L;
private String schemaKey;
private String displayName;
private @Nullable String description;
/**
* 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;
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
private @Nullable OffsetDateTime activeVersionPublishedAt;
private @Nullable Integer grayVersion;
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
private @Nullable OffsetDateTime grayVersionPublishedAt;
private @Nullable GrayRulesSummary grayRules;
@Valid
private List<@Valid MetaField> fields = new ArrayList<>();
@Valid
private List<@Valid MetaSchemaDetailInheritedSchemasInner> inheritedSchemas = new ArrayList<>();
private @Nullable MetaSchemaImpactSummary impactSummary;
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
private @Nullable OffsetDateTime createdAt;
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
private @Nullable OffsetDateTime updatedAt;
public MetaSchemaDetail() {
super();
}
/**
* Constructor with only required parameters
*/
public MetaSchemaDetail(String schemaKey, String displayName, ScopeEnum scope, Integer activeVersion) {
this.schemaKey = schemaKey;
this.displayName = displayName;
this.scope = scope;
this.activeVersion = activeVersion;
}
public MetaSchemaDetail schemaKey(String schemaKey) {
this.schemaKey = schemaKey;
return this;
}
/**
* Get schemaKey
* @return schemaKey
*/
@NotNull
@Schema(name = "schemaKey", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("schemaKey")
public String getSchemaKey() {
return schemaKey;
}
@JsonProperty("schemaKey")
public void setSchemaKey(String schemaKey) {
this.schemaKey = schemaKey;
}
public MetaSchemaDetail displayName(String displayName) {
this.displayName = displayName;
return this;
}
/**
* Get displayName
* @return displayName
*/
@NotNull
@Schema(name = "displayName", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("displayName")
public String getDisplayName() {
return displayName;
}
@JsonProperty("displayName")
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public MetaSchemaDetail description(@Nullable String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
*/
@Schema(name = "description", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("description")
public @Nullable String getDescription() {
return description;
}
@JsonProperty("description")
public void setDescription(@Nullable String description) {
this.description = description;
}
public MetaSchemaDetail 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 MetaSchemaDetail targetType(@Nullable String targetType) {
this.targetType = targetType;
return this;
}
/**
* Get targetType
* @return targetType
*/
@Schema(name = "targetType", 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 MetaSchemaDetail activeVersion(Integer activeVersion) {
this.activeVersion = activeVersion;
return this;
}
/**
* Get activeVersion
* @return activeVersion
*/
@NotNull
@Schema(name = "activeVersion", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("activeVersion")
public Integer getActiveVersion() {
return activeVersion;
}
@JsonProperty("activeVersion")
public void setActiveVersion(Integer activeVersion) {
this.activeVersion = activeVersion;
}
public MetaSchemaDetail activeVersionPublishedAt(@Nullable OffsetDateTime activeVersionPublishedAt) {
this.activeVersionPublishedAt = activeVersionPublishedAt;
return this;
}
/**
* Get activeVersionPublishedAt
* @return activeVersionPublishedAt
*/
@Valid
@Schema(name = "activeVersionPublishedAt", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("activeVersionPublishedAt")
public @Nullable OffsetDateTime getActiveVersionPublishedAt() {
return activeVersionPublishedAt;
}
@JsonProperty("activeVersionPublishedAt")
public void setActiveVersionPublishedAt(@Nullable OffsetDateTime activeVersionPublishedAt) {
this.activeVersionPublishedAt = activeVersionPublishedAt;
}
public MetaSchemaDetail grayVersion(@Nullable Integer grayVersion) {
this.grayVersion = grayVersion;
return this;
}
/**
* Get grayVersion
* @return grayVersion
*/
@Schema(name = "grayVersion", 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 MetaSchemaDetail grayVersionPublishedAt(@Nullable OffsetDateTime grayVersionPublishedAt) {
this.grayVersionPublishedAt = grayVersionPublishedAt;
return this;
}
/**
* Get grayVersionPublishedAt
* @return grayVersionPublishedAt
*/
@Valid
@Schema(name = "grayVersionPublishedAt", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("grayVersionPublishedAt")
public @Nullable OffsetDateTime getGrayVersionPublishedAt() {
return grayVersionPublishedAt;
}
@JsonProperty("grayVersionPublishedAt")
public void setGrayVersionPublishedAt(@Nullable OffsetDateTime grayVersionPublishedAt) {
this.grayVersionPublishedAt = grayVersionPublishedAt;
}
public MetaSchemaDetail grayRules(@Nullable GrayRulesSummary grayRules) {
this.grayRules = grayRules;
return this;
}
/**
* Get grayRules
* @return grayRules
*/
@Valid
@Schema(name = "grayRules", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("grayRules")
public @Nullable GrayRulesSummary getGrayRules() {
return grayRules;
}
@JsonProperty("grayRules")
public void setGrayRules(@Nullable GrayRulesSummary grayRules) {
this.grayRules = grayRules;
}
public MetaSchemaDetail fields(List<@Valid MetaField> fields) {
this.fields = fields;
return this;
}
public MetaSchemaDetail addFieldsItem(MetaField fieldsItem) {
if (this.fields == null) {
this.fields = new ArrayList<>();
}
this.fields.add(fieldsItem);
return this;
}
/**
* 当前 active 版本字段列表
* @return fields
*/
@Valid
@Schema(name = "fields", description = "当前 active 版本字段列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("fields")
public List<@Valid MetaField> getFields() {
return fields;
}
@JsonProperty("fields")
public void setFields(List<@Valid MetaField> fields) {
this.fields = fields;
}
public MetaSchemaDetail inheritedSchemas(List<@Valid MetaSchemaDetailInheritedSchemasInner> inheritedSchemas) {
this.inheritedSchemas = inheritedSchemas;
return this;
}
public MetaSchemaDetail addInheritedSchemasItem(MetaSchemaDetailInheritedSchemasInner inheritedSchemasItem) {
if (this.inheritedSchemas == null) {
this.inheritedSchemas = new ArrayList<>();
}
this.inheritedSchemas.add(inheritedSchemasItem);
return this;
}
/**
* 字段继承关系
* @return inheritedSchemas
*/
@Valid
@Schema(name = "inheritedSchemas", description = "字段继承关系", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("inheritedSchemas")
public List<@Valid MetaSchemaDetailInheritedSchemasInner> getInheritedSchemas() {
return inheritedSchemas;
}
@JsonProperty("inheritedSchemas")
public void setInheritedSchemas(List<@Valid MetaSchemaDetailInheritedSchemasInner> inheritedSchemas) {
this.inheritedSchemas = inheritedSchemas;
}
public MetaSchemaDetail impactSummary(@Nullable MetaSchemaImpactSummary impactSummary) {
this.impactSummary = impactSummary;
return this;
}
/**
* Get impactSummary
* @return impactSummary
*/
@Valid
@Schema(name = "impactSummary", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("impactSummary")
public @Nullable MetaSchemaImpactSummary getImpactSummary() {
return impactSummary;
}
@JsonProperty("impactSummary")
public void setImpactSummary(@Nullable MetaSchemaImpactSummary impactSummary) {
this.impactSummary = impactSummary;
}
public MetaSchemaDetail createdAt(@Nullable OffsetDateTime createdAt) {
this.createdAt = createdAt;
return this;
}
/**
* Get createdAt
* @return createdAt
*/
@Valid
@Schema(name = "createdAt", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("createdAt")
public @Nullable OffsetDateTime getCreatedAt() {
return createdAt;
}
@JsonProperty("createdAt")
public void setCreatedAt(@Nullable OffsetDateTime createdAt) {
this.createdAt = createdAt;
}
public MetaSchemaDetail 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;
}
MetaSchemaDetail metaSchemaDetail = (MetaSchemaDetail) o;
return Objects.equals(this.schemaKey, metaSchemaDetail.schemaKey) &&
Objects.equals(this.displayName, metaSchemaDetail.displayName) &&
Objects.equals(this.description, metaSchemaDetail.description) &&
Objects.equals(this.scope, metaSchemaDetail.scope) &&
Objects.equals(this.targetType, metaSchemaDetail.targetType) &&
Objects.equals(this.activeVersion, metaSchemaDetail.activeVersion) &&
Objects.equals(this.activeVersionPublishedAt, metaSchemaDetail.activeVersionPublishedAt) &&
Objects.equals(this.grayVersion, metaSchemaDetail.grayVersion) &&
Objects.equals(this.grayVersionPublishedAt, metaSchemaDetail.grayVersionPublishedAt) &&
Objects.equals(this.grayRules, metaSchemaDetail.grayRules) &&
Objects.equals(this.fields, metaSchemaDetail.fields) &&
Objects.equals(this.inheritedSchemas, metaSchemaDetail.inheritedSchemas) &&
Objects.equals(this.impactSummary, metaSchemaDetail.impactSummary) &&
Objects.equals(this.createdAt, metaSchemaDetail.createdAt) &&
Objects.equals(this.updatedAt, metaSchemaDetail.updatedAt);
}
@Override
public int hashCode() {
return Objects.hash(schemaKey, displayName, description, scope, targetType, activeVersion, activeVersionPublishedAt, grayVersion, grayVersionPublishedAt, grayRules, fields, inheritedSchemas, impactSummary, createdAt, updatedAt);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MetaSchemaDetail {\n");
sb.append(" schemaKey: ").append(toIndentedString(schemaKey)).append("\n");
sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).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(" activeVersionPublishedAt: ").append(toIndentedString(activeVersionPublishedAt)).append("\n");
sb.append(" grayVersion: ").append(toIndentedString(grayVersion)).append("\n");
sb.append(" grayVersionPublishedAt: ").append(toIndentedString(grayVersionPublishedAt)).append("\n");
sb.append(" grayRules: ").append(toIndentedString(grayRules)).append("\n");
sb.append(" fields: ").append(toIndentedString(fields)).append("\n");
sb.append(" inheritedSchemas: ").append(toIndentedString(inheritedSchemas)).append("\n");
sb.append(" impactSummary: ").append(toIndentedString(impactSummary)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).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 ");
}
}