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 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; /** * ValidationWarning */ @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 ValidationWarning implements Serializable { private static final long serialVersionUID = 1L; private String code; private String message; private @Nullable String fieldKey; private @Nullable String detail; public ValidationWarning() { super(); } /** * Constructor with only required parameters */ public ValidationWarning(String code, String message) { this.code = code; this.message = message; } public ValidationWarning code(String code) { this.code = code; return this; } /** * 警告码(如 FIELD_DEPRECATED_STILL_USED / BREAKING_CHANGE_DETECTED) * @return code */ @NotNull @Schema(name = "code", description = "警告码(如 FIELD_DEPRECATED_STILL_USED / BREAKING_CHANGE_DETECTED)", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("code") public String getCode() { return code; } @JsonProperty("code") public void setCode(String code) { this.code = code; } public ValidationWarning message(String message) { this.message = message; return this; } /** * Get message * @return message */ @NotNull @Schema(name = "message", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("message") public String getMessage() { return message; } @JsonProperty("message") public void setMessage(String message) { this.message = message; } public ValidationWarning fieldKey(@Nullable String fieldKey) { this.fieldKey = fieldKey; return this; } /** * Get fieldKey * @return fieldKey */ @Schema(name = "fieldKey", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("fieldKey") public @Nullable String getFieldKey() { return fieldKey; } @JsonProperty("fieldKey") public void setFieldKey(@Nullable String fieldKey) { this.fieldKey = fieldKey; } public ValidationWarning detail(@Nullable String detail) { this.detail = detail; return this; } /** * Get detail * @return detail */ @Schema(name = "detail", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("detail") public @Nullable String getDetail() { return detail; } @JsonProperty("detail") public void setDetail(@Nullable String detail) { this.detail = detail; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ValidationWarning validationWarning = (ValidationWarning) o; return Objects.equals(this.code, validationWarning.code) && Objects.equals(this.message, validationWarning.message) && Objects.equals(this.fieldKey, validationWarning.fieldKey) && Objects.equals(this.detail, validationWarning.detail); } @Override public int hashCode() { return Objects.hash(code, message, fieldKey, detail); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ValidationWarning {\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" fieldKey: ").append(toIndentedString(fieldKey)).append("\n"); sb.append(" detail: ").append(toIndentedString(detail)).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 "); } }