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

249 lines
7.1 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.JsonValue;
import com.muse.dto.CreatePlanningCandidateRequestSourceSnapshot;
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;
/**
* 请求 AI Orchestration 执行文风检查的作品上下文引用
*/
@Schema(name = "CreateStyleCheckRequest", description = "请求 AI Orchestration 执行文风检查的作品上下文引用")
@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 CreateStyleCheckRequest implements Serializable {
private static final long serialVersionUID = 1L;
private String commandId;
/**
* 检查范围,默认 full_work
*/
public enum CheckScopeEnum {
FULL_WORK("full_work"),
SELECTED_CHAPTERS("selected_chapters"),
SELECTED_BLOCKS("selected_blocks");
private final String value;
CheckScopeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static CheckScopeEnum fromValue(String value) {
for (CheckScopeEnum b : CheckScopeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private @Nullable CheckScopeEnum checkScope;
@Valid
private List<UUID> targetIds = new ArrayList<>();
private @Nullable Object styleRules;
private @Nullable CreatePlanningCandidateRequestSourceSnapshot sourceSnapshot;
public CreateStyleCheckRequest() {
super();
}
/**
* Constructor with only required parameters
*/
public CreateStyleCheckRequest(String commandId) {
this.commandId = commandId;
}
public CreateStyleCheckRequest 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 CreateStyleCheckRequest checkScope(@Nullable CheckScopeEnum checkScope) {
this.checkScope = checkScope;
return this;
}
/**
* 检查范围,默认 full_work
* @return checkScope
*/
@Schema(name = "checkScope", description = "检查范围,默认 full_work", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("checkScope")
public @Nullable CheckScopeEnum getCheckScope() {
return checkScope;
}
@JsonProperty("checkScope")
public void setCheckScope(@Nullable CheckScopeEnum checkScope) {
this.checkScope = checkScope;
}
public CreateStyleCheckRequest targetIds(List<UUID> targetIds) {
this.targetIds = targetIds;
return this;
}
public CreateStyleCheckRequest addTargetIdsItem(UUID targetIdsItem) {
if (this.targetIds == null) {
this.targetIds = new ArrayList<>();
}
this.targetIds.add(targetIdsItem);
return this;
}
/**
* 指定检查的章节或 Block IDcheckScope 非 full_work 时必填)
* @return targetIds
*/
@Valid
@Schema(name = "targetIds", description = "指定检查的章节或 Block IDcheckScope 非 full_work 时必填)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("targetIds")
public List<UUID> getTargetIds() {
return targetIds;
}
@JsonProperty("targetIds")
public void setTargetIds(List<UUID> targetIds) {
this.targetIds = targetIds;
}
public CreateStyleCheckRequest styleRules(@Nullable Object styleRules) {
this.styleRules = styleRules;
return this;
}
/**
* 自定义文风规则(可选,不传则使用作品设定)
* @return styleRules
*/
@Schema(name = "styleRules", description = "自定义文风规则(可选,不传则使用作品设定)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("styleRules")
public @Nullable Object getStyleRules() {
return styleRules;
}
@JsonProperty("styleRules")
public void setStyleRules(@Nullable Object styleRules) {
this.styleRules = styleRules;
}
public CreateStyleCheckRequest sourceSnapshot(@Nullable CreatePlanningCandidateRequestSourceSnapshot sourceSnapshot) {
this.sourceSnapshot = sourceSnapshot;
return this;
}
/**
* Get sourceSnapshot
* @return sourceSnapshot
*/
@Valid
@Schema(name = "sourceSnapshot", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("sourceSnapshot")
public @Nullable CreatePlanningCandidateRequestSourceSnapshot getSourceSnapshot() {
return sourceSnapshot;
}
@JsonProperty("sourceSnapshot")
public void setSourceSnapshot(@Nullable CreatePlanningCandidateRequestSourceSnapshot sourceSnapshot) {
this.sourceSnapshot = sourceSnapshot;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateStyleCheckRequest createStyleCheckRequest = (CreateStyleCheckRequest) o;
return Objects.equals(this.commandId, createStyleCheckRequest.commandId) &&
Objects.equals(this.checkScope, createStyleCheckRequest.checkScope) &&
Objects.equals(this.targetIds, createStyleCheckRequest.targetIds) &&
Objects.equals(this.styleRules, createStyleCheckRequest.styleRules) &&
Objects.equals(this.sourceSnapshot, createStyleCheckRequest.sourceSnapshot);
}
@Override
public int hashCode() {
return Objects.hash(commandId, checkScope, targetIds, styleRules, sourceSnapshot);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateStyleCheckRequest {\n");
sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n");
sb.append(" checkScope: ").append(toIndentedString(checkScope)).append("\n");
sb.append(" targetIds: ").append(toIndentedString(targetIds)).append("\n");
sb.append(" styleRules: ").append(toIndentedString(styleRules)).append("\n");
sb.append(" sourceSnapshot: ").append(toIndentedString(sourceSnapshot)).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 ");
}
}