258 lines
7.2 KiB
Java
258 lines
7.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.JsonTypeName;
|
||
import com.muse.dto.ToolGrantBudget;
|
||
import com.muse.dto.ToolGrantOutboundPolicy;
|
||
import com.muse.dto.ToolGrantScope;
|
||
import java.util.UUID;
|
||
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;
|
||
|
||
/**
|
||
* AdminCreateOrAdjustToolGrantRequest
|
||
*/
|
||
|
||
@JsonTypeName("adminCreateOrAdjustToolGrant_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 AdminCreateOrAdjustToolGrantRequest implements Serializable {
|
||
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
private UUID agentId;
|
||
|
||
private String toolType;
|
||
|
||
private ToolGrantScope scope;
|
||
|
||
private ToolGrantBudget budget;
|
||
|
||
private ToolGrantOutboundPolicy outboundPolicy;
|
||
|
||
private String commandId;
|
||
|
||
private String reason;
|
||
|
||
public AdminCreateOrAdjustToolGrantRequest() {
|
||
super();
|
||
}
|
||
|
||
/**
|
||
* Constructor with only required parameters
|
||
*/
|
||
public AdminCreateOrAdjustToolGrantRequest(UUID agentId, String toolType, ToolGrantScope scope, ToolGrantBudget budget, ToolGrantOutboundPolicy outboundPolicy, String commandId, String reason) {
|
||
this.agentId = agentId;
|
||
this.toolType = toolType;
|
||
this.scope = scope;
|
||
this.budget = budget;
|
||
this.outboundPolicy = outboundPolicy;
|
||
this.commandId = commandId;
|
||
this.reason = reason;
|
||
}
|
||
|
||
public AdminCreateOrAdjustToolGrantRequest agentId(UUID agentId) {
|
||
this.agentId = agentId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 目标智能体 ID
|
||
* @return agentId
|
||
*/
|
||
@NotNull @Valid
|
||
@Schema(name = "agentId", description = "目标智能体 ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("agentId")
|
||
public UUID getAgentId() {
|
||
return agentId;
|
||
}
|
||
|
||
@JsonProperty("agentId")
|
||
public void setAgentId(UUID agentId) {
|
||
this.agentId = agentId;
|
||
}
|
||
|
||
public AdminCreateOrAdjustToolGrantRequest toolType(String toolType) {
|
||
this.toolType = toolType;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 工具类型(例如 web_search, file_read, api_call)
|
||
* @return toolType
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "toolType", description = "工具类型(例如 web_search, file_read, api_call)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("toolType")
|
||
public String getToolType() {
|
||
return toolType;
|
||
}
|
||
|
||
@JsonProperty("toolType")
|
||
public void setToolType(String toolType) {
|
||
this.toolType = toolType;
|
||
}
|
||
|
||
public AdminCreateOrAdjustToolGrantRequest scope(ToolGrantScope scope) {
|
||
this.scope = scope;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get scope
|
||
* @return scope
|
||
*/
|
||
@NotNull @Valid
|
||
@Schema(name = "scope", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("scope")
|
||
public ToolGrantScope getScope() {
|
||
return scope;
|
||
}
|
||
|
||
@JsonProperty("scope")
|
||
public void setScope(ToolGrantScope scope) {
|
||
this.scope = scope;
|
||
}
|
||
|
||
public AdminCreateOrAdjustToolGrantRequest budget(ToolGrantBudget budget) {
|
||
this.budget = budget;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get budget
|
||
* @return budget
|
||
*/
|
||
@NotNull @Valid
|
||
@Schema(name = "budget", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("budget")
|
||
public ToolGrantBudget getBudget() {
|
||
return budget;
|
||
}
|
||
|
||
@JsonProperty("budget")
|
||
public void setBudget(ToolGrantBudget budget) {
|
||
this.budget = budget;
|
||
}
|
||
|
||
public AdminCreateOrAdjustToolGrantRequest outboundPolicy(ToolGrantOutboundPolicy outboundPolicy) {
|
||
this.outboundPolicy = outboundPolicy;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get outboundPolicy
|
||
* @return outboundPolicy
|
||
*/
|
||
@NotNull @Valid
|
||
@Schema(name = "outboundPolicy", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("outboundPolicy")
|
||
public ToolGrantOutboundPolicy getOutboundPolicy() {
|
||
return outboundPolicy;
|
||
}
|
||
|
||
@JsonProperty("outboundPolicy")
|
||
public void setOutboundPolicy(ToolGrantOutboundPolicy outboundPolicy) {
|
||
this.outboundPolicy = outboundPolicy;
|
||
}
|
||
|
||
public AdminCreateOrAdjustToolGrantRequest 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;
|
||
}
|
||
|
||
public AdminCreateOrAdjustToolGrantRequest reason(String reason) {
|
||
this.reason = reason;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 授权/调整原因
|
||
* @return reason
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "reason", description = "授权/调整原因", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("reason")
|
||
public String getReason() {
|
||
return reason;
|
||
}
|
||
|
||
@JsonProperty("reason")
|
||
public void setReason(String reason) {
|
||
this.reason = reason;
|
||
}
|
||
|
||
@Override
|
||
public boolean equals(Object o) {
|
||
if (this == o) {
|
||
return true;
|
||
}
|
||
if (o == null || getClass() != o.getClass()) {
|
||
return false;
|
||
}
|
||
AdminCreateOrAdjustToolGrantRequest adminCreateOrAdjustToolGrantRequest = (AdminCreateOrAdjustToolGrantRequest) o;
|
||
return Objects.equals(this.agentId, adminCreateOrAdjustToolGrantRequest.agentId) &&
|
||
Objects.equals(this.toolType, adminCreateOrAdjustToolGrantRequest.toolType) &&
|
||
Objects.equals(this.scope, adminCreateOrAdjustToolGrantRequest.scope) &&
|
||
Objects.equals(this.budget, adminCreateOrAdjustToolGrantRequest.budget) &&
|
||
Objects.equals(this.outboundPolicy, adminCreateOrAdjustToolGrantRequest.outboundPolicy) &&
|
||
Objects.equals(this.commandId, adminCreateOrAdjustToolGrantRequest.commandId) &&
|
||
Objects.equals(this.reason, adminCreateOrAdjustToolGrantRequest.reason);
|
||
}
|
||
|
||
@Override
|
||
public int hashCode() {
|
||
return Objects.hash(agentId, toolType, scope, budget, outboundPolicy, commandId, reason);
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
StringBuilder sb = new StringBuilder();
|
||
sb.append("class AdminCreateOrAdjustToolGrantRequest {\n");
|
||
sb.append(" agentId: ").append(toIndentedString(agentId)).append("\n");
|
||
sb.append(" toolType: ").append(toIndentedString(toolType)).append("\n");
|
||
sb.append(" scope: ").append(toIndentedString(scope)).append("\n");
|
||
sb.append(" budget: ").append(toIndentedString(budget)).append("\n");
|
||
sb.append(" outboundPolicy: ").append(toIndentedString(outboundPolicy)).append("\n");
|
||
sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n");
|
||
sb.append(" reason: ").append(toIndentedString(reason)).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 ");
|
||
}
|
||
}
|
||
|