165 lines
4.3 KiB
Java
165 lines
4.3 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;
|
||
|
||
/**
|
||
* PreviewGlobalKBImpactRequest
|
||
*/
|
||
|
||
@JsonTypeName("previewGlobalKBImpact_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 PreviewGlobalKBImpactRequest implements Serializable {
|
||
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
/**
|
||
* 预览的操作类型
|
||
*/
|
||
public enum ActionTypeEnum {
|
||
ENABLE("enable"),
|
||
|
||
DISABLE("disable"),
|
||
|
||
VERSION_ACTIVATE("version_activate"),
|
||
|
||
POLICY_PUBLISH("policy_publish"),
|
||
|
||
DOCUMENT_DELETE("document_delete");
|
||
|
||
private final String value;
|
||
|
||
ActionTypeEnum(String value) {
|
||
this.value = value;
|
||
}
|
||
|
||
@JsonValue
|
||
public String getValue() {
|
||
return value;
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
return String.valueOf(value);
|
||
}
|
||
|
||
@JsonCreator
|
||
public static ActionTypeEnum fromValue(String value) {
|
||
for (ActionTypeEnum b : ActionTypeEnum.values()) {
|
||
if (b.value.equals(value)) {
|
||
return b;
|
||
}
|
||
}
|
||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||
}
|
||
}
|
||
|
||
private ActionTypeEnum actionType;
|
||
|
||
private @Nullable Integer targetVersion;
|
||
|
||
public PreviewGlobalKBImpactRequest() {
|
||
super();
|
||
}
|
||
|
||
/**
|
||
* Constructor with only required parameters
|
||
*/
|
||
public PreviewGlobalKBImpactRequest(ActionTypeEnum actionType) {
|
||
this.actionType = actionType;
|
||
}
|
||
|
||
public PreviewGlobalKBImpactRequest actionType(ActionTypeEnum actionType) {
|
||
this.actionType = actionType;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 预览的操作类型
|
||
* @return actionType
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "actionType", description = "预览的操作类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("actionType")
|
||
public ActionTypeEnum getActionType() {
|
||
return actionType;
|
||
}
|
||
|
||
@JsonProperty("actionType")
|
||
public void setActionType(ActionTypeEnum actionType) {
|
||
this.actionType = actionType;
|
||
}
|
||
|
||
public PreviewGlobalKBImpactRequest targetVersion(@Nullable Integer targetVersion) {
|
||
this.targetVersion = targetVersion;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 目标版本(version_activate 时必填)
|
||
* @return targetVersion
|
||
*/
|
||
|
||
@Schema(name = "targetVersion", description = "目标版本(version_activate 时必填)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("targetVersion")
|
||
public @Nullable Integer getTargetVersion() {
|
||
return targetVersion;
|
||
}
|
||
|
||
@JsonProperty("targetVersion")
|
||
public void setTargetVersion(@Nullable Integer targetVersion) {
|
||
this.targetVersion = targetVersion;
|
||
}
|
||
|
||
@Override
|
||
public boolean equals(Object o) {
|
||
if (this == o) {
|
||
return true;
|
||
}
|
||
if (o == null || getClass() != o.getClass()) {
|
||
return false;
|
||
}
|
||
PreviewGlobalKBImpactRequest previewGlobalKBImpactRequest = (PreviewGlobalKBImpactRequest) o;
|
||
return Objects.equals(this.actionType, previewGlobalKBImpactRequest.actionType) &&
|
||
Objects.equals(this.targetVersion, previewGlobalKBImpactRequest.targetVersion);
|
||
}
|
||
|
||
@Override
|
||
public int hashCode() {
|
||
return Objects.hash(actionType, targetVersion);
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
StringBuilder sb = new StringBuilder();
|
||
sb.append("class PreviewGlobalKBImpactRequest {\n");
|
||
sb.append(" actionType: ").append(toIndentedString(actionType)).append("\n");
|
||
sb.append(" targetVersion: ").append(toIndentedString(targetVersion)).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 ");
|
||
}
|
||
}
|
||
|