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.ArrayList; import java.util.Arrays; import java.util.List; 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; /** * MetaProjectionDetailFieldsInner */ @JsonTypeName("MetaProjectionDetail_fields_inner") @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 MetaProjectionDetailFieldsInner implements Serializable { private static final long serialVersionUID = 1L; private String fieldKey; private @Nullable String fieldName; /** * Gets or Sets fieldType */ public enum FieldTypeEnum { TEXT("text"), NUMBER("number"), BOOLEAN("boolean"), ENUM("enum"), REFERENCE("reference"), STRUCTURED("structured"), DATE("date"); private final String value; FieldTypeEnum(String value) { this.value = value; } @JsonValue public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } @JsonCreator public static FieldTypeEnum fromValue(String value) { for (FieldTypeEnum b : FieldTypeEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } private FieldTypeEnum fieldType; private @Nullable Boolean required; private Boolean uiVisible; private @Nullable Boolean aiContext; private @Nullable Boolean userEditable; private @Nullable Boolean userSearchable; private @Nullable Boolean exportable; private @Nullable Boolean deprecated; private @Nullable String migrationHint; private @Nullable String writeOwner; private @Nullable String ownerCommand; private @Nullable Object value = null; @Valid private List enumValues = new ArrayList<>(); public MetaProjectionDetailFieldsInner() { super(); } /** * Constructor with only required parameters */ public MetaProjectionDetailFieldsInner(String fieldKey, FieldTypeEnum fieldType, Boolean uiVisible) { this.fieldKey = fieldKey; this.fieldType = fieldType; this.uiVisible = uiVisible; } public MetaProjectionDetailFieldsInner fieldKey(String fieldKey) { this.fieldKey = fieldKey; return this; } /** * Get fieldKey * @return fieldKey */ @NotNull @Schema(name = "fieldKey", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("fieldKey") public String getFieldKey() { return fieldKey; } @JsonProperty("fieldKey") public void setFieldKey(String fieldKey) { this.fieldKey = fieldKey; } public MetaProjectionDetailFieldsInner fieldName(@Nullable String fieldName) { this.fieldName = fieldName; return this; } /** * Get fieldName * @return fieldName */ @Schema(name = "fieldName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("fieldName") public @Nullable String getFieldName() { return fieldName; } @JsonProperty("fieldName") public void setFieldName(@Nullable String fieldName) { this.fieldName = fieldName; } public MetaProjectionDetailFieldsInner fieldType(FieldTypeEnum fieldType) { this.fieldType = fieldType; return this; } /** * Get fieldType * @return fieldType */ @NotNull @Schema(name = "fieldType", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("fieldType") public FieldTypeEnum getFieldType() { return fieldType; } @JsonProperty("fieldType") public void setFieldType(FieldTypeEnum fieldType) { this.fieldType = fieldType; } public MetaProjectionDetailFieldsInner required(@Nullable Boolean required) { this.required = required; return this; } /** * Get required * @return required */ @Schema(name = "required", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("required") public @Nullable Boolean getRequired() { return required; } @JsonProperty("required") public void setRequired(@Nullable Boolean required) { this.required = required; } public MetaProjectionDetailFieldsInner uiVisible(Boolean uiVisible) { this.uiVisible = uiVisible; return this; } /** * 是否进入用户可见投影 * @return uiVisible */ @NotNull @Schema(name = "uiVisible", description = "是否进入用户可见投影", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("uiVisible") public Boolean getUiVisible() { return uiVisible; } @JsonProperty("uiVisible") public void setUiVisible(Boolean uiVisible) { this.uiVisible = uiVisible; } public MetaProjectionDetailFieldsInner aiContext(@Nullable Boolean aiContext) { this.aiContext = aiContext; return this; } /** * 是否允许进入 AI 上下文组装 * @return aiContext */ @Schema(name = "aiContext", description = "是否允许进入 AI 上下文组装", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("aiContext") public @Nullable Boolean getAiContext() { return aiContext; } @JsonProperty("aiContext") public void setAiContext(@Nullable Boolean aiContext) { this.aiContext = aiContext; } public MetaProjectionDetailFieldsInner userEditable(@Nullable Boolean userEditable) { this.userEditable = userEditable; return this; } /** * 用户端是否允许保存该动态字段 * @return userEditable */ @Schema(name = "userEditable", description = "用户端是否允许保存该动态字段", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userEditable") public @Nullable Boolean getUserEditable() { return userEditable; } @JsonProperty("userEditable") public void setUserEditable(@Nullable Boolean userEditable) { this.userEditable = userEditable; } public MetaProjectionDetailFieldsInner userSearchable(@Nullable Boolean userSearchable) { this.userSearchable = userSearchable; return this; } /** * 是否允许用户搜索或筛选 * @return userSearchable */ @Schema(name = "userSearchable", description = "是否允许用户搜索或筛选", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("userSearchable") public @Nullable Boolean getUserSearchable() { return userSearchable; } @JsonProperty("userSearchable") public void setUserSearchable(@Nullable Boolean userSearchable) { this.userSearchable = userSearchable; } public MetaProjectionDetailFieldsInner exportable(@Nullable Boolean exportable) { this.exportable = exportable; return this; } /** * 是否可被导出预检纳入 * @return exportable */ @Schema(name = "exportable", description = "是否可被导出预检纳入", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("exportable") public @Nullable Boolean getExportable() { return exportable; } @JsonProperty("exportable") public void setExportable(@Nullable Boolean exportable) { this.exportable = exportable; } public MetaProjectionDetailFieldsInner deprecated(@Nullable Boolean deprecated) { this.deprecated = deprecated; return this; } /** * 字段是否已废弃 * @return deprecated */ @Schema(name = "deprecated", description = "字段是否已废弃", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("deprecated") public @Nullable Boolean getDeprecated() { return deprecated; } @JsonProperty("deprecated") public void setDeprecated(@Nullable Boolean deprecated) { this.deprecated = deprecated; } public MetaProjectionDetailFieldsInner migrationHint(@Nullable String migrationHint) { this.migrationHint = migrationHint; return this; } /** * 废弃时的迁移提示 * @return migrationHint */ @Schema(name = "migrationHint", description = "废弃时的迁移提示", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("migrationHint") public @Nullable String getMigrationHint() { return migrationHint; } @JsonProperty("migrationHint") public void setMigrationHint(@Nullable String migrationHint) { this.migrationHint = migrationHint; } public MetaProjectionDetailFieldsInner writeOwner(@Nullable String writeOwner) { this.writeOwner = writeOwner; return this; } /** * 写入 owner 标识 * @return writeOwner */ @Schema(name = "writeOwner", description = "写入 owner 标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("writeOwner") public @Nullable String getWriteOwner() { return writeOwner; } @JsonProperty("writeOwner") public void setWriteOwner(@Nullable String writeOwner) { this.writeOwner = writeOwner; } public MetaProjectionDetailFieldsInner ownerCommand(@Nullable String ownerCommand) { this.ownerCommand = ownerCommand; return this; } /** * owner 写入命令路径 * @return ownerCommand */ @Schema(name = "ownerCommand", description = "owner 写入命令路径", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ownerCommand") public @Nullable String getOwnerCommand() { return ownerCommand; } @JsonProperty("ownerCommand") public void setOwnerCommand(@Nullable String ownerCommand) { this.ownerCommand = ownerCommand; } public MetaProjectionDetailFieldsInner value(@Nullable Object value) { this.value = value; return this; } /** * 当前字段值 * @return value */ @Schema(name = "value", description = "当前字段值", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("value") public @Nullable Object getValue() { return value; } @JsonProperty("value") public void setValue(@Nullable Object value) { this.value = value; } public MetaProjectionDetailFieldsInner enumValues(List enumValues) { this.enumValues = enumValues; return this; } public MetaProjectionDetailFieldsInner addEnumValuesItem(String enumValuesItem) { if (this.enumValues == null) { this.enumValues = new ArrayList<>(); } this.enumValues.add(enumValuesItem); return this; } /** * 枚举可选值(fieldType=enum 时) * @return enumValues */ @Schema(name = "enumValues", description = "枚举可选值(fieldType=enum 时)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("enumValues") public List getEnumValues() { return enumValues; } @JsonProperty("enumValues") public void setEnumValues(List enumValues) { this.enumValues = enumValues; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } MetaProjectionDetailFieldsInner metaProjectionDetailFieldsInner = (MetaProjectionDetailFieldsInner) o; return Objects.equals(this.fieldKey, metaProjectionDetailFieldsInner.fieldKey) && Objects.equals(this.fieldName, metaProjectionDetailFieldsInner.fieldName) && Objects.equals(this.fieldType, metaProjectionDetailFieldsInner.fieldType) && Objects.equals(this.required, metaProjectionDetailFieldsInner.required) && Objects.equals(this.uiVisible, metaProjectionDetailFieldsInner.uiVisible) && Objects.equals(this.aiContext, metaProjectionDetailFieldsInner.aiContext) && Objects.equals(this.userEditable, metaProjectionDetailFieldsInner.userEditable) && Objects.equals(this.userSearchable, metaProjectionDetailFieldsInner.userSearchable) && Objects.equals(this.exportable, metaProjectionDetailFieldsInner.exportable) && Objects.equals(this.deprecated, metaProjectionDetailFieldsInner.deprecated) && Objects.equals(this.migrationHint, metaProjectionDetailFieldsInner.migrationHint) && Objects.equals(this.writeOwner, metaProjectionDetailFieldsInner.writeOwner) && Objects.equals(this.ownerCommand, metaProjectionDetailFieldsInner.ownerCommand) && Objects.equals(this.value, metaProjectionDetailFieldsInner.value) && Objects.equals(this.enumValues, metaProjectionDetailFieldsInner.enumValues); } @Override public int hashCode() { return Objects.hash(fieldKey, fieldName, fieldType, required, uiVisible, aiContext, userEditable, userSearchable, exportable, deprecated, migrationHint, writeOwner, ownerCommand, value, enumValues); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MetaProjectionDetailFieldsInner {\n"); sb.append(" fieldKey: ").append(toIndentedString(fieldKey)).append("\n"); sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); sb.append(" required: ").append(toIndentedString(required)).append("\n"); sb.append(" uiVisible: ").append(toIndentedString(uiVisible)).append("\n"); sb.append(" aiContext: ").append(toIndentedString(aiContext)).append("\n"); sb.append(" userEditable: ").append(toIndentedString(userEditable)).append("\n"); sb.append(" userSearchable: ").append(toIndentedString(userSearchable)).append("\n"); sb.append(" exportable: ").append(toIndentedString(exportable)).append("\n"); sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); sb.append(" migrationHint: ").append(toIndentedString(migrationHint)).append("\n"); sb.append(" writeOwner: ").append(toIndentedString(writeOwner)).append("\n"); sb.append(" ownerCommand: ").append(toIndentedString(ownerCommand)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append(" enumValues: ").append(toIndentedString(enumValues)).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 "); } }