280 lines
8.0 KiB
Java
280 lines
8.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 com.fasterxml.jackson.annotation.JsonValue;
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
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;
|
|
|
|
/**
|
|
* CreateKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy
|
|
*/
|
|
|
|
@JsonTypeName("createKnowledgeBindingPrecheck_200_response_allOf_data_actionPolicy")
|
|
@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 CreateKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* Gets or Sets searchPolicy
|
|
*/
|
|
public enum SearchPolicyEnum {
|
|
ALLOWED("allowed"),
|
|
|
|
BLOCKED("blocked");
|
|
|
|
private final String value;
|
|
|
|
SearchPolicyEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static SearchPolicyEnum fromValue(String value) {
|
|
for (SearchPolicyEnum b : SearchPolicyEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private @Nullable SearchPolicyEnum searchPolicy;
|
|
|
|
/**
|
|
* Gets or Sets generationPolicy
|
|
*/
|
|
public enum GenerationPolicyEnum {
|
|
ALLOWED("allowed"),
|
|
|
|
BLOCKED("blocked");
|
|
|
|
private final String value;
|
|
|
|
GenerationPolicyEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static GenerationPolicyEnum fromValue(String value) {
|
|
for (GenerationPolicyEnum b : GenerationPolicyEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private @Nullable GenerationPolicyEnum generationPolicy;
|
|
|
|
/**
|
|
* Gets or Sets exportPolicy
|
|
*/
|
|
public enum ExportPolicyEnum {
|
|
ALLOWED("allowed"),
|
|
|
|
BLOCKED("blocked");
|
|
|
|
private final String value;
|
|
|
|
ExportPolicyEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static ExportPolicyEnum fromValue(String value) {
|
|
for (ExportPolicyEnum b : ExportPolicyEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private @Nullable ExportPolicyEnum exportPolicy;
|
|
|
|
@Valid
|
|
private List<String> recheckReasons = new ArrayList<>();
|
|
|
|
public CreateKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy searchPolicy(@Nullable SearchPolicyEnum searchPolicy) {
|
|
this.searchPolicy = searchPolicy;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get searchPolicy
|
|
* @return searchPolicy
|
|
*/
|
|
|
|
@Schema(name = "searchPolicy", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("searchPolicy")
|
|
public @Nullable SearchPolicyEnum getSearchPolicy() {
|
|
return searchPolicy;
|
|
}
|
|
|
|
@JsonProperty("searchPolicy")
|
|
public void setSearchPolicy(@Nullable SearchPolicyEnum searchPolicy) {
|
|
this.searchPolicy = searchPolicy;
|
|
}
|
|
|
|
public CreateKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy generationPolicy(@Nullable GenerationPolicyEnum generationPolicy) {
|
|
this.generationPolicy = generationPolicy;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get generationPolicy
|
|
* @return generationPolicy
|
|
*/
|
|
|
|
@Schema(name = "generationPolicy", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("generationPolicy")
|
|
public @Nullable GenerationPolicyEnum getGenerationPolicy() {
|
|
return generationPolicy;
|
|
}
|
|
|
|
@JsonProperty("generationPolicy")
|
|
public void setGenerationPolicy(@Nullable GenerationPolicyEnum generationPolicy) {
|
|
this.generationPolicy = generationPolicy;
|
|
}
|
|
|
|
public CreateKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy exportPolicy(@Nullable ExportPolicyEnum exportPolicy) {
|
|
this.exportPolicy = exportPolicy;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get exportPolicy
|
|
* @return exportPolicy
|
|
*/
|
|
|
|
@Schema(name = "exportPolicy", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("exportPolicy")
|
|
public @Nullable ExportPolicyEnum getExportPolicy() {
|
|
return exportPolicy;
|
|
}
|
|
|
|
@JsonProperty("exportPolicy")
|
|
public void setExportPolicy(@Nullable ExportPolicyEnum exportPolicy) {
|
|
this.exportPolicy = exportPolicy;
|
|
}
|
|
|
|
public CreateKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy recheckReasons(List<String> recheckReasons) {
|
|
this.recheckReasons = recheckReasons;
|
|
return this;
|
|
}
|
|
|
|
public CreateKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy addRecheckReasonsItem(String recheckReasonsItem) {
|
|
if (this.recheckReasons == null) {
|
|
this.recheckReasons = new ArrayList<>();
|
|
}
|
|
this.recheckReasons.add(recheckReasonsItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 需要重验的原因列表,不把 needs_recheck 写入 SourceStatus
|
|
* @return recheckReasons
|
|
*/
|
|
|
|
@Schema(name = "recheckReasons", description = "需要重验的原因列表,不把 needs_recheck 写入 SourceStatus", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("recheckReasons")
|
|
public List<String> getRecheckReasons() {
|
|
return recheckReasons;
|
|
}
|
|
|
|
@JsonProperty("recheckReasons")
|
|
public void setRecheckReasons(List<String> recheckReasons) {
|
|
this.recheckReasons = recheckReasons;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
CreateKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy createKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy = (CreateKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy) o;
|
|
return Objects.equals(this.searchPolicy, createKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy.searchPolicy) &&
|
|
Objects.equals(this.generationPolicy, createKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy.generationPolicy) &&
|
|
Objects.equals(this.exportPolicy, createKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy.exportPolicy) &&
|
|
Objects.equals(this.recheckReasons, createKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy.recheckReasons);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(searchPolicy, generationPolicy, exportPolicy, recheckReasons);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class CreateKnowledgeBindingPrecheck200ResponseAllOfDataActionPolicy {\n");
|
|
sb.append(" searchPolicy: ").append(toIndentedString(searchPolicy)).append("\n");
|
|
sb.append(" generationPolicy: ").append(toIndentedString(generationPolicy)).append("\n");
|
|
sb.append(" exportPolicy: ").append(toIndentedString(exportPolicy)).append("\n");
|
|
sb.append(" recheckReasons: ").append(toIndentedString(recheckReasons)).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 ");
|
|
}
|
|
}
|
|
|