Content 50 + AI 39 + Knowledge 59 + Market 32 + Account 33 + Meta 16 = 229 修复 Knowledge YAML 重复 key 重新生成 TypeScript 类型包(7 文件)+ Java DTO 骨架(626 类)
460 lines
14 KiB
Java
460 lines
14 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 com.muse.dto.SourceEventDetailReasonAttributionsInner;
|
||
import com.muse.dto.SourceStatusResultSourceEventsInner;
|
||
import java.util.ArrayList;
|
||
import java.util.Arrays;
|
||
import java.util.List;
|
||
import java.util.UUID;
|
||
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;
|
||
|
||
/**
|
||
* SourceStatusResult
|
||
*/
|
||
|
||
@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 SourceStatusResult implements Serializable {
|
||
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
/**
|
||
* 来源状态
|
||
*/
|
||
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;
|
||
|
||
/**
|
||
* 动作策略
|
||
*/
|
||
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;
|
||
|
||
@Valid
|
||
private List<String> blockedReasons = new ArrayList<>();
|
||
|
||
@Valid
|
||
private List<String> needsRecheckReasons = new ArrayList<>();
|
||
|
||
@Valid
|
||
private List<@Valid SourceEventDetailReasonAttributionsInner> reasonAttributions = new ArrayList<>();
|
||
|
||
@Valid
|
||
private List<@Valid SourceStatusResultSourceEventsInner> sourceEvents = new ArrayList<>();
|
||
|
||
@Valid
|
||
private List<String> nextActions = new ArrayList<>();
|
||
|
||
private @Nullable Integer currentSourceVersion;
|
||
|
||
private @Nullable String currentAuthorizationSnapshotId;
|
||
|
||
private @Nullable UUID jobId;
|
||
|
||
public SourceStatusResult() {
|
||
super();
|
||
}
|
||
|
||
/**
|
||
* Constructor with only required parameters
|
||
*/
|
||
public SourceStatusResult(SourceStatusEnum sourceStatus, ActionPolicyEnum actionPolicy) {
|
||
this.sourceStatus = sourceStatus;
|
||
this.actionPolicy = actionPolicy;
|
||
}
|
||
|
||
public SourceStatusResult sourceStatus(SourceStatusEnum sourceStatus) {
|
||
this.sourceStatus = sourceStatus;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 来源状态
|
||
* @return sourceStatus
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "sourceStatus", description = "来源状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("sourceStatus")
|
||
public SourceStatusEnum getSourceStatus() {
|
||
return sourceStatus;
|
||
}
|
||
|
||
@JsonProperty("sourceStatus")
|
||
public void setSourceStatus(SourceStatusEnum sourceStatus) {
|
||
this.sourceStatus = sourceStatus;
|
||
}
|
||
|
||
public SourceStatusResult actionPolicy(ActionPolicyEnum actionPolicy) {
|
||
this.actionPolicy = actionPolicy;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 动作策略
|
||
* @return actionPolicy
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "actionPolicy", description = "动作策略", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("actionPolicy")
|
||
public ActionPolicyEnum getActionPolicy() {
|
||
return actionPolicy;
|
||
}
|
||
|
||
@JsonProperty("actionPolicy")
|
||
public void setActionPolicy(ActionPolicyEnum actionPolicy) {
|
||
this.actionPolicy = actionPolicy;
|
||
}
|
||
|
||
public SourceStatusResult blockedReasons(List<String> blockedReasons) {
|
||
this.blockedReasons = blockedReasons;
|
||
return this;
|
||
}
|
||
|
||
public SourceStatusResult addBlockedReasonsItem(String blockedReasonsItem) {
|
||
if (this.blockedReasons == null) {
|
||
this.blockedReasons = new ArrayList<>();
|
||
}
|
||
this.blockedReasons.add(blockedReasonsItem);
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 阻断原因列表
|
||
* @return blockedReasons
|
||
*/
|
||
|
||
@Schema(name = "blockedReasons", description = "阻断原因列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("blockedReasons")
|
||
public List<String> getBlockedReasons() {
|
||
return blockedReasons;
|
||
}
|
||
|
||
@JsonProperty("blockedReasons")
|
||
public void setBlockedReasons(List<String> blockedReasons) {
|
||
this.blockedReasons = blockedReasons;
|
||
}
|
||
|
||
public SourceStatusResult needsRecheckReasons(List<String> needsRecheckReasons) {
|
||
this.needsRecheckReasons = needsRecheckReasons;
|
||
return this;
|
||
}
|
||
|
||
public SourceStatusResult addNeedsRecheckReasonsItem(String needsRecheckReasonsItem) {
|
||
if (this.needsRecheckReasons == null) {
|
||
this.needsRecheckReasons = new ArrayList<>();
|
||
}
|
||
this.needsRecheckReasons.add(needsRecheckReasonsItem);
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 需重验原因(ActionPolicy 层面的补充信息,说明为何 actionPolicy=needs_recheck)
|
||
* @return needsRecheckReasons
|
||
*/
|
||
|
||
@Schema(name = "needsRecheckReasons", description = "需重验原因(ActionPolicy 层面的补充信息,说明为何 actionPolicy=needs_recheck)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("needsRecheckReasons")
|
||
public List<String> getNeedsRecheckReasons() {
|
||
return needsRecheckReasons;
|
||
}
|
||
|
||
@JsonProperty("needsRecheckReasons")
|
||
public void setNeedsRecheckReasons(List<String> needsRecheckReasons) {
|
||
this.needsRecheckReasons = needsRecheckReasons;
|
||
}
|
||
|
||
public SourceStatusResult reasonAttributions(List<@Valid SourceEventDetailReasonAttributionsInner> reasonAttributions) {
|
||
this.reasonAttributions = reasonAttributions;
|
||
return this;
|
||
}
|
||
|
||
public SourceStatusResult addReasonAttributionsItem(SourceEventDetailReasonAttributionsInner reasonAttributionsItem) {
|
||
if (this.reasonAttributions == null) {
|
||
this.reasonAttributions = new ArrayList<>();
|
||
}
|
||
this.reasonAttributions.add(reasonAttributionsItem);
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 原因归因列表
|
||
* @return reasonAttributions
|
||
*/
|
||
@Valid
|
||
@Schema(name = "reasonAttributions", description = "原因归因列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("reasonAttributions")
|
||
public List<@Valid SourceEventDetailReasonAttributionsInner> getReasonAttributions() {
|
||
return reasonAttributions;
|
||
}
|
||
|
||
@JsonProperty("reasonAttributions")
|
||
public void setReasonAttributions(List<@Valid SourceEventDetailReasonAttributionsInner> reasonAttributions) {
|
||
this.reasonAttributions = reasonAttributions;
|
||
}
|
||
|
||
public SourceStatusResult sourceEvents(List<@Valid SourceStatusResultSourceEventsInner> sourceEvents) {
|
||
this.sourceEvents = sourceEvents;
|
||
return this;
|
||
}
|
||
|
||
public SourceStatusResult addSourceEventsItem(SourceStatusResultSourceEventsInner sourceEventsItem) {
|
||
if (this.sourceEvents == null) {
|
||
this.sourceEvents = new ArrayList<>();
|
||
}
|
||
this.sourceEvents.add(sourceEventsItem);
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 关联的来源事件
|
||
* @return sourceEvents
|
||
*/
|
||
@Valid
|
||
@Schema(name = "sourceEvents", description = "关联的来源事件", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("sourceEvents")
|
||
public List<@Valid SourceStatusResultSourceEventsInner> getSourceEvents() {
|
||
return sourceEvents;
|
||
}
|
||
|
||
@JsonProperty("sourceEvents")
|
||
public void setSourceEvents(List<@Valid SourceStatusResultSourceEventsInner> sourceEvents) {
|
||
this.sourceEvents = sourceEvents;
|
||
}
|
||
|
||
public SourceStatusResult nextActions(List<String> nextActions) {
|
||
this.nextActions = nextActions;
|
||
return this;
|
||
}
|
||
|
||
public SourceStatusResult addNextActionsItem(String nextActionsItem) {
|
||
if (this.nextActions == null) {
|
||
this.nextActions = new ArrayList<>();
|
||
}
|
||
this.nextActions.add(nextActionsItem);
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 建议的下一步操作
|
||
* @return nextActions
|
||
*/
|
||
|
||
@Schema(name = "nextActions", description = "建议的下一步操作", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("nextActions")
|
||
public List<String> getNextActions() {
|
||
return nextActions;
|
||
}
|
||
|
||
@JsonProperty("nextActions")
|
||
public void setNextActions(List<String> nextActions) {
|
||
this.nextActions = nextActions;
|
||
}
|
||
|
||
public SourceStatusResult currentSourceVersion(@Nullable Integer currentSourceVersion) {
|
||
this.currentSourceVersion = currentSourceVersion;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 当前来源版本
|
||
* @return currentSourceVersion
|
||
*/
|
||
|
||
@Schema(name = "currentSourceVersion", description = "当前来源版本", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("currentSourceVersion")
|
||
public @Nullable Integer getCurrentSourceVersion() {
|
||
return currentSourceVersion;
|
||
}
|
||
|
||
@JsonProperty("currentSourceVersion")
|
||
public void setCurrentSourceVersion(@Nullable Integer currentSourceVersion) {
|
||
this.currentSourceVersion = currentSourceVersion;
|
||
}
|
||
|
||
public SourceStatusResult currentAuthorizationSnapshotId(@Nullable String currentAuthorizationSnapshotId) {
|
||
this.currentAuthorizationSnapshotId = currentAuthorizationSnapshotId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 当前授权快照 ID
|
||
* @return currentAuthorizationSnapshotId
|
||
*/
|
||
|
||
@Schema(name = "currentAuthorizationSnapshotId", description = "当前授权快照 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("currentAuthorizationSnapshotId")
|
||
public @Nullable String getCurrentAuthorizationSnapshotId() {
|
||
return currentAuthorizationSnapshotId;
|
||
}
|
||
|
||
@JsonProperty("currentAuthorizationSnapshotId")
|
||
public void setCurrentAuthorizationSnapshotId(@Nullable String currentAuthorizationSnapshotId) {
|
||
this.currentAuthorizationSnapshotId = currentAuthorizationSnapshotId;
|
||
}
|
||
|
||
public SourceStatusResult jobId(@Nullable UUID jobId) {
|
||
this.jobId = jobId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 可选,关联的异步任务 ID
|
||
* @return jobId
|
||
*/
|
||
@Valid
|
||
@Schema(name = "jobId", description = "可选,关联的异步任务 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("jobId")
|
||
public @Nullable UUID getJobId() {
|
||
return jobId;
|
||
}
|
||
|
||
@JsonProperty("jobId")
|
||
public void setJobId(@Nullable UUID jobId) {
|
||
this.jobId = jobId;
|
||
}
|
||
|
||
@Override
|
||
public boolean equals(Object o) {
|
||
if (this == o) {
|
||
return true;
|
||
}
|
||
if (o == null || getClass() != o.getClass()) {
|
||
return false;
|
||
}
|
||
SourceStatusResult sourceStatusResult = (SourceStatusResult) o;
|
||
return Objects.equals(this.sourceStatus, sourceStatusResult.sourceStatus) &&
|
||
Objects.equals(this.actionPolicy, sourceStatusResult.actionPolicy) &&
|
||
Objects.equals(this.blockedReasons, sourceStatusResult.blockedReasons) &&
|
||
Objects.equals(this.needsRecheckReasons, sourceStatusResult.needsRecheckReasons) &&
|
||
Objects.equals(this.reasonAttributions, sourceStatusResult.reasonAttributions) &&
|
||
Objects.equals(this.sourceEvents, sourceStatusResult.sourceEvents) &&
|
||
Objects.equals(this.nextActions, sourceStatusResult.nextActions) &&
|
||
Objects.equals(this.currentSourceVersion, sourceStatusResult.currentSourceVersion) &&
|
||
Objects.equals(this.currentAuthorizationSnapshotId, sourceStatusResult.currentAuthorizationSnapshotId) &&
|
||
Objects.equals(this.jobId, sourceStatusResult.jobId);
|
||
}
|
||
|
||
@Override
|
||
public int hashCode() {
|
||
return Objects.hash(sourceStatus, actionPolicy, blockedReasons, needsRecheckReasons, reasonAttributions, sourceEvents, nextActions, currentSourceVersion, currentAuthorizationSnapshotId, jobId);
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
StringBuilder sb = new StringBuilder();
|
||
sb.append("class SourceStatusResult {\n");
|
||
sb.append(" sourceStatus: ").append(toIndentedString(sourceStatus)).append("\n");
|
||
sb.append(" actionPolicy: ").append(toIndentedString(actionPolicy)).append("\n");
|
||
sb.append(" blockedReasons: ").append(toIndentedString(blockedReasons)).append("\n");
|
||
sb.append(" needsRecheckReasons: ").append(toIndentedString(needsRecheckReasons)).append("\n");
|
||
sb.append(" reasonAttributions: ").append(toIndentedString(reasonAttributions)).append("\n");
|
||
sb.append(" sourceEvents: ").append(toIndentedString(sourceEvents)).append("\n");
|
||
sb.append(" nextActions: ").append(toIndentedString(nextActions)).append("\n");
|
||
sb.append(" currentSourceVersion: ").append(toIndentedString(currentSourceVersion)).append("\n");
|
||
sb.append(" currentAuthorizationSnapshotId: ").append(toIndentedString(currentAuthorizationSnapshotId)).append("\n");
|
||
sb.append(" jobId: ").append(toIndentedString(jobId)).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 ");
|
||
}
|
||
}
|
||
|