226 lines
6.1 KiB
Java
226 lines
6.1 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 java.time.OffsetDateTime;
|
|
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;
|
|
|
|
/**
|
|
* PromptSummary
|
|
*/
|
|
|
|
@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 PromptSummary implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String promptKey;
|
|
|
|
private @Nullable String name;
|
|
|
|
private Integer activeVersion;
|
|
|
|
private @Nullable Integer latestVersion;
|
|
|
|
private @Nullable Integer variableCount;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private OffsetDateTime updatedAt;
|
|
|
|
public PromptSummary() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public PromptSummary(String promptKey, Integer activeVersion, OffsetDateTime updatedAt) {
|
|
this.promptKey = promptKey;
|
|
this.activeVersion = activeVersion;
|
|
this.updatedAt = updatedAt;
|
|
}
|
|
|
|
public PromptSummary promptKey(String promptKey) {
|
|
this.promptKey = promptKey;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Prompt 唯一标识
|
|
* @return promptKey
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "promptKey", description = "Prompt 唯一标识", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("promptKey")
|
|
public String getPromptKey() {
|
|
return promptKey;
|
|
}
|
|
|
|
@JsonProperty("promptKey")
|
|
public void setPromptKey(String promptKey) {
|
|
this.promptKey = promptKey;
|
|
}
|
|
|
|
public PromptSummary name(@Nullable String name) {
|
|
this.name = name;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Prompt 名称
|
|
* @return name
|
|
*/
|
|
|
|
@Schema(name = "name", description = "Prompt 名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("name")
|
|
public @Nullable String getName() {
|
|
return name;
|
|
}
|
|
|
|
@JsonProperty("name")
|
|
public void setName(@Nullable String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public PromptSummary activeVersion(Integer activeVersion) {
|
|
this.activeVersion = activeVersion;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 当前激活版本号
|
|
* @return activeVersion
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "activeVersion", description = "当前激活版本号", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("activeVersion")
|
|
public Integer getActiveVersion() {
|
|
return activeVersion;
|
|
}
|
|
|
|
@JsonProperty("activeVersion")
|
|
public void setActiveVersion(Integer activeVersion) {
|
|
this.activeVersion = activeVersion;
|
|
}
|
|
|
|
public PromptSummary latestVersion(@Nullable Integer latestVersion) {
|
|
this.latestVersion = latestVersion;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 最新版本号
|
|
* @return latestVersion
|
|
*/
|
|
|
|
@Schema(name = "latestVersion", description = "最新版本号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("latestVersion")
|
|
public @Nullable Integer getLatestVersion() {
|
|
return latestVersion;
|
|
}
|
|
|
|
@JsonProperty("latestVersion")
|
|
public void setLatestVersion(@Nullable Integer latestVersion) {
|
|
this.latestVersion = latestVersion;
|
|
}
|
|
|
|
public PromptSummary variableCount(@Nullable Integer variableCount) {
|
|
this.variableCount = variableCount;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 模板变量数量
|
|
* @return variableCount
|
|
*/
|
|
|
|
@Schema(name = "variableCount", description = "模板变量数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("variableCount")
|
|
public @Nullable Integer getVariableCount() {
|
|
return variableCount;
|
|
}
|
|
|
|
@JsonProperty("variableCount")
|
|
public void setVariableCount(@Nullable Integer variableCount) {
|
|
this.variableCount = variableCount;
|
|
}
|
|
|
|
public PromptSummary updatedAt(OffsetDateTime updatedAt) {
|
|
this.updatedAt = updatedAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get updatedAt
|
|
* @return updatedAt
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "updatedAt", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("updatedAt")
|
|
public OffsetDateTime getUpdatedAt() {
|
|
return updatedAt;
|
|
}
|
|
|
|
@JsonProperty("updatedAt")
|
|
public void setUpdatedAt(OffsetDateTime updatedAt) {
|
|
this.updatedAt = updatedAt;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
PromptSummary promptSummary = (PromptSummary) o;
|
|
return Objects.equals(this.promptKey, promptSummary.promptKey) &&
|
|
Objects.equals(this.name, promptSummary.name) &&
|
|
Objects.equals(this.activeVersion, promptSummary.activeVersion) &&
|
|
Objects.equals(this.latestVersion, promptSummary.latestVersion) &&
|
|
Objects.equals(this.variableCount, promptSummary.variableCount) &&
|
|
Objects.equals(this.updatedAt, promptSummary.updatedAt);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(promptKey, name, activeVersion, latestVersion, variableCount, updatedAt);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class PromptSummary {\n");
|
|
sb.append(" promptKey: ").append(toIndentedString(promptKey)).append("\n");
|
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
|
sb.append(" activeVersion: ").append(toIndentedString(activeVersion)).append("\n");
|
|
sb.append(" latestVersion: ").append(toIndentedString(latestVersion)).append("\n");
|
|
sb.append(" variableCount: ").append(toIndentedString(variableCount)).append("\n");
|
|
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 ");
|
|
}
|
|
}
|
|
|