使用 openapi-generator-cli 7.22.0 + spring generator 生成 包含:Block/Chapter/Work/Candidate/Generation/Entitlement/Quota 等
367 lines
9.2 KiB
Java
367 lines
9.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.fasterxml.jackson.annotation.JsonValue;
|
|
import java.time.OffsetDateTime;
|
|
import java.util.UUID;
|
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
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;
|
|
|
|
/**
|
|
* Candidate
|
|
*/
|
|
|
|
@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 Candidate implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private UUID id;
|
|
|
|
private UUID blockId;
|
|
|
|
private UUID generationId;
|
|
|
|
private @Nullable UUID agentId;
|
|
|
|
private @Nullable String agentName;
|
|
|
|
/**
|
|
* Gets or Sets status
|
|
*/
|
|
public enum StatusEnum {
|
|
PENDING("pending"),
|
|
|
|
ACCEPTED("accepted"),
|
|
|
|
REJECTED("rejected");
|
|
|
|
private final String value;
|
|
|
|
StatusEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static StatusEnum fromValue(String value) {
|
|
for (StatusEnum b : StatusEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private StatusEnum status;
|
|
|
|
private @Nullable Integer sourceVersion;
|
|
|
|
private @Nullable String diffSummary;
|
|
|
|
private @Nullable Object qualityScores;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private OffsetDateTime createdAt;
|
|
|
|
public Candidate() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public Candidate(UUID id, UUID blockId, UUID generationId, StatusEnum status, OffsetDateTime createdAt) {
|
|
this.id = id;
|
|
this.blockId = blockId;
|
|
this.generationId = generationId;
|
|
this.status = status;
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
public Candidate id(UUID id) {
|
|
this.id = id;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get id
|
|
* @return id
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "id", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("id")
|
|
public UUID getId() {
|
|
return id;
|
|
}
|
|
|
|
@JsonProperty("id")
|
|
public void setId(UUID id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public Candidate blockId(UUID blockId) {
|
|
this.blockId = blockId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get blockId
|
|
* @return blockId
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "blockId", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("blockId")
|
|
public UUID getBlockId() {
|
|
return blockId;
|
|
}
|
|
|
|
@JsonProperty("blockId")
|
|
public void setBlockId(UUID blockId) {
|
|
this.blockId = blockId;
|
|
}
|
|
|
|
public Candidate generationId(UUID generationId) {
|
|
this.generationId = generationId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get generationId
|
|
* @return generationId
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "generationId", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("generationId")
|
|
public UUID getGenerationId() {
|
|
return generationId;
|
|
}
|
|
|
|
@JsonProperty("generationId")
|
|
public void setGenerationId(UUID generationId) {
|
|
this.generationId = generationId;
|
|
}
|
|
|
|
public Candidate agentId(@Nullable UUID agentId) {
|
|
this.agentId = agentId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get agentId
|
|
* @return agentId
|
|
*/
|
|
@Valid
|
|
@Schema(name = "agentId", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("agentId")
|
|
public @Nullable UUID getAgentId() {
|
|
return agentId;
|
|
}
|
|
|
|
@JsonProperty("agentId")
|
|
public void setAgentId(@Nullable UUID agentId) {
|
|
this.agentId = agentId;
|
|
}
|
|
|
|
public Candidate agentName(@Nullable String agentName) {
|
|
this.agentName = agentName;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get agentName
|
|
* @return agentName
|
|
*/
|
|
|
|
@Schema(name = "agentName", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("agentName")
|
|
public @Nullable String getAgentName() {
|
|
return agentName;
|
|
}
|
|
|
|
@JsonProperty("agentName")
|
|
public void setAgentName(@Nullable String agentName) {
|
|
this.agentName = agentName;
|
|
}
|
|
|
|
public Candidate status(StatusEnum status) {
|
|
this.status = status;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get status
|
|
* @return status
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("status")
|
|
public StatusEnum getStatus() {
|
|
return status;
|
|
}
|
|
|
|
@JsonProperty("status")
|
|
public void setStatus(StatusEnum status) {
|
|
this.status = status;
|
|
}
|
|
|
|
public Candidate sourceVersion(@Nullable Integer sourceVersion) {
|
|
this.sourceVersion = sourceVersion;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 生成时的源 Block 版本号
|
|
* @return sourceVersion
|
|
*/
|
|
|
|
@Schema(name = "sourceVersion", description = "生成时的源 Block 版本号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("sourceVersion")
|
|
public @Nullable Integer getSourceVersion() {
|
|
return sourceVersion;
|
|
}
|
|
|
|
@JsonProperty("sourceVersion")
|
|
public void setSourceVersion(@Nullable Integer sourceVersion) {
|
|
this.sourceVersion = sourceVersion;
|
|
}
|
|
|
|
public Candidate diffSummary(@Nullable String diffSummary) {
|
|
this.diffSummary = diffSummary;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 变更摘要
|
|
* @return diffSummary
|
|
*/
|
|
|
|
@Schema(name = "diffSummary", description = "变更摘要", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("diffSummary")
|
|
public @Nullable String getDiffSummary() {
|
|
return diffSummary;
|
|
}
|
|
|
|
@JsonProperty("diffSummary")
|
|
public void setDiffSummary(@Nullable String diffSummary) {
|
|
this.diffSummary = diffSummary;
|
|
}
|
|
|
|
public Candidate qualityScores(@Nullable Object qualityScores) {
|
|
this.qualityScores = qualityScores;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 各质量维度的评分
|
|
* @return qualityScores
|
|
*/
|
|
|
|
@Schema(name = "qualityScores", description = "各质量维度的评分", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("qualityScores")
|
|
public @Nullable Object getQualityScores() {
|
|
return qualityScores;
|
|
}
|
|
|
|
@JsonProperty("qualityScores")
|
|
public void setQualityScores(@Nullable Object qualityScores) {
|
|
this.qualityScores = qualityScores;
|
|
}
|
|
|
|
public Candidate createdAt(OffsetDateTime createdAt) {
|
|
this.createdAt = createdAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get createdAt
|
|
* @return createdAt
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "createdAt", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("createdAt")
|
|
public OffsetDateTime getCreatedAt() {
|
|
return createdAt;
|
|
}
|
|
|
|
@JsonProperty("createdAt")
|
|
public void setCreatedAt(OffsetDateTime createdAt) {
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
Candidate candidate = (Candidate) o;
|
|
return Objects.equals(this.id, candidate.id) &&
|
|
Objects.equals(this.blockId, candidate.blockId) &&
|
|
Objects.equals(this.generationId, candidate.generationId) &&
|
|
Objects.equals(this.agentId, candidate.agentId) &&
|
|
Objects.equals(this.agentName, candidate.agentName) &&
|
|
Objects.equals(this.status, candidate.status) &&
|
|
Objects.equals(this.sourceVersion, candidate.sourceVersion) &&
|
|
Objects.equals(this.diffSummary, candidate.diffSummary) &&
|
|
Objects.equals(this.qualityScores, candidate.qualityScores) &&
|
|
Objects.equals(this.createdAt, candidate.createdAt);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(id, blockId, generationId, agentId, agentName, status, sourceVersion, diffSummary, qualityScores, createdAt);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class Candidate {\n");
|
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
|
sb.append(" blockId: ").append(toIndentedString(blockId)).append("\n");
|
|
sb.append(" generationId: ").append(toIndentedString(generationId)).append("\n");
|
|
sb.append(" agentId: ").append(toIndentedString(agentId)).append("\n");
|
|
sb.append(" agentName: ").append(toIndentedString(agentName)).append("\n");
|
|
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
|
sb.append(" sourceVersion: ").append(toIndentedString(sourceVersion)).append("\n");
|
|
sb.append(" diffSummary: ").append(toIndentedString(diffSummary)).append("\n");
|
|
sb.append(" qualityScores: ").append(toIndentedString(qualityScores)).append("\n");
|
|
sb.append(" createdAt: ").append(toIndentedString(createdAt)).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 ");
|
|
}
|
|
}
|
|
|