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.MetaSchemaDeprecateRequestDeprecateFieldsInner; 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; /** * MetaSchemaDeprecateRequest */ @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 MetaSchemaDeprecateRequest implements Serializable { private static final long serialVersionUID = 1L; private String commandId; private String reason; private Integer expectedVersion; private String validationResultId; private String impactPreviewId; @Valid private List<@Valid MetaSchemaDeprecateRequestDeprecateFieldsInner> deprecateFields = new ArrayList<>(); private Boolean deprecateEntireVersion = false; private @Nullable Integer replacementVersion; public MetaSchemaDeprecateRequest() { super(); } /** * Constructor with only required parameters */ public MetaSchemaDeprecateRequest(String commandId, String reason, Integer expectedVersion, String validationResultId, String impactPreviewId) { this.commandId = commandId; this.reason = reason; this.expectedVersion = expectedVersion; this.validationResultId = validationResultId; this.impactPreviewId = impactPreviewId; } public MetaSchemaDeprecateRequest commandId(String commandId) { this.commandId = commandId; return this; } /** * 幂等键 * @return commandId */ @NotNull @Schema(name = "commandId", description = "幂等键", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("commandId") public String getCommandId() { return commandId; } @JsonProperty("commandId") public void setCommandId(String commandId) { this.commandId = commandId; } public MetaSchemaDeprecateRequest reason(String reason) { this.reason = reason; return this; } /** * 废弃理由 * @return reason */ @NotNull @Schema(name = "reason", description = "废弃理由", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("reason") public String getReason() { return reason; } @JsonProperty("reason") public void setReason(String reason) { this.reason = reason; } public MetaSchemaDeprecateRequest expectedVersion(Integer expectedVersion) { this.expectedVersion = expectedVersion; return this; } /** * 期望被废弃版本,乐观锁 * @return expectedVersion */ @NotNull @Schema(name = "expectedVersion", description = "期望被废弃版本,乐观锁", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("expectedVersion") public Integer getExpectedVersion() { return expectedVersion; } @JsonProperty("expectedVersion") public void setExpectedVersion(Integer expectedVersion) { this.expectedVersion = expectedVersion; } public MetaSchemaDeprecateRequest validationResultId(String validationResultId) { this.validationResultId = validationResultId; return this; } /** * 废弃前校验结果引用 ID * @return validationResultId */ @NotNull @Schema(name = "validationResultId", description = "废弃前校验结果引用 ID", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("validationResultId") public String getValidationResultId() { return validationResultId; } @JsonProperty("validationResultId") public void setValidationResultId(String validationResultId) { this.validationResultId = validationResultId; } public MetaSchemaDeprecateRequest impactPreviewId(String impactPreviewId) { this.impactPreviewId = impactPreviewId; return this; } /** * 废弃影响预览引用 ID * @return impactPreviewId */ @NotNull @Schema(name = "impactPreviewId", description = "废弃影响预览引用 ID", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("impactPreviewId") public String getImpactPreviewId() { return impactPreviewId; } @JsonProperty("impactPreviewId") public void setImpactPreviewId(String impactPreviewId) { this.impactPreviewId = impactPreviewId; } public MetaSchemaDeprecateRequest deprecateFields(List<@Valid MetaSchemaDeprecateRequestDeprecateFieldsInner> deprecateFields) { this.deprecateFields = deprecateFields; return this; } public MetaSchemaDeprecateRequest addDeprecateFieldsItem(MetaSchemaDeprecateRequestDeprecateFieldsInner deprecateFieldsItem) { if (this.deprecateFields == null) { this.deprecateFields = new ArrayList<>(); } this.deprecateFields.add(deprecateFieldsItem); return this; } /** * Get deprecateFields * @return deprecateFields */ @Valid @Schema(name = "deprecateFields", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("deprecateFields") public List<@Valid MetaSchemaDeprecateRequestDeprecateFieldsInner> getDeprecateFields() { return deprecateFields; } @JsonProperty("deprecateFields") public void setDeprecateFields(List<@Valid MetaSchemaDeprecateRequestDeprecateFieldsInner> deprecateFields) { this.deprecateFields = deprecateFields; } public MetaSchemaDeprecateRequest deprecateEntireVersion(Boolean deprecateEntireVersion) { this.deprecateEntireVersion = deprecateEntireVersion; return this; } /** * 是否废弃整个版本 * @return deprecateEntireVersion */ @Schema(name = "deprecateEntireVersion", description = "是否废弃整个版本", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("deprecateEntireVersion") public Boolean getDeprecateEntireVersion() { return deprecateEntireVersion; } @JsonProperty("deprecateEntireVersion") public void setDeprecateEntireVersion(Boolean deprecateEntireVersion) { this.deprecateEntireVersion = deprecateEntireVersion; } public MetaSchemaDeprecateRequest replacementVersion(@Nullable Integer replacementVersion) { this.replacementVersion = replacementVersion; return this; } /** * 替代版本号(废弃整个版本时必填) * @return replacementVersion */ @Schema(name = "replacementVersion", description = "替代版本号(废弃整个版本时必填)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("replacementVersion") public @Nullable Integer getReplacementVersion() { return replacementVersion; } @JsonProperty("replacementVersion") public void setReplacementVersion(@Nullable Integer replacementVersion) { this.replacementVersion = replacementVersion; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } MetaSchemaDeprecateRequest metaSchemaDeprecateRequest = (MetaSchemaDeprecateRequest) o; return Objects.equals(this.commandId, metaSchemaDeprecateRequest.commandId) && Objects.equals(this.reason, metaSchemaDeprecateRequest.reason) && Objects.equals(this.expectedVersion, metaSchemaDeprecateRequest.expectedVersion) && Objects.equals(this.validationResultId, metaSchemaDeprecateRequest.validationResultId) && Objects.equals(this.impactPreviewId, metaSchemaDeprecateRequest.impactPreviewId) && Objects.equals(this.deprecateFields, metaSchemaDeprecateRequest.deprecateFields) && Objects.equals(this.deprecateEntireVersion, metaSchemaDeprecateRequest.deprecateEntireVersion) && Objects.equals(this.replacementVersion, metaSchemaDeprecateRequest.replacementVersion); } @Override public int hashCode() { return Objects.hash(commandId, reason, expectedVersion, validationResultId, impactPreviewId, deprecateFields, deprecateEntireVersion, replacementVersion); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MetaSchemaDeprecateRequest {\n"); sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append(" expectedVersion: ").append(toIndentedString(expectedVersion)).append("\n"); sb.append(" validationResultId: ").append(toIndentedString(validationResultId)).append("\n"); sb.append(" impactPreviewId: ").append(toIndentedString(impactPreviewId)).append("\n"); sb.append(" deprecateFields: ").append(toIndentedString(deprecateFields)).append("\n"); sb.append(" deprecateEntireVersion: ").append(toIndentedString(deprecateEntireVersion)).append("\n"); sb.append(" replacementVersion: ").append(toIndentedString(replacementVersion)).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 "); } }