使用 openapi-generator-cli 7.22.0 + spring generator 生成 包含:Block/Chapter/Work/Candidate/Generation/Entitlement/Quota 等
187 lines
5.0 KiB
Java
187 lines
5.0 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 java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
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;
|
|
|
|
/**
|
|
* RequestGenerationRequest
|
|
*/
|
|
|
|
@JsonTypeName("requestGeneration_request")
|
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-05-24T14:16:55.032756+08:00[Asia/Shanghai]", comments = "Generator version: 7.22.0")
|
|
public class RequestGenerationRequest implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private UUID blockId;
|
|
|
|
private UUID agentId;
|
|
|
|
private @Nullable String prompt;
|
|
|
|
@Valid
|
|
private List<UUID> contextBlocks = new ArrayList<>();
|
|
|
|
public RequestGenerationRequest() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public RequestGenerationRequest(UUID blockId, UUID agentId) {
|
|
this.blockId = blockId;
|
|
this.agentId = agentId;
|
|
}
|
|
|
|
public RequestGenerationRequest blockId(UUID blockId) {
|
|
this.blockId = blockId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 目标 Block
|
|
* @return blockId
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "blockId", description = "目标 Block", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("blockId")
|
|
public UUID getBlockId() {
|
|
return blockId;
|
|
}
|
|
|
|
@JsonProperty("blockId")
|
|
public void setBlockId(UUID blockId) {
|
|
this.blockId = blockId;
|
|
}
|
|
|
|
public RequestGenerationRequest agentId(UUID agentId) {
|
|
this.agentId = agentId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 使用的智能体
|
|
* @return agentId
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "agentId", description = "使用的智能体", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("agentId")
|
|
public UUID getAgentId() {
|
|
return agentId;
|
|
}
|
|
|
|
@JsonProperty("agentId")
|
|
public void setAgentId(UUID agentId) {
|
|
this.agentId = agentId;
|
|
}
|
|
|
|
public RequestGenerationRequest prompt(@Nullable String prompt) {
|
|
this.prompt = prompt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 用户附加的提示词
|
|
* @return prompt
|
|
*/
|
|
|
|
@Schema(name = "prompt", description = "用户附加的提示词", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("prompt")
|
|
public @Nullable String getPrompt() {
|
|
return prompt;
|
|
}
|
|
|
|
@JsonProperty("prompt")
|
|
public void setPrompt(@Nullable String prompt) {
|
|
this.prompt = prompt;
|
|
}
|
|
|
|
public RequestGenerationRequest contextBlocks(List<UUID> contextBlocks) {
|
|
this.contextBlocks = contextBlocks;
|
|
return this;
|
|
}
|
|
|
|
public RequestGenerationRequest addContextBlocksItem(UUID contextBlocksItem) {
|
|
if (this.contextBlocks == null) {
|
|
this.contextBlocks = new ArrayList<>();
|
|
}
|
|
this.contextBlocks.add(contextBlocksItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 上下文 Block ID 列表
|
|
* @return contextBlocks
|
|
*/
|
|
@Valid
|
|
@Schema(name = "contextBlocks", description = "上下文 Block ID 列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("contextBlocks")
|
|
public List<UUID> getContextBlocks() {
|
|
return contextBlocks;
|
|
}
|
|
|
|
@JsonProperty("contextBlocks")
|
|
public void setContextBlocks(List<UUID> contextBlocks) {
|
|
this.contextBlocks = contextBlocks;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
RequestGenerationRequest requestGenerationRequest = (RequestGenerationRequest) o;
|
|
return Objects.equals(this.blockId, requestGenerationRequest.blockId) &&
|
|
Objects.equals(this.agentId, requestGenerationRequest.agentId) &&
|
|
Objects.equals(this.prompt, requestGenerationRequest.prompt) &&
|
|
Objects.equals(this.contextBlocks, requestGenerationRequest.contextBlocks);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(blockId, agentId, prompt, contextBlocks);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class RequestGenerationRequest {\n");
|
|
sb.append(" blockId: ").append(toIndentedString(blockId)).append("\n");
|
|
sb.append(" agentId: ").append(toIndentedString(agentId)).append("\n");
|
|
sb.append(" prompt: ").append(toIndentedString(prompt)).append("\n");
|
|
sb.append(" contextBlocks: ").append(toIndentedString(contextBlocks)).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 ");
|
|
}
|
|
}
|
|
|