Content 50 + AI 39 + Knowledge 59 + Market 32 + Account 33 + Meta 16 = 229 修复 Knowledge YAML 重复 key 重新生成 TypeScript 类型包(7 文件)+ Java DTO 骨架(626 类)
342 lines
8.7 KiB
Java
342 lines
8.7 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.JsonValue;
|
|
import java.time.OffsetDateTime;
|
|
import java.util.UUID;
|
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
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;
|
|
|
|
/**
|
|
* SourceEventSummary
|
|
*/
|
|
|
|
@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 SourceEventSummary implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private UUID eventId;
|
|
|
|
private String sourceType;
|
|
|
|
private UUID sourceId;
|
|
|
|
/**
|
|
* Gets or Sets sourceStatus
|
|
*/
|
|
public enum SourceStatusEnum {
|
|
ACTIVE("active"),
|
|
|
|
STALE("stale"),
|
|
|
|
REVOKED("revoked"),
|
|
|
|
RECALLED("recalled"),
|
|
|
|
DELISTED("delisted"),
|
|
|
|
BLOCKED("blocked"),
|
|
|
|
OWNER_MISSING("owner_missing"),
|
|
|
|
UNAUTHORIZED("unauthorized");
|
|
|
|
private final String value;
|
|
|
|
SourceStatusEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static SourceStatusEnum fromValue(String value) {
|
|
for (SourceStatusEnum b : SourceStatusEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private SourceStatusEnum sourceStatus;
|
|
|
|
/**
|
|
* 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 ActionPolicyEnum actionPolicy;
|
|
|
|
private @Nullable String affectedScope;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private OffsetDateTime createdAt;
|
|
|
|
public SourceEventSummary() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public SourceEventSummary(UUID eventId, String sourceType, UUID sourceId, SourceStatusEnum sourceStatus, ActionPolicyEnum actionPolicy, OffsetDateTime createdAt) {
|
|
this.eventId = eventId;
|
|
this.sourceType = sourceType;
|
|
this.sourceId = sourceId;
|
|
this.sourceStatus = sourceStatus;
|
|
this.actionPolicy = actionPolicy;
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
public SourceEventSummary eventId(UUID eventId) {
|
|
this.eventId = eventId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get eventId
|
|
* @return eventId
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "eventId", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("eventId")
|
|
public UUID getEventId() {
|
|
return eventId;
|
|
}
|
|
|
|
@JsonProperty("eventId")
|
|
public void setEventId(UUID eventId) {
|
|
this.eventId = eventId;
|
|
}
|
|
|
|
public SourceEventSummary sourceType(String sourceType) {
|
|
this.sourceType = sourceType;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 来源对象类型
|
|
* @return sourceType
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "sourceType", description = "来源对象类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("sourceType")
|
|
public String getSourceType() {
|
|
return sourceType;
|
|
}
|
|
|
|
@JsonProperty("sourceType")
|
|
public void setSourceType(String sourceType) {
|
|
this.sourceType = sourceType;
|
|
}
|
|
|
|
public SourceEventSummary sourceId(UUID sourceId) {
|
|
this.sourceId = sourceId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 来源对象 ID
|
|
* @return sourceId
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "sourceId", description = "来源对象 ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("sourceId")
|
|
public UUID getSourceId() {
|
|
return sourceId;
|
|
}
|
|
|
|
@JsonProperty("sourceId")
|
|
public void setSourceId(UUID sourceId) {
|
|
this.sourceId = sourceId;
|
|
}
|
|
|
|
public SourceEventSummary sourceStatus(SourceStatusEnum sourceStatus) {
|
|
this.sourceStatus = sourceStatus;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get sourceStatus
|
|
* @return sourceStatus
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "sourceStatus", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("sourceStatus")
|
|
public SourceStatusEnum getSourceStatus() {
|
|
return sourceStatus;
|
|
}
|
|
|
|
@JsonProperty("sourceStatus")
|
|
public void setSourceStatus(SourceStatusEnum sourceStatus) {
|
|
this.sourceStatus = sourceStatus;
|
|
}
|
|
|
|
public SourceEventSummary actionPolicy(ActionPolicyEnum actionPolicy) {
|
|
this.actionPolicy = actionPolicy;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get actionPolicy
|
|
* @return actionPolicy
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "actionPolicy", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("actionPolicy")
|
|
public ActionPolicyEnum getActionPolicy() {
|
|
return actionPolicy;
|
|
}
|
|
|
|
@JsonProperty("actionPolicy")
|
|
public void setActionPolicy(ActionPolicyEnum actionPolicy) {
|
|
this.actionPolicy = actionPolicy;
|
|
}
|
|
|
|
public SourceEventSummary affectedScope(@Nullable String affectedScope) {
|
|
this.affectedScope = affectedScope;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 影响范围描述
|
|
* @return affectedScope
|
|
*/
|
|
|
|
@Schema(name = "affectedScope", description = "影响范围描述", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("affectedScope")
|
|
public @Nullable String getAffectedScope() {
|
|
return affectedScope;
|
|
}
|
|
|
|
@JsonProperty("affectedScope")
|
|
public void setAffectedScope(@Nullable String affectedScope) {
|
|
this.affectedScope = affectedScope;
|
|
}
|
|
|
|
public SourceEventSummary createdAt(OffsetDateTime createdAt) {
|
|
this.createdAt = createdAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get createdAt
|
|
* @return createdAt
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "createdAt", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("createdAt")
|
|
public OffsetDateTime getCreatedAt() {
|
|
return createdAt;
|
|
}
|
|
|
|
@JsonProperty("createdAt")
|
|
public void setCreatedAt(OffsetDateTime createdAt) {
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
SourceEventSummary sourceEventSummary = (SourceEventSummary) o;
|
|
return Objects.equals(this.eventId, sourceEventSummary.eventId) &&
|
|
Objects.equals(this.sourceType, sourceEventSummary.sourceType) &&
|
|
Objects.equals(this.sourceId, sourceEventSummary.sourceId) &&
|
|
Objects.equals(this.sourceStatus, sourceEventSummary.sourceStatus) &&
|
|
Objects.equals(this.actionPolicy, sourceEventSummary.actionPolicy) &&
|
|
Objects.equals(this.affectedScope, sourceEventSummary.affectedScope) &&
|
|
Objects.equals(this.createdAt, sourceEventSummary.createdAt);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(eventId, sourceType, sourceId, sourceStatus, actionPolicy, affectedScope, createdAt);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class SourceEventSummary {\n");
|
|
sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n");
|
|
sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n");
|
|
sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n");
|
|
sb.append(" sourceStatus: ").append(toIndentedString(sourceStatus)).append("\n");
|
|
sb.append(" actionPolicy: ").append(toIndentedString(actionPolicy)).append("\n");
|
|
sb.append(" affectedScope: ").append(toIndentedString(affectedScope)).append("\n");
|
|
sb.append(" createdAt: ").append(toIndentedString(createdAt)).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 ");
|
|
}
|
|
}
|
|
|