332 lines
8.5 KiB
Java
332 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 com.muse.dto.AgentTestRequestInput;
|
||
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;
|
||
|
||
/**
|
||
* AgentTestRequest
|
||
*/
|
||
|
||
@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 AgentTestRequest implements Serializable {
|
||
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
private @Nullable UUID workId;
|
||
|
||
/**
|
||
* 决定试用时可读取的上下文范围
|
||
*/
|
||
public enum ContextScopeEnum {
|
||
NONE("none"),
|
||
|
||
WORK("work"),
|
||
|
||
CHAPTER("chapter");
|
||
|
||
private final String value;
|
||
|
||
ContextScopeEnum(String value) {
|
||
this.value = value;
|
||
}
|
||
|
||
@JsonValue
|
||
public String getValue() {
|
||
return value;
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
return String.valueOf(value);
|
||
}
|
||
|
||
@JsonCreator
|
||
public static ContextScopeEnum fromValue(String value) {
|
||
for (ContextScopeEnum b : ContextScopeEnum.values()) {
|
||
if (b.value.equals(value)) {
|
||
return b;
|
||
}
|
||
}
|
||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||
}
|
||
}
|
||
|
||
private ContextScopeEnum contextScope = ContextScopeEnum.NONE;
|
||
|
||
/**
|
||
* 决定本次试用是否计费
|
||
*/
|
||
public enum UsagePolicyEnum {
|
||
CHARGE("charge"),
|
||
|
||
FREE_TRIAL("free_trial");
|
||
|
||
private final String value;
|
||
|
||
UsagePolicyEnum(String value) {
|
||
this.value = value;
|
||
}
|
||
|
||
@JsonValue
|
||
public String getValue() {
|
||
return value;
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
return String.valueOf(value);
|
||
}
|
||
|
||
@JsonCreator
|
||
public static UsagePolicyEnum fromValue(String value) {
|
||
for (UsagePolicyEnum b : UsagePolicyEnum.values()) {
|
||
if (b.value.equals(value)) {
|
||
return b;
|
||
}
|
||
}
|
||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||
}
|
||
}
|
||
|
||
private UsagePolicyEnum usagePolicy = UsagePolicyEnum.CHARGE;
|
||
|
||
/**
|
||
* preview_only 只返回预览不落库,shadow 写入 Shadow Candidate 供后续决策
|
||
*/
|
||
public enum OutputTargetEnum {
|
||
PREVIEW_ONLY("preview_only"),
|
||
|
||
SHADOW("shadow");
|
||
|
||
private final String value;
|
||
|
||
OutputTargetEnum(String value) {
|
||
this.value = value;
|
||
}
|
||
|
||
@JsonValue
|
||
public String getValue() {
|
||
return value;
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
return String.valueOf(value);
|
||
}
|
||
|
||
@JsonCreator
|
||
public static OutputTargetEnum fromValue(String value) {
|
||
for (OutputTargetEnum b : OutputTargetEnum.values()) {
|
||
if (b.value.equals(value)) {
|
||
return b;
|
||
}
|
||
}
|
||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||
}
|
||
}
|
||
|
||
private OutputTargetEnum outputTarget = OutputTargetEnum.PREVIEW_ONLY;
|
||
|
||
private AgentTestRequestInput input;
|
||
|
||
private String commandId;
|
||
|
||
public AgentTestRequest() {
|
||
super();
|
||
}
|
||
|
||
/**
|
||
* Constructor with only required parameters
|
||
*/
|
||
public AgentTestRequest(AgentTestRequestInput input, String commandId) {
|
||
this.input = input;
|
||
this.commandId = commandId;
|
||
}
|
||
|
||
public AgentTestRequest workId(@Nullable UUID workId) {
|
||
this.workId = workId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 可选,关联作品上下文;不传时使用沙箱上下文
|
||
* @return workId
|
||
*/
|
||
@Valid
|
||
@Schema(name = "workId", description = "可选,关联作品上下文;不传时使用沙箱上下文", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("workId")
|
||
public @Nullable UUID getWorkId() {
|
||
return workId;
|
||
}
|
||
|
||
@JsonProperty("workId")
|
||
public void setWorkId(@Nullable UUID workId) {
|
||
this.workId = workId;
|
||
}
|
||
|
||
public AgentTestRequest contextScope(ContextScopeEnum contextScope) {
|
||
this.contextScope = contextScope;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 决定试用时可读取的上下文范围
|
||
* @return contextScope
|
||
*/
|
||
|
||
@Schema(name = "contextScope", description = "决定试用时可读取的上下文范围", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("contextScope")
|
||
public ContextScopeEnum getContextScope() {
|
||
return contextScope;
|
||
}
|
||
|
||
@JsonProperty("contextScope")
|
||
public void setContextScope(ContextScopeEnum contextScope) {
|
||
this.contextScope = contextScope;
|
||
}
|
||
|
||
public AgentTestRequest usagePolicy(UsagePolicyEnum usagePolicy) {
|
||
this.usagePolicy = usagePolicy;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 决定本次试用是否计费
|
||
* @return usagePolicy
|
||
*/
|
||
|
||
@Schema(name = "usagePolicy", description = "决定本次试用是否计费", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("usagePolicy")
|
||
public UsagePolicyEnum getUsagePolicy() {
|
||
return usagePolicy;
|
||
}
|
||
|
||
@JsonProperty("usagePolicy")
|
||
public void setUsagePolicy(UsagePolicyEnum usagePolicy) {
|
||
this.usagePolicy = usagePolicy;
|
||
}
|
||
|
||
public AgentTestRequest outputTarget(OutputTargetEnum outputTarget) {
|
||
this.outputTarget = outputTarget;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* preview_only 只返回预览不落库,shadow 写入 Shadow Candidate 供后续决策
|
||
* @return outputTarget
|
||
*/
|
||
|
||
@Schema(name = "outputTarget", description = "preview_only 只返回预览不落库,shadow 写入 Shadow Candidate 供后续决策", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("outputTarget")
|
||
public OutputTargetEnum getOutputTarget() {
|
||
return outputTarget;
|
||
}
|
||
|
||
@JsonProperty("outputTarget")
|
||
public void setOutputTarget(OutputTargetEnum outputTarget) {
|
||
this.outputTarget = outputTarget;
|
||
}
|
||
|
||
public AgentTestRequest input(AgentTestRequestInput input) {
|
||
this.input = input;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* Get input
|
||
* @return input
|
||
*/
|
||
@NotNull @Valid
|
||
@Schema(name = "input", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("input")
|
||
public AgentTestRequestInput getInput() {
|
||
return input;
|
||
}
|
||
|
||
@JsonProperty("input")
|
||
public void setInput(AgentTestRequestInput input) {
|
||
this.input = input;
|
||
}
|
||
|
||
public AgentTestRequest 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;
|
||
}
|
||
AgentTestRequest agentTestRequest = (AgentTestRequest) o;
|
||
return Objects.equals(this.workId, agentTestRequest.workId) &&
|
||
Objects.equals(this.contextScope, agentTestRequest.contextScope) &&
|
||
Objects.equals(this.usagePolicy, agentTestRequest.usagePolicy) &&
|
||
Objects.equals(this.outputTarget, agentTestRequest.outputTarget) &&
|
||
Objects.equals(this.input, agentTestRequest.input) &&
|
||
Objects.equals(this.commandId, agentTestRequest.commandId);
|
||
}
|
||
|
||
@Override
|
||
public int hashCode() {
|
||
return Objects.hash(workId, contextScope, usagePolicy, outputTarget, input, commandId);
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
StringBuilder sb = new StringBuilder();
|
||
sb.append("class AgentTestRequest {\n");
|
||
sb.append(" workId: ").append(toIndentedString(workId)).append("\n");
|
||
sb.append(" contextScope: ").append(toIndentedString(contextScope)).append("\n");
|
||
sb.append(" usagePolicy: ").append(toIndentedString(usagePolicy)).append("\n");
|
||
sb.append(" outputTarget: ").append(toIndentedString(outputTarget)).append("\n");
|
||
sb.append(" input: ").append(toIndentedString(input)).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 ");
|
||
}
|
||
}
|
||
|