oh-my-muse/docs/api-contracts/generated/java/com/muse/dto/MetaProjectionDetail.java

265 lines
8.2 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.muse.dto.MetaProjectionDetailFieldsInner;
import com.muse.dto.MetaProjectionDetailSourceSnapshot;
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;
/**
* 投影详情,含结构和字段数据
*/
@Schema(name = "MetaProjectionDetail", description = "投影详情,含结构和字段数据")
@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 MetaProjectionDetail implements Serializable {
private static final long serialVersionUID = 1L;
private String projectionKey;
private @Nullable String projectionName;
private Integer schemaVersion;
private Integer projectionVersion;
private Integer dataRevision;
private @Nullable MetaProjectionDetailSourceSnapshot sourceSnapshot;
@Valid
private List<@Valid MetaProjectionDetailFieldsInner> fields = new ArrayList<>();
public MetaProjectionDetail() {
super();
}
/**
* Constructor with only required parameters
*/
public MetaProjectionDetail(String projectionKey, Integer schemaVersion, Integer projectionVersion, Integer dataRevision, List<@Valid MetaProjectionDetailFieldsInner> fields) {
this.projectionKey = projectionKey;
this.schemaVersion = schemaVersion;
this.projectionVersion = projectionVersion;
this.dataRevision = dataRevision;
this.fields = fields;
}
public MetaProjectionDetail projectionKey(String projectionKey) {
this.projectionKey = projectionKey;
return this;
}
/**
* Get projectionKey
* @return projectionKey
*/
@NotNull
@Schema(name = "projectionKey", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("projectionKey")
public String getProjectionKey() {
return projectionKey;
}
@JsonProperty("projectionKey")
public void setProjectionKey(String projectionKey) {
this.projectionKey = projectionKey;
}
public MetaProjectionDetail projectionName(@Nullable String projectionName) {
this.projectionName = projectionName;
return this;
}
/**
* Get projectionName
* @return projectionName
*/
@Schema(name = "projectionName", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("projectionName")
public @Nullable String getProjectionName() {
return projectionName;
}
@JsonProperty("projectionName")
public void setProjectionName(@Nullable String projectionName) {
this.projectionName = projectionName;
}
public MetaProjectionDetail schemaVersion(Integer schemaVersion) {
this.schemaVersion = schemaVersion;
return this;
}
/**
* 使用的 MetaSchema active 或灰度版本
* @return schemaVersion
*/
@NotNull
@Schema(name = "schemaVersion", description = "使用的 MetaSchema active 或灰度版本", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("schemaVersion")
public Integer getSchemaVersion() {
return schemaVersion;
}
@JsonProperty("schemaVersion")
public void setSchemaVersion(Integer schemaVersion) {
this.schemaVersion = schemaVersion;
}
public MetaProjectionDetail projectionVersion(Integer projectionVersion) {
this.projectionVersion = projectionVersion;
return this;
}
/**
* 可见投影版本
* @return projectionVersion
*/
@NotNull
@Schema(name = "projectionVersion", description = "可见投影版本", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("projectionVersion")
public Integer getProjectionVersion() {
return projectionVersion;
}
@JsonProperty("projectionVersion")
public void setProjectionVersion(Integer projectionVersion) {
this.projectionVersion = projectionVersion;
}
public MetaProjectionDetail dataRevision(Integer dataRevision) {
this.dataRevision = dataRevision;
return this;
}
/**
* 目标对象动态字段数据 revision
* @return dataRevision
*/
@NotNull
@Schema(name = "dataRevision", description = "目标对象动态字段数据 revision", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("dataRevision")
public Integer getDataRevision() {
return dataRevision;
}
@JsonProperty("dataRevision")
public void setDataRevision(Integer dataRevision) {
this.dataRevision = dataRevision;
}
public MetaProjectionDetail sourceSnapshot(@Nullable MetaProjectionDetailSourceSnapshot sourceSnapshot) {
this.sourceSnapshot = sourceSnapshot;
return this;
}
/**
* Get sourceSnapshot
* @return sourceSnapshot
*/
@Valid
@Schema(name = "sourceSnapshot", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("sourceSnapshot")
public @Nullable MetaProjectionDetailSourceSnapshot getSourceSnapshot() {
return sourceSnapshot;
}
@JsonProperty("sourceSnapshot")
public void setSourceSnapshot(@Nullable MetaProjectionDetailSourceSnapshot sourceSnapshot) {
this.sourceSnapshot = sourceSnapshot;
}
public MetaProjectionDetail fields(List<@Valid MetaProjectionDetailFieldsInner> fields) {
this.fields = fields;
return this;
}
public MetaProjectionDetail addFieldsItem(MetaProjectionDetailFieldsInner fieldsItem) {
if (this.fields == null) {
this.fields = new ArrayList<>();
}
this.fields.add(fieldsItem);
return this;
}
/**
* 仅包含当前用户可见、可编辑、可搜索或可导出的字段
* @return fields
*/
@NotNull @Valid
@Schema(name = "fields", description = "仅包含当前用户可见、可编辑、可搜索或可导出的字段", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("fields")
public List<@Valid MetaProjectionDetailFieldsInner> getFields() {
return fields;
}
@JsonProperty("fields")
public void setFields(List<@Valid MetaProjectionDetailFieldsInner> fields) {
this.fields = fields;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MetaProjectionDetail metaProjectionDetail = (MetaProjectionDetail) o;
return Objects.equals(this.projectionKey, metaProjectionDetail.projectionKey) &&
Objects.equals(this.projectionName, metaProjectionDetail.projectionName) &&
Objects.equals(this.schemaVersion, metaProjectionDetail.schemaVersion) &&
Objects.equals(this.projectionVersion, metaProjectionDetail.projectionVersion) &&
Objects.equals(this.dataRevision, metaProjectionDetail.dataRevision) &&
Objects.equals(this.sourceSnapshot, metaProjectionDetail.sourceSnapshot) &&
Objects.equals(this.fields, metaProjectionDetail.fields);
}
@Override
public int hashCode() {
return Objects.hash(projectionKey, projectionName, schemaVersion, projectionVersion, dataRevision, sourceSnapshot, fields);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MetaProjectionDetail {\n");
sb.append(" projectionKey: ").append(toIndentedString(projectionKey)).append("\n");
sb.append(" projectionName: ").append(toIndentedString(projectionName)).append("\n");
sb.append(" schemaVersion: ").append(toIndentedString(schemaVersion)).append("\n");
sb.append(" projectionVersion: ").append(toIndentedString(projectionVersion)).append("\n");
sb.append(" dataRevision: ").append(toIndentedString(dataRevision)).append("\n");
sb.append(" sourceSnapshot: ").append(toIndentedString(sourceSnapshot)).append("\n");
sb.append(" fields: ").append(toIndentedString(fields)).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 ");
}
}