Content 50 + AI 39 + Knowledge 59 + Market 32 + Account 33 + Meta 16 = 229 修复 Knowledge YAML 重复 key 重新生成 TypeScript 类型包(7 文件)+ Java DTO 骨架(626 类)
361 lines
9.9 KiB
Java
361 lines
9.9 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 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;
|
||
|
||
/**
|
||
* 导出任务详情
|
||
*/
|
||
|
||
@Schema(name = "AccountExportTaskDetail", description = "导出任务详情")
|
||
@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 AccountExportTaskDetail implements Serializable {
|
||
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
private String taskId;
|
||
|
||
/**
|
||
* 导出类型
|
||
*/
|
||
public enum ExportTypeEnum {
|
||
PROFILE("profile"),
|
||
|
||
USAGE("usage"),
|
||
|
||
SECURITY_EVENTS("security_events"),
|
||
|
||
PURCHASES("purchases"),
|
||
|
||
LICENSES("licenses");
|
||
|
||
private final String value;
|
||
|
||
ExportTypeEnum(String value) {
|
||
this.value = value;
|
||
}
|
||
|
||
@JsonValue
|
||
public String getValue() {
|
||
return value;
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
return String.valueOf(value);
|
||
}
|
||
|
||
@JsonCreator
|
||
public static ExportTypeEnum fromValue(String value) {
|
||
for (ExportTypeEnum b : ExportTypeEnum.values()) {
|
||
if (b.value.equals(value)) {
|
||
return b;
|
||
}
|
||
}
|
||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||
}
|
||
}
|
||
|
||
private ExportTypeEnum exportType;
|
||
|
||
/**
|
||
* 任务状态
|
||
*/
|
||
public enum StatusEnum {
|
||
QUEUED("queued"),
|
||
|
||
PROCESSING("processing"),
|
||
|
||
COMPLETED("completed"),
|
||
|
||
FAILED("failed");
|
||
|
||
private final String value;
|
||
|
||
StatusEnum(String value) {
|
||
this.value = value;
|
||
}
|
||
|
||
@JsonValue
|
||
public String getValue() {
|
||
return value;
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
return String.valueOf(value);
|
||
}
|
||
|
||
@JsonCreator
|
||
public static StatusEnum fromValue(String value) {
|
||
for (StatusEnum b : StatusEnum.values()) {
|
||
if (b.value.equals(value)) {
|
||
return b;
|
||
}
|
||
}
|
||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||
}
|
||
}
|
||
|
||
private StatusEnum status;
|
||
|
||
private @Nullable String downloadCredentialId;
|
||
|
||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
||
private @Nullable OffsetDateTime downloadExpiresAt;
|
||
|
||
private @Nullable String failedReason;
|
||
|
||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
||
private OffsetDateTime createdAt;
|
||
|
||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
||
private @Nullable OffsetDateTime completedAt;
|
||
|
||
public AccountExportTaskDetail() {
|
||
super();
|
||
}
|
||
|
||
/**
|
||
* Constructor with only required parameters
|
||
*/
|
||
public AccountExportTaskDetail(String taskId, ExportTypeEnum exportType, StatusEnum status, OffsetDateTime createdAt) {
|
||
this.taskId = taskId;
|
||
this.exportType = exportType;
|
||
this.status = status;
|
||
this.createdAt = createdAt;
|
||
}
|
||
|
||
public AccountExportTaskDetail taskId(String taskId) {
|
||
this.taskId = taskId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 导出任务 ID
|
||
* @return taskId
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "taskId", description = "导出任务 ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("taskId")
|
||
public String getTaskId() {
|
||
return taskId;
|
||
}
|
||
|
||
@JsonProperty("taskId")
|
||
public void setTaskId(String taskId) {
|
||
this.taskId = taskId;
|
||
}
|
||
|
||
public AccountExportTaskDetail exportType(ExportTypeEnum exportType) {
|
||
this.exportType = exportType;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 导出类型
|
||
* @return exportType
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "exportType", description = "导出类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("exportType")
|
||
public ExportTypeEnum getExportType() {
|
||
return exportType;
|
||
}
|
||
|
||
@JsonProperty("exportType")
|
||
public void setExportType(ExportTypeEnum exportType) {
|
||
this.exportType = exportType;
|
||
}
|
||
|
||
public AccountExportTaskDetail status(StatusEnum status) {
|
||
this.status = status;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 任务状态
|
||
* @return status
|
||
*/
|
||
@NotNull
|
||
@Schema(name = "status", description = "任务状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("status")
|
||
public StatusEnum getStatus() {
|
||
return status;
|
||
}
|
||
|
||
@JsonProperty("status")
|
||
public void setStatus(StatusEnum status) {
|
||
this.status = status;
|
||
}
|
||
|
||
public AccountExportTaskDetail downloadCredentialId(@Nullable String downloadCredentialId) {
|
||
this.downloadCredentialId = downloadCredentialId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 下载凭证 ID(完成时返回)
|
||
* @return downloadCredentialId
|
||
*/
|
||
|
||
@Schema(name = "downloadCredentialId", description = "下载凭证 ID(完成时返回)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("downloadCredentialId")
|
||
public @Nullable String getDownloadCredentialId() {
|
||
return downloadCredentialId;
|
||
}
|
||
|
||
@JsonProperty("downloadCredentialId")
|
||
public void setDownloadCredentialId(@Nullable String downloadCredentialId) {
|
||
this.downloadCredentialId = downloadCredentialId;
|
||
}
|
||
|
||
public AccountExportTaskDetail downloadExpiresAt(@Nullable OffsetDateTime downloadExpiresAt) {
|
||
this.downloadExpiresAt = downloadExpiresAt;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 下载凭证过期时间
|
||
* @return downloadExpiresAt
|
||
*/
|
||
@Valid
|
||
@Schema(name = "downloadExpiresAt", description = "下载凭证过期时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("downloadExpiresAt")
|
||
public @Nullable OffsetDateTime getDownloadExpiresAt() {
|
||
return downloadExpiresAt;
|
||
}
|
||
|
||
@JsonProperty("downloadExpiresAt")
|
||
public void setDownloadExpiresAt(@Nullable OffsetDateTime downloadExpiresAt) {
|
||
this.downloadExpiresAt = downloadExpiresAt;
|
||
}
|
||
|
||
public AccountExportTaskDetail failedReason(@Nullable String failedReason) {
|
||
this.failedReason = failedReason;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 失败原因(仅失败时返回)
|
||
* @return failedReason
|
||
*/
|
||
|
||
@Schema(name = "failedReason", description = "失败原因(仅失败时返回)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("failedReason")
|
||
public @Nullable String getFailedReason() {
|
||
return failedReason;
|
||
}
|
||
|
||
@JsonProperty("failedReason")
|
||
public void setFailedReason(@Nullable String failedReason) {
|
||
this.failedReason = failedReason;
|
||
}
|
||
|
||
public AccountExportTaskDetail createdAt(OffsetDateTime createdAt) {
|
||
this.createdAt = createdAt;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 创建时间
|
||
* @return createdAt
|
||
*/
|
||
@NotNull @Valid
|
||
@Schema(name = "createdAt", description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("createdAt")
|
||
public OffsetDateTime getCreatedAt() {
|
||
return createdAt;
|
||
}
|
||
|
||
@JsonProperty("createdAt")
|
||
public void setCreatedAt(OffsetDateTime createdAt) {
|
||
this.createdAt = createdAt;
|
||
}
|
||
|
||
public AccountExportTaskDetail completedAt(@Nullable OffsetDateTime completedAt) {
|
||
this.completedAt = completedAt;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 完成时间
|
||
* @return completedAt
|
||
*/
|
||
@Valid
|
||
@Schema(name = "completedAt", description = "完成时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("completedAt")
|
||
public @Nullable OffsetDateTime getCompletedAt() {
|
||
return completedAt;
|
||
}
|
||
|
||
@JsonProperty("completedAt")
|
||
public void setCompletedAt(@Nullable OffsetDateTime completedAt) {
|
||
this.completedAt = completedAt;
|
||
}
|
||
|
||
@Override
|
||
public boolean equals(Object o) {
|
||
if (this == o) {
|
||
return true;
|
||
}
|
||
if (o == null || getClass() != o.getClass()) {
|
||
return false;
|
||
}
|
||
AccountExportTaskDetail accountExportTaskDetail = (AccountExportTaskDetail) o;
|
||
return Objects.equals(this.taskId, accountExportTaskDetail.taskId) &&
|
||
Objects.equals(this.exportType, accountExportTaskDetail.exportType) &&
|
||
Objects.equals(this.status, accountExportTaskDetail.status) &&
|
||
Objects.equals(this.downloadCredentialId, accountExportTaskDetail.downloadCredentialId) &&
|
||
Objects.equals(this.downloadExpiresAt, accountExportTaskDetail.downloadExpiresAt) &&
|
||
Objects.equals(this.failedReason, accountExportTaskDetail.failedReason) &&
|
||
Objects.equals(this.createdAt, accountExportTaskDetail.createdAt) &&
|
||
Objects.equals(this.completedAt, accountExportTaskDetail.completedAt);
|
||
}
|
||
|
||
@Override
|
||
public int hashCode() {
|
||
return Objects.hash(taskId, exportType, status, downloadCredentialId, downloadExpiresAt, failedReason, createdAt, completedAt);
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
StringBuilder sb = new StringBuilder();
|
||
sb.append("class AccountExportTaskDetail {\n");
|
||
sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n");
|
||
sb.append(" exportType: ").append(toIndentedString(exportType)).append("\n");
|
||
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
||
sb.append(" downloadCredentialId: ").append(toIndentedString(downloadCredentialId)).append("\n");
|
||
sb.append(" downloadExpiresAt: ").append(toIndentedString(downloadExpiresAt)).append("\n");
|
||
sb.append(" failedReason: ").append(toIndentedString(failedReason)).append("\n");
|
||
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
|
||
sb.append(" completedAt: ").append(toIndentedString(completedAt)).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 ");
|
||
}
|
||
}
|
||
|