Content 50 + AI 39 + Knowledge 59 + Market 32 + Account 33 + Meta 16 = 229 修复 Knowledge YAML 重复 key 重新生成 TypeScript 类型包(7 文件)+ Java DTO 骨架(626 类)
283 lines
7.2 KiB
Java
283 lines
7.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;
|
|
|
|
/**
|
|
* TriggerGlobalKBSourceEventRequest
|
|
*/
|
|
|
|
@JsonTypeName("triggerGlobalKBSourceEvent_request")
|
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-05-24T15:05:54.603829+08:00[Asia/Shanghai]", comments = "Generator version: 7.22.0")
|
|
public class TriggerGlobalKBSourceEventRequest implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String commandId;
|
|
|
|
/**
|
|
* Gets or Sets eventType
|
|
*/
|
|
public enum EventTypeEnum {
|
|
STATUS_CHANGED("status_changed"),
|
|
|
|
VERSION_CHANGED("version_changed"),
|
|
|
|
POLICY_CHANGED("policy_changed"),
|
|
|
|
DOCUMENT_DELETED("document_deleted"),
|
|
|
|
KB_DISABLED("kb_disabled"),
|
|
|
|
KB_ENABLED("kb_enabled");
|
|
|
|
private final String value;
|
|
|
|
EventTypeEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static EventTypeEnum fromValue(String value) {
|
|
for (EventTypeEnum b : EventTypeEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private EventTypeEnum eventType;
|
|
|
|
private String reason;
|
|
|
|
private @Nullable Integer targetVersion;
|
|
|
|
/**
|
|
* Gets or Sets actionPolicy
|
|
*/
|
|
public enum ActionPolicyEnum {
|
|
ALLOWED("allowed"),
|
|
|
|
READ_ONLY("read_only"),
|
|
|
|
BLOCKED("blocked"),
|
|
|
|
NEEDS_RECHECK("needs_recheck");
|
|
|
|
private final String value;
|
|
|
|
ActionPolicyEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static ActionPolicyEnum fromValue(String value) {
|
|
for (ActionPolicyEnum b : ActionPolicyEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private @Nullable ActionPolicyEnum actionPolicy;
|
|
|
|
public TriggerGlobalKBSourceEventRequest() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public TriggerGlobalKBSourceEventRequest(String commandId, EventTypeEnum eventType, String reason) {
|
|
this.commandId = commandId;
|
|
this.eventType = eventType;
|
|
this.reason = reason;
|
|
}
|
|
|
|
public TriggerGlobalKBSourceEventRequest commandId(String commandId) {
|
|
this.commandId = commandId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get commandId
|
|
* @return commandId
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "commandId", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("commandId")
|
|
public String getCommandId() {
|
|
return commandId;
|
|
}
|
|
|
|
@JsonProperty("commandId")
|
|
public void setCommandId(String commandId) {
|
|
this.commandId = commandId;
|
|
}
|
|
|
|
public TriggerGlobalKBSourceEventRequest eventType(EventTypeEnum eventType) {
|
|
this.eventType = eventType;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get eventType
|
|
* @return eventType
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "eventType", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("eventType")
|
|
public EventTypeEnum getEventType() {
|
|
return eventType;
|
|
}
|
|
|
|
@JsonProperty("eventType")
|
|
public void setEventType(EventTypeEnum eventType) {
|
|
this.eventType = eventType;
|
|
}
|
|
|
|
public TriggerGlobalKBSourceEventRequest reason(String reason) {
|
|
this.reason = reason;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get reason
|
|
* @return reason
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "reason", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("reason")
|
|
public String getReason() {
|
|
return reason;
|
|
}
|
|
|
|
@JsonProperty("reason")
|
|
public void setReason(String reason) {
|
|
this.reason = reason;
|
|
}
|
|
|
|
public TriggerGlobalKBSourceEventRequest targetVersion(@Nullable Integer targetVersion) {
|
|
this.targetVersion = targetVersion;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get targetVersion
|
|
* @return targetVersion
|
|
*/
|
|
|
|
@Schema(name = "targetVersion", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("targetVersion")
|
|
public @Nullable Integer getTargetVersion() {
|
|
return targetVersion;
|
|
}
|
|
|
|
@JsonProperty("targetVersion")
|
|
public void setTargetVersion(@Nullable Integer targetVersion) {
|
|
this.targetVersion = targetVersion;
|
|
}
|
|
|
|
public TriggerGlobalKBSourceEventRequest actionPolicy(@Nullable ActionPolicyEnum actionPolicy) {
|
|
this.actionPolicy = actionPolicy;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get actionPolicy
|
|
* @return actionPolicy
|
|
*/
|
|
|
|
@Schema(name = "actionPolicy", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("actionPolicy")
|
|
public @Nullable ActionPolicyEnum getActionPolicy() {
|
|
return actionPolicy;
|
|
}
|
|
|
|
@JsonProperty("actionPolicy")
|
|
public void setActionPolicy(@Nullable ActionPolicyEnum actionPolicy) {
|
|
this.actionPolicy = actionPolicy;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
TriggerGlobalKBSourceEventRequest triggerGlobalKBSourceEventRequest = (TriggerGlobalKBSourceEventRequest) o;
|
|
return Objects.equals(this.commandId, triggerGlobalKBSourceEventRequest.commandId) &&
|
|
Objects.equals(this.eventType, triggerGlobalKBSourceEventRequest.eventType) &&
|
|
Objects.equals(this.reason, triggerGlobalKBSourceEventRequest.reason) &&
|
|
Objects.equals(this.targetVersion, triggerGlobalKBSourceEventRequest.targetVersion) &&
|
|
Objects.equals(this.actionPolicy, triggerGlobalKBSourceEventRequest.actionPolicy);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(commandId, eventType, reason, targetVersion, actionPolicy);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class TriggerGlobalKBSourceEventRequest {\n");
|
|
sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n");
|
|
sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n");
|
|
sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
|
|
sb.append(" targetVersion: ").append(toIndentedString(targetVersion)).append("\n");
|
|
sb.append(" actionPolicy: ").append(toIndentedString(actionPolicy)).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 ");
|
|
}
|
|
}
|
|
|