使用 openapi-generator-cli 7.22.0 + spring generator 生成 包含:Block/Chapter/Work/Candidate/Generation/Entitlement/Quota 等
199 lines
5.6 KiB
Java
199 lines
5.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.fasterxml.jackson.annotation.JsonTypeName;
|
|
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;
|
|
|
|
/**
|
|
* AdminUpdateSchemaRequest
|
|
*/
|
|
|
|
@JsonTypeName("adminUpdateSchema_request")
|
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-05-24T14:16:55.032756+08:00[Asia/Shanghai]", comments = "Generator version: 7.22.0")
|
|
public class AdminUpdateSchemaRequest implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private @Nullable String displayName;
|
|
|
|
private @Nullable Object defaultValue = null;
|
|
|
|
private @Nullable Boolean required;
|
|
|
|
@Valid
|
|
private List<String> enumValues = new ArrayList<>();
|
|
|
|
private @Nullable Object validationRules;
|
|
|
|
public AdminUpdateSchemaRequest displayName(@Nullable String displayName) {
|
|
this.displayName = displayName;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get displayName
|
|
* @return displayName
|
|
*/
|
|
|
|
@Schema(name = "displayName", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("displayName")
|
|
public @Nullable String getDisplayName() {
|
|
return displayName;
|
|
}
|
|
|
|
@JsonProperty("displayName")
|
|
public void setDisplayName(@Nullable String displayName) {
|
|
this.displayName = displayName;
|
|
}
|
|
|
|
public AdminUpdateSchemaRequest defaultValue(@Nullable Object defaultValue) {
|
|
this.defaultValue = defaultValue;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 默认值
|
|
* @return defaultValue
|
|
*/
|
|
|
|
@Schema(name = "defaultValue", description = "默认值", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("defaultValue")
|
|
public @Nullable Object getDefaultValue() {
|
|
return defaultValue;
|
|
}
|
|
|
|
@JsonProperty("defaultValue")
|
|
public void setDefaultValue(@Nullable Object defaultValue) {
|
|
this.defaultValue = defaultValue;
|
|
}
|
|
|
|
public AdminUpdateSchemaRequest 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 AdminUpdateSchemaRequest enumValues(List<String> enumValues) {
|
|
this.enumValues = enumValues;
|
|
return this;
|
|
}
|
|
|
|
public AdminUpdateSchemaRequest addEnumValuesItem(String enumValuesItem) {
|
|
if (this.enumValues == null) {
|
|
this.enumValues = new ArrayList<>();
|
|
}
|
|
this.enumValues.add(enumValuesItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get enumValues
|
|
* @return enumValues
|
|
*/
|
|
|
|
@Schema(name = "enumValues", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("enumValues")
|
|
public List<String> getEnumValues() {
|
|
return enumValues;
|
|
}
|
|
|
|
@JsonProperty("enumValues")
|
|
public void setEnumValues(List<String> enumValues) {
|
|
this.enumValues = enumValues;
|
|
}
|
|
|
|
public AdminUpdateSchemaRequest validationRules(@Nullable Object validationRules) {
|
|
this.validationRules = validationRules;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get validationRules
|
|
* @return validationRules
|
|
*/
|
|
|
|
@Schema(name = "validationRules", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("validationRules")
|
|
public @Nullable Object getValidationRules() {
|
|
return validationRules;
|
|
}
|
|
|
|
@JsonProperty("validationRules")
|
|
public void setValidationRules(@Nullable Object validationRules) {
|
|
this.validationRules = validationRules;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
AdminUpdateSchemaRequest adminUpdateSchemaRequest = (AdminUpdateSchemaRequest) o;
|
|
return Objects.equals(this.displayName, adminUpdateSchemaRequest.displayName) &&
|
|
Objects.equals(this.defaultValue, adminUpdateSchemaRequest.defaultValue) &&
|
|
Objects.equals(this.required, adminUpdateSchemaRequest.required) &&
|
|
Objects.equals(this.enumValues, adminUpdateSchemaRequest.enumValues) &&
|
|
Objects.equals(this.validationRules, adminUpdateSchemaRequest.validationRules);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(displayName, defaultValue, required, enumValues, validationRules);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class AdminUpdateSchemaRequest {\n");
|
|
sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n");
|
|
sb.append(" defaultValue: ").append(toIndentedString(defaultValue)).append("\n");
|
|
sb.append(" required: ").append(toIndentedString(required)).append("\n");
|
|
sb.append(" enumValues: ").append(toIndentedString(enumValues)).append("\n");
|
|
sb.append(" validationRules: ").append(toIndentedString(validationRules)).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 ");
|
|
}
|
|
}
|
|
|