284 lines
9.6 KiB
Java
284 lines
9.6 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.DynamicFieldValidationResultFieldResultsInner;
|
|
import com.muse.dto.DynamicFieldValidationResultRouteSuggestionsInner;
|
|
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 = "DynamicFieldValidationResult", 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 DynamicFieldValidationResult implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private @Nullable Boolean valid;
|
|
|
|
@Valid
|
|
private List<@Valid DynamicFieldValidationResultFieldResultsInner> fieldResults = new ArrayList<>();
|
|
|
|
private @Nullable Boolean schemaStale;
|
|
|
|
private @Nullable Boolean projectionStale;
|
|
|
|
private @Nullable Integer currentSchemaVersion;
|
|
|
|
private @Nullable Integer currentProjectionVersion;
|
|
|
|
private @Nullable Integer currentDataRevision;
|
|
|
|
@Valid
|
|
private List<@Valid DynamicFieldValidationResultRouteSuggestionsInner> routeSuggestions = new ArrayList<>();
|
|
|
|
public DynamicFieldValidationResult valid(@Nullable Boolean valid) {
|
|
this.valid = valid;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 整体是否合法
|
|
* @return valid
|
|
*/
|
|
|
|
@Schema(name = "valid", description = "整体是否合法", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("valid")
|
|
public @Nullable Boolean getValid() {
|
|
return valid;
|
|
}
|
|
|
|
@JsonProperty("valid")
|
|
public void setValid(@Nullable Boolean valid) {
|
|
this.valid = valid;
|
|
}
|
|
|
|
public DynamicFieldValidationResult fieldResults(List<@Valid DynamicFieldValidationResultFieldResultsInner> fieldResults) {
|
|
this.fieldResults = fieldResults;
|
|
return this;
|
|
}
|
|
|
|
public DynamicFieldValidationResult addFieldResultsItem(DynamicFieldValidationResultFieldResultsInner fieldResultsItem) {
|
|
if (this.fieldResults == null) {
|
|
this.fieldResults = new ArrayList<>();
|
|
}
|
|
this.fieldResults.add(fieldResultsItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get fieldResults
|
|
* @return fieldResults
|
|
*/
|
|
@Valid
|
|
@Schema(name = "fieldResults", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("fieldResults")
|
|
public List<@Valid DynamicFieldValidationResultFieldResultsInner> getFieldResults() {
|
|
return fieldResults;
|
|
}
|
|
|
|
@JsonProperty("fieldResults")
|
|
public void setFieldResults(List<@Valid DynamicFieldValidationResultFieldResultsInner> fieldResults) {
|
|
this.fieldResults = fieldResults;
|
|
}
|
|
|
|
public DynamicFieldValidationResult schemaStale(@Nullable Boolean schemaStale) {
|
|
this.schemaStale = schemaStale;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Schema 是否已过期
|
|
* @return schemaStale
|
|
*/
|
|
|
|
@Schema(name = "schemaStale", description = "Schema 是否已过期", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("schemaStale")
|
|
public @Nullable Boolean getSchemaStale() {
|
|
return schemaStale;
|
|
}
|
|
|
|
@JsonProperty("schemaStale")
|
|
public void setSchemaStale(@Nullable Boolean schemaStale) {
|
|
this.schemaStale = schemaStale;
|
|
}
|
|
|
|
public DynamicFieldValidationResult projectionStale(@Nullable Boolean projectionStale) {
|
|
this.projectionStale = projectionStale;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 投影是否已过期
|
|
* @return projectionStale
|
|
*/
|
|
|
|
@Schema(name = "projectionStale", description = "投影是否已过期", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("projectionStale")
|
|
public @Nullable Boolean getProjectionStale() {
|
|
return projectionStale;
|
|
}
|
|
|
|
@JsonProperty("projectionStale")
|
|
public void setProjectionStale(@Nullable Boolean projectionStale) {
|
|
this.projectionStale = projectionStale;
|
|
}
|
|
|
|
public DynamicFieldValidationResult currentSchemaVersion(@Nullable Integer currentSchemaVersion) {
|
|
this.currentSchemaVersion = currentSchemaVersion;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get currentSchemaVersion
|
|
* @return currentSchemaVersion
|
|
*/
|
|
|
|
@Schema(name = "currentSchemaVersion", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("currentSchemaVersion")
|
|
public @Nullable Integer getCurrentSchemaVersion() {
|
|
return currentSchemaVersion;
|
|
}
|
|
|
|
@JsonProperty("currentSchemaVersion")
|
|
public void setCurrentSchemaVersion(@Nullable Integer currentSchemaVersion) {
|
|
this.currentSchemaVersion = currentSchemaVersion;
|
|
}
|
|
|
|
public DynamicFieldValidationResult currentProjectionVersion(@Nullable Integer currentProjectionVersion) {
|
|
this.currentProjectionVersion = currentProjectionVersion;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get currentProjectionVersion
|
|
* @return currentProjectionVersion
|
|
*/
|
|
|
|
@Schema(name = "currentProjectionVersion", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("currentProjectionVersion")
|
|
public @Nullable Integer getCurrentProjectionVersion() {
|
|
return currentProjectionVersion;
|
|
}
|
|
|
|
@JsonProperty("currentProjectionVersion")
|
|
public void setCurrentProjectionVersion(@Nullable Integer currentProjectionVersion) {
|
|
this.currentProjectionVersion = currentProjectionVersion;
|
|
}
|
|
|
|
public DynamicFieldValidationResult currentDataRevision(@Nullable Integer currentDataRevision) {
|
|
this.currentDataRevision = currentDataRevision;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get currentDataRevision
|
|
* @return currentDataRevision
|
|
*/
|
|
|
|
@Schema(name = "currentDataRevision", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("currentDataRevision")
|
|
public @Nullable Integer getCurrentDataRevision() {
|
|
return currentDataRevision;
|
|
}
|
|
|
|
@JsonProperty("currentDataRevision")
|
|
public void setCurrentDataRevision(@Nullable Integer currentDataRevision) {
|
|
this.currentDataRevision = currentDataRevision;
|
|
}
|
|
|
|
public DynamicFieldValidationResult routeSuggestions(List<@Valid DynamicFieldValidationResultRouteSuggestionsInner> routeSuggestions) {
|
|
this.routeSuggestions = routeSuggestions;
|
|
return this;
|
|
}
|
|
|
|
public DynamicFieldValidationResult addRouteSuggestionsItem(DynamicFieldValidationResultRouteSuggestionsInner routeSuggestionsItem) {
|
|
if (this.routeSuggestions == null) {
|
|
this.routeSuggestions = new ArrayList<>();
|
|
}
|
|
this.routeSuggestions.add(routeSuggestionsItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 写入路由建议,指引前端到正确的 owner 命令
|
|
* @return routeSuggestions
|
|
*/
|
|
@Valid
|
|
@Schema(name = "routeSuggestions", description = "写入路由建议,指引前端到正确的 owner 命令", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("routeSuggestions")
|
|
public List<@Valid DynamicFieldValidationResultRouteSuggestionsInner> getRouteSuggestions() {
|
|
return routeSuggestions;
|
|
}
|
|
|
|
@JsonProperty("routeSuggestions")
|
|
public void setRouteSuggestions(List<@Valid DynamicFieldValidationResultRouteSuggestionsInner> routeSuggestions) {
|
|
this.routeSuggestions = routeSuggestions;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
DynamicFieldValidationResult dynamicFieldValidationResult = (DynamicFieldValidationResult) o;
|
|
return Objects.equals(this.valid, dynamicFieldValidationResult.valid) &&
|
|
Objects.equals(this.fieldResults, dynamicFieldValidationResult.fieldResults) &&
|
|
Objects.equals(this.schemaStale, dynamicFieldValidationResult.schemaStale) &&
|
|
Objects.equals(this.projectionStale, dynamicFieldValidationResult.projectionStale) &&
|
|
Objects.equals(this.currentSchemaVersion, dynamicFieldValidationResult.currentSchemaVersion) &&
|
|
Objects.equals(this.currentProjectionVersion, dynamicFieldValidationResult.currentProjectionVersion) &&
|
|
Objects.equals(this.currentDataRevision, dynamicFieldValidationResult.currentDataRevision) &&
|
|
Objects.equals(this.routeSuggestions, dynamicFieldValidationResult.routeSuggestions);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(valid, fieldResults, schemaStale, projectionStale, currentSchemaVersion, currentProjectionVersion, currentDataRevision, routeSuggestions);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class DynamicFieldValidationResult {\n");
|
|
sb.append(" valid: ").append(toIndentedString(valid)).append("\n");
|
|
sb.append(" fieldResults: ").append(toIndentedString(fieldResults)).append("\n");
|
|
sb.append(" schemaStale: ").append(toIndentedString(schemaStale)).append("\n");
|
|
sb.append(" projectionStale: ").append(toIndentedString(projectionStale)).append("\n");
|
|
sb.append(" currentSchemaVersion: ").append(toIndentedString(currentSchemaVersion)).append("\n");
|
|
sb.append(" currentProjectionVersion: ").append(toIndentedString(currentProjectionVersion)).append("\n");
|
|
sb.append(" currentDataRevision: ").append(toIndentedString(currentDataRevision)).append("\n");
|
|
sb.append(" routeSuggestions: ").append(toIndentedString(routeSuggestions)).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 ");
|
|
}
|
|
}
|
|
|