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; /** * CreateKBExportTaskRequest */ @JsonTypeName("createKBExportTask_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 CreateKBExportTaskRequest implements Serializable { private static final long serialVersionUID = 1L; private String commandId; private String kbExportCheckId; /** * 导出格式 */ public enum FormatEnum { JSON("json"), MARKDOWN("markdown"), ZIP("zip"); private final String value; FormatEnum(String value) { this.value = value; } @JsonValue public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } @JsonCreator public static FormatEnum fromValue(String value) { for (FormatEnum b : FormatEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } private FormatEnum format = FormatEnum.ZIP; /** * 导出范围 */ public enum ScopeEnum { FULL("full"), METADATA_ONLY("metadata_only"), DOCUMENTS_ONLY("documents_only"); private final String value; ScopeEnum(String value) { this.value = value; } @JsonValue public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } @JsonCreator public static ScopeEnum fromValue(String value) { for (ScopeEnum b : ScopeEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } private ScopeEnum scope = ScopeEnum.FULL; private @Nullable Boolean desensitizationConfirmed; public CreateKBExportTaskRequest() { super(); } /** * Constructor with only required parameters */ public CreateKBExportTaskRequest(String commandId, String kbExportCheckId) { this.commandId = commandId; this.kbExportCheckId = kbExportCheckId; } public CreateKBExportTaskRequest 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 CreateKBExportTaskRequest kbExportCheckId(String kbExportCheckId) { this.kbExportCheckId = kbExportCheckId; return this; } /** * 导出预检 ID * @return kbExportCheckId */ @NotNull @Schema(name = "kbExportCheckId", description = "导出预检 ID", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("kbExportCheckId") public String getKbExportCheckId() { return kbExportCheckId; } @JsonProperty("kbExportCheckId") public void setKbExportCheckId(String kbExportCheckId) { this.kbExportCheckId = kbExportCheckId; } public CreateKBExportTaskRequest format(FormatEnum format) { this.format = format; return this; } /** * 导出格式 * @return format */ @Schema(name = "format", description = "导出格式", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("format") public FormatEnum getFormat() { return format; } @JsonProperty("format") public void setFormat(FormatEnum format) { this.format = format; } public CreateKBExportTaskRequest scope(ScopeEnum scope) { this.scope = scope; return this; } /** * 导出范围 * @return scope */ @Schema(name = "scope", description = "导出范围", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("scope") public ScopeEnum getScope() { return scope; } @JsonProperty("scope") public void setScope(ScopeEnum scope) { this.scope = scope; } public CreateKBExportTaskRequest desensitizationConfirmed(@Nullable Boolean desensitizationConfirmed) { this.desensitizationConfirmed = desensitizationConfirmed; return this; } /** * 用户已确认脱敏规则 * @return desensitizationConfirmed */ @Schema(name = "desensitizationConfirmed", description = "用户已确认脱敏规则", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("desensitizationConfirmed") public @Nullable Boolean getDesensitizationConfirmed() { return desensitizationConfirmed; } @JsonProperty("desensitizationConfirmed") public void setDesensitizationConfirmed(@Nullable Boolean desensitizationConfirmed) { this.desensitizationConfirmed = desensitizationConfirmed; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CreateKBExportTaskRequest createKBExportTaskRequest = (CreateKBExportTaskRequest) o; return Objects.equals(this.commandId, createKBExportTaskRequest.commandId) && Objects.equals(this.kbExportCheckId, createKBExportTaskRequest.kbExportCheckId) && Objects.equals(this.format, createKBExportTaskRequest.format) && Objects.equals(this.scope, createKBExportTaskRequest.scope) && Objects.equals(this.desensitizationConfirmed, createKBExportTaskRequest.desensitizationConfirmed); } @Override public int hashCode() { return Objects.hash(commandId, kbExportCheckId, format, scope, desensitizationConfirmed); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateKBExportTaskRequest {\n"); sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n"); sb.append(" kbExportCheckId: ").append(toIndentedString(kbExportCheckId)).append("\n"); sb.append(" format: ").append(toIndentedString(format)).append("\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" desensitizationConfirmed: ").append(toIndentedString(desensitizationConfirmed)).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 "); } }