325 lines
7.7 KiB
Java
325 lines
7.7 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;
|
|
|
|
/**
|
|
* AgentSummary
|
|
*/
|
|
|
|
@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 AgentSummary implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private UUID agentId;
|
|
|
|
private String name;
|
|
|
|
private @Nullable String description;
|
|
|
|
/**
|
|
* system=系统预置, mine=用户自建
|
|
*/
|
|
public enum ScopeEnum {
|
|
SYSTEM("system"),
|
|
|
|
MINE("mine");
|
|
|
|
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;
|
|
|
|
/**
|
|
* 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 AgentSummary() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public AgentSummary(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 AgentSummary 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 AgentSummary 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 AgentSummary 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 AgentSummary scope(ScopeEnum scope) {
|
|
this.scope = scope;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* system=系统预置, mine=用户自建
|
|
* @return scope
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "scope", description = "system=系统预置, mine=用户自建", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("scope")
|
|
public ScopeEnum getScope() {
|
|
return scope;
|
|
}
|
|
|
|
@JsonProperty("scope")
|
|
public void setScope(ScopeEnum scope) {
|
|
this.scope = scope;
|
|
}
|
|
|
|
public AgentSummary 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 AgentSummary 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 AgentSummary 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;
|
|
}
|
|
AgentSummary agentSummary = (AgentSummary) o;
|
|
return Objects.equals(this.agentId, agentSummary.agentId) &&
|
|
Objects.equals(this.name, agentSummary.name) &&
|
|
Objects.equals(this.description, agentSummary.description) &&
|
|
Objects.equals(this.scope, agentSummary.scope) &&
|
|
Objects.equals(this.activeVersion, agentSummary.activeVersion) &&
|
|
Objects.equals(this.status, agentSummary.status) &&
|
|
Objects.equals(this.updatedAt, agentSummary.updatedAt);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(agentId, name, description, scope, activeVersion, status, updatedAt);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class AgentSummary {\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(" 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 ");
|
|
}
|
|
}
|
|
|