350 lines
8.5 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;
/**
* AdminAgentSummary
*/
@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 AdminAgentSummary implements Serializable {
private static final long serialVersionUID = 1L;
private UUID agentId;
private String name;
private @Nullable String description;
/**
* system=系统预置, user=用户创建
*/
public enum ScopeEnum {
SYSTEM("system"),
USER("user");
private final String value;
ScopeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ScopeEnum fromValue(String value) {
for (ScopeEnum b : ScopeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private ScopeEnum scope;
private @Nullable Integer activeVersion;
private @Nullable String promptKey;
/**
* Gets or Sets status
*/
public enum StatusEnum {
ACTIVE("active"),
ARCHIVED("archived");
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;
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
private OffsetDateTime updatedAt;
public AdminAgentSummary() {
super();
}
/**
* Constructor with only required parameters
*/
public AdminAgentSummary(UUID agentId, String name, ScopeEnum scope, StatusEnum status, OffsetDateTime updatedAt) {
this.agentId = agentId;
this.name = name;
this.scope = scope;
this.status = status;
this.updatedAt = updatedAt;
}
public AdminAgentSummary agentId(UUID agentId) {
this.agentId = agentId;
return this;
}
/**
* Get agentId
* @return agentId
*/
@NotNull @Valid
@Schema(name = "agentId", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("agentId")
public UUID getAgentId() {
return agentId;
}
@JsonProperty("agentId")
public void setAgentId(UUID agentId) {
this.agentId = agentId;
}
public AdminAgentSummary name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
*/
@NotNull
@Schema(name = "name", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
public AdminAgentSummary description(@Nullable String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
*/
@Schema(name = "description", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("description")
public @Nullable String getDescription() {
return description;
}
@JsonProperty("description")
public void setDescription(@Nullable String description) {
this.description = description;
}
public AdminAgentSummary scope(ScopeEnum scope) {
this.scope = scope;
return this;
}
/**
* system=系统预置, user=用户创建
* @return scope
*/
@NotNull
@Schema(name = "scope", description = "system=系统预置, user=用户创建", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("scope")
public ScopeEnum getScope() {
return scope;
}
@JsonProperty("scope")
public void setScope(ScopeEnum scope) {
this.scope = scope;
}
public AdminAgentSummary activeVersion(@Nullable Integer activeVersion) {
this.activeVersion = activeVersion;
return this;
}
/**
* Get activeVersion
* @return activeVersion
*/
@Schema(name = "activeVersion", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("activeVersion")
public @Nullable Integer getActiveVersion() {
return activeVersion;
}
@JsonProperty("activeVersion")
public void setActiveVersion(@Nullable Integer activeVersion) {
this.activeVersion = activeVersion;
}
public AdminAgentSummary promptKey(@Nullable String promptKey) {
this.promptKey = promptKey;
return this;
}
/**
* 关联的 Prompt key
* @return promptKey
*/
@Schema(name = "promptKey", description = "关联的 Prompt key", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("promptKey")
public @Nullable String getPromptKey() {
return promptKey;
}
@JsonProperty("promptKey")
public void setPromptKey(@Nullable String promptKey) {
this.promptKey = promptKey;
}
public AdminAgentSummary 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 AdminAgentSummary 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;
}
AdminAgentSummary adminAgentSummary = (AdminAgentSummary) o;
return Objects.equals(this.agentId, adminAgentSummary.agentId) &&
Objects.equals(this.name, adminAgentSummary.name) &&
Objects.equals(this.description, adminAgentSummary.description) &&
Objects.equals(this.scope, adminAgentSummary.scope) &&
Objects.equals(this.activeVersion, adminAgentSummary.activeVersion) &&
Objects.equals(this.promptKey, adminAgentSummary.promptKey) &&
Objects.equals(this.status, adminAgentSummary.status) &&
Objects.equals(this.updatedAt, adminAgentSummary.updatedAt);
}
@Override
public int hashCode() {
return Objects.hash(agentId, name, description, scope, activeVersion, promptKey, status, updatedAt);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdminAgentSummary {\n");
sb.append(" agentId: ").append(toIndentedString(agentId)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" scope: ").append(toIndentedString(scope)).append("\n");
sb.append(" activeVersion: ").append(toIndentedString(activeVersion)).append("\n");
sb.append(" promptKey: ").append(toIndentedString(promptKey)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).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 ");
}
}