176 lines
5.2 KiB
Java
176 lines
5.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.fasterxml.jackson.annotation.JsonValue;
|
|
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;
|
|
|
|
/**
|
|
* 解析配置
|
|
*/
|
|
|
|
@Schema(name = "CreateParseJobRequest_parseConfig", description = "解析配置")
|
|
@JsonTypeName("CreateParseJobRequest_parseConfig")
|
|
@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 CreateParseJobRequestParseConfig implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* 章节检测模式
|
|
*/
|
|
public enum ChapterDetectionModeEnum {
|
|
AUTO("auto"),
|
|
|
|
MANUAL_OUTLINE("manual_outline"),
|
|
|
|
HYBRID("hybrid");
|
|
|
|
private final String value;
|
|
|
|
ChapterDetectionModeEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static ChapterDetectionModeEnum fromValue(String value) {
|
|
for (ChapterDetectionModeEnum b : ChapterDetectionModeEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private @Nullable ChapterDetectionModeEnum chapterDetectionMode;
|
|
|
|
private @Nullable String languageHint;
|
|
|
|
private @Nullable String customInstructions;
|
|
|
|
public CreateParseJobRequestParseConfig chapterDetectionMode(@Nullable ChapterDetectionModeEnum chapterDetectionMode) {
|
|
this.chapterDetectionMode = chapterDetectionMode;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 章节检测模式
|
|
* @return chapterDetectionMode
|
|
*/
|
|
|
|
@Schema(name = "chapterDetectionMode", description = "章节检测模式", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("chapterDetectionMode")
|
|
public @Nullable ChapterDetectionModeEnum getChapterDetectionMode() {
|
|
return chapterDetectionMode;
|
|
}
|
|
|
|
@JsonProperty("chapterDetectionMode")
|
|
public void setChapterDetectionMode(@Nullable ChapterDetectionModeEnum chapterDetectionMode) {
|
|
this.chapterDetectionMode = chapterDetectionMode;
|
|
}
|
|
|
|
public CreateParseJobRequestParseConfig languageHint(@Nullable String languageHint) {
|
|
this.languageHint = languageHint;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 语言提示
|
|
* @return languageHint
|
|
*/
|
|
|
|
@Schema(name = "languageHint", description = "语言提示", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("languageHint")
|
|
public @Nullable String getLanguageHint() {
|
|
return languageHint;
|
|
}
|
|
|
|
@JsonProperty("languageHint")
|
|
public void setLanguageHint(@Nullable String languageHint) {
|
|
this.languageHint = languageHint;
|
|
}
|
|
|
|
public CreateParseJobRequestParseConfig customInstructions(@Nullable String customInstructions) {
|
|
this.customInstructions = customInstructions;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 自定义解析指令
|
|
* @return customInstructions
|
|
*/
|
|
|
|
@Schema(name = "customInstructions", description = "自定义解析指令", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("customInstructions")
|
|
public @Nullable String getCustomInstructions() {
|
|
return customInstructions;
|
|
}
|
|
|
|
@JsonProperty("customInstructions")
|
|
public void setCustomInstructions(@Nullable String customInstructions) {
|
|
this.customInstructions = customInstructions;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
CreateParseJobRequestParseConfig createParseJobRequestParseConfig = (CreateParseJobRequestParseConfig) o;
|
|
return Objects.equals(this.chapterDetectionMode, createParseJobRequestParseConfig.chapterDetectionMode) &&
|
|
Objects.equals(this.languageHint, createParseJobRequestParseConfig.languageHint) &&
|
|
Objects.equals(this.customInstructions, createParseJobRequestParseConfig.customInstructions);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(chapterDetectionMode, languageHint, customInstructions);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class CreateParseJobRequestParseConfig {\n");
|
|
sb.append(" chapterDetectionMode: ").append(toIndentedString(chapterDetectionMode)).append("\n");
|
|
sb.append(" languageHint: ").append(toIndentedString(languageHint)).append("\n");
|
|
sb.append(" customInstructions: ").append(toIndentedString(customInstructions)).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 ");
|
|
}
|
|
}
|
|
|