oh-my-muse/docs/api-contracts/generated/java/com/muse/dto/AdminCreateAgentRequest.java

296 lines
8.2 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 com.fasterxml.jackson.annotation.JsonValue;
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;
/**
* AdminCreateAgentRequest
*/
@JsonTypeName("adminCreateAgent_request")
@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 AdminCreateAgentRequest implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 固定为 system请求体如传入 scope 也只能是 system不能创建 user scope Agent。
*/
public enum ScopeEnum {
SYSTEM("system");
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 = ScopeEnum.SYSTEM;
private String name;
private @Nullable String description;
private String promptKey;
private @Nullable Object slotBindings;
@Valid
private List<String> toolGrantIds = new ArrayList<>();
private String commandId;
public AdminCreateAgentRequest() {
super();
}
/**
* Constructor with only required parameters
*/
public AdminCreateAgentRequest(String name, String promptKey, String commandId) {
this.name = name;
this.promptKey = promptKey;
this.commandId = commandId;
}
public AdminCreateAgentRequest scope(ScopeEnum scope) {
this.scope = scope;
return this;
}
/**
* 固定为 system请求体如传入 scope 也只能是 system不能创建 user scope Agent。
* @return scope
*/
@Schema(name = "scope", description = "固定为 system请求体如传入 scope 也只能是 system不能创建 user scope Agent。", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("scope")
public ScopeEnum getScope() {
return scope;
}
@JsonProperty("scope")
public void setScope(ScopeEnum scope) {
this.scope = scope;
}
public AdminCreateAgentRequest name(String name) {
this.name = name;
return this;
}
/**
* Agent 名称
* @return name
*/
@NotNull @Size(max = 100)
@Schema(name = "name", description = "Agent 名称", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
public AdminCreateAgentRequest description(@Nullable String description) {
this.description = description;
return this;
}
/**
* Agent 描述
* @return description
*/
@Size(max = 1000)
@Schema(name = "description", description = "Agent 描述", 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 AdminCreateAgentRequest promptKey(String promptKey) {
this.promptKey = promptKey;
return this;
}
/**
* 关联的 Prompt key
* @return promptKey
*/
@NotNull
@Schema(name = "promptKey", description = "关联的 Prompt key", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("promptKey")
public String getPromptKey() {
return promptKey;
}
@JsonProperty("promptKey")
public void setPromptKey(String promptKey) {
this.promptKey = promptKey;
}
public AdminCreateAgentRequest slotBindings(@Nullable Object slotBindings) {
this.slotBindings = slotBindings;
return this;
}
/**
* 槽位绑定配置(知识库/MetaSchema/模型参数)
* @return slotBindings
*/
@Schema(name = "slotBindings", description = "槽位绑定配置(知识库/MetaSchema/模型参数)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("slotBindings")
public @Nullable Object getSlotBindings() {
return slotBindings;
}
@JsonProperty("slotBindings")
public void setSlotBindings(@Nullable Object slotBindings) {
this.slotBindings = slotBindings;
}
public AdminCreateAgentRequest toolGrantIds(List<String> toolGrantIds) {
this.toolGrantIds = toolGrantIds;
return this;
}
public AdminCreateAgentRequest addToolGrantIdsItem(String toolGrantIdsItem) {
if (this.toolGrantIds == null) {
this.toolGrantIds = new ArrayList<>();
}
this.toolGrantIds.add(toolGrantIdsItem);
return this;
}
/**
* 关联的系统级工具授权 ID 列表,必须来自 Security facade 已批准的授权。
* @return toolGrantIds
*/
@Schema(name = "toolGrantIds", description = "关联的系统级工具授权 ID 列表,必须来自 Security facade 已批准的授权。", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("toolGrantIds")
public List<String> getToolGrantIds() {
return toolGrantIds;
}
@JsonProperty("toolGrantIds")
public void setToolGrantIds(List<String> toolGrantIds) {
this.toolGrantIds = toolGrantIds;
}
public AdminCreateAgentRequest commandId(String commandId) {
this.commandId = commandId;
return this;
}
/**
* 幂等键
* @return commandId
*/
@NotNull
@Schema(name = "commandId", description = "幂等键", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("commandId")
public String getCommandId() {
return commandId;
}
@JsonProperty("commandId")
public void setCommandId(String commandId) {
this.commandId = commandId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdminCreateAgentRequest adminCreateAgentRequest = (AdminCreateAgentRequest) o;
return Objects.equals(this.scope, adminCreateAgentRequest.scope) &&
Objects.equals(this.name, adminCreateAgentRequest.name) &&
Objects.equals(this.description, adminCreateAgentRequest.description) &&
Objects.equals(this.promptKey, adminCreateAgentRequest.promptKey) &&
Objects.equals(this.slotBindings, adminCreateAgentRequest.slotBindings) &&
Objects.equals(this.toolGrantIds, adminCreateAgentRequest.toolGrantIds) &&
Objects.equals(this.commandId, adminCreateAgentRequest.commandId);
}
@Override
public int hashCode() {
return Objects.hash(scope, name, description, promptKey, slotBindings, toolGrantIds, commandId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdminCreateAgentRequest {\n");
sb.append(" scope: ").append(toIndentedString(scope)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" promptKey: ").append(toIndentedString(promptKey)).append("\n");
sb.append(" slotBindings: ").append(toIndentedString(slotBindings)).append("\n");
sb.append(" toolGrantIds: ").append(toIndentedString(toolGrantIds)).append("\n");
sb.append(" commandId: ").append(toIndentedString(commandId)).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 ");
}
}