Content 50 + AI 39 + Knowledge 59 + Market 32 + Account 33 + Meta 16 = 229 修复 Knowledge YAML 重复 key 重新生成 TypeScript 类型包(7 文件)+ Java DTO 骨架(626 类)
343 lines
9.7 KiB
Java
343 lines
9.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.JsonTypeName;
|
|
import com.fasterxml.jackson.annotation.JsonValue;
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
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;
|
|
|
|
/**
|
|
* SourceAttributionSourcesInner
|
|
*/
|
|
|
|
@JsonTypeName("SourceAttribution_sources_inner")
|
|
@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 SourceAttributionSourcesInner implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* 来源类型
|
|
*/
|
|
public enum SourceTypeEnum {
|
|
USER_ORIGINAL("user_original"),
|
|
|
|
AI_SUGGESTION("ai_suggestion"),
|
|
|
|
KNOWLEDGE_REFERENCE("knowledge_reference"),
|
|
|
|
MARKET_ASSET("market_asset"),
|
|
|
|
IMPORTED_CONTENT("imported_content");
|
|
|
|
private final String value;
|
|
|
|
SourceTypeEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static SourceTypeEnum fromValue(String value) {
|
|
for (SourceTypeEnum b : SourceTypeEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private SourceTypeEnum sourceType;
|
|
|
|
private String sourceId;
|
|
|
|
private @Nullable String sourceName;
|
|
|
|
/**
|
|
* 贡献类型
|
|
*/
|
|
public enum ContributionTypeEnum {
|
|
FULL("full"),
|
|
|
|
PARTIAL("partial"),
|
|
|
|
REFERENCE("reference"),
|
|
|
|
CONTEXT("context");
|
|
|
|
private final String value;
|
|
|
|
ContributionTypeEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static ContributionTypeEnum fromValue(String value) {
|
|
for (ContributionTypeEnum b : ContributionTypeEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private ContributionTypeEnum contributionType;
|
|
|
|
private @Nullable String authorizationSnapshotId;
|
|
|
|
private @Nullable Integer sourceVersion;
|
|
|
|
@Valid
|
|
private List<String> licenseRestrictions = new ArrayList<>();
|
|
|
|
public SourceAttributionSourcesInner() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public SourceAttributionSourcesInner(SourceTypeEnum sourceType, String sourceId, ContributionTypeEnum contributionType) {
|
|
this.sourceType = sourceType;
|
|
this.sourceId = sourceId;
|
|
this.contributionType = contributionType;
|
|
}
|
|
|
|
public SourceAttributionSourcesInner sourceType(SourceTypeEnum sourceType) {
|
|
this.sourceType = sourceType;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 来源类型
|
|
* @return sourceType
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "sourceType", description = "来源类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("sourceType")
|
|
public SourceTypeEnum getSourceType() {
|
|
return sourceType;
|
|
}
|
|
|
|
@JsonProperty("sourceType")
|
|
public void setSourceType(SourceTypeEnum sourceType) {
|
|
this.sourceType = sourceType;
|
|
}
|
|
|
|
public SourceAttributionSourcesInner sourceId(String sourceId) {
|
|
this.sourceId = sourceId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 来源对象 ID
|
|
* @return sourceId
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "sourceId", description = "来源对象 ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("sourceId")
|
|
public String getSourceId() {
|
|
return sourceId;
|
|
}
|
|
|
|
@JsonProperty("sourceId")
|
|
public void setSourceId(String sourceId) {
|
|
this.sourceId = sourceId;
|
|
}
|
|
|
|
public SourceAttributionSourcesInner sourceName(@Nullable String sourceName) {
|
|
this.sourceName = sourceName;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 来源对象名称
|
|
* @return sourceName
|
|
*/
|
|
|
|
@Schema(name = "sourceName", description = "来源对象名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("sourceName")
|
|
public @Nullable String getSourceName() {
|
|
return sourceName;
|
|
}
|
|
|
|
@JsonProperty("sourceName")
|
|
public void setSourceName(@Nullable String sourceName) {
|
|
this.sourceName = sourceName;
|
|
}
|
|
|
|
public SourceAttributionSourcesInner contributionType(ContributionTypeEnum contributionType) {
|
|
this.contributionType = contributionType;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 贡献类型
|
|
* @return contributionType
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "contributionType", description = "贡献类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("contributionType")
|
|
public ContributionTypeEnum getContributionType() {
|
|
return contributionType;
|
|
}
|
|
|
|
@JsonProperty("contributionType")
|
|
public void setContributionType(ContributionTypeEnum contributionType) {
|
|
this.contributionType = contributionType;
|
|
}
|
|
|
|
public SourceAttributionSourcesInner authorizationSnapshotId(@Nullable String authorizationSnapshotId) {
|
|
this.authorizationSnapshotId = authorizationSnapshotId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 授权快照 ID
|
|
* @return authorizationSnapshotId
|
|
*/
|
|
|
|
@Schema(name = "authorizationSnapshotId", description = "授权快照 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("authorizationSnapshotId")
|
|
public @Nullable String getAuthorizationSnapshotId() {
|
|
return authorizationSnapshotId;
|
|
}
|
|
|
|
@JsonProperty("authorizationSnapshotId")
|
|
public void setAuthorizationSnapshotId(@Nullable String authorizationSnapshotId) {
|
|
this.authorizationSnapshotId = authorizationSnapshotId;
|
|
}
|
|
|
|
public SourceAttributionSourcesInner sourceVersion(@Nullable Integer sourceVersion) {
|
|
this.sourceVersion = sourceVersion;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 来源版本号
|
|
* @return sourceVersion
|
|
*/
|
|
|
|
@Schema(name = "sourceVersion", description = "来源版本号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("sourceVersion")
|
|
public @Nullable Integer getSourceVersion() {
|
|
return sourceVersion;
|
|
}
|
|
|
|
@JsonProperty("sourceVersion")
|
|
public void setSourceVersion(@Nullable Integer sourceVersion) {
|
|
this.sourceVersion = sourceVersion;
|
|
}
|
|
|
|
public SourceAttributionSourcesInner licenseRestrictions(List<String> licenseRestrictions) {
|
|
this.licenseRestrictions = licenseRestrictions;
|
|
return this;
|
|
}
|
|
|
|
public SourceAttributionSourcesInner addLicenseRestrictionsItem(String licenseRestrictionsItem) {
|
|
if (this.licenseRestrictions == null) {
|
|
this.licenseRestrictions = new ArrayList<>();
|
|
}
|
|
this.licenseRestrictions.add(licenseRestrictionsItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 许可限制列表
|
|
* @return licenseRestrictions
|
|
*/
|
|
|
|
@Schema(name = "licenseRestrictions", description = "许可限制列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("licenseRestrictions")
|
|
public List<String> getLicenseRestrictions() {
|
|
return licenseRestrictions;
|
|
}
|
|
|
|
@JsonProperty("licenseRestrictions")
|
|
public void setLicenseRestrictions(List<String> licenseRestrictions) {
|
|
this.licenseRestrictions = licenseRestrictions;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
SourceAttributionSourcesInner sourceAttributionSourcesInner = (SourceAttributionSourcesInner) o;
|
|
return Objects.equals(this.sourceType, sourceAttributionSourcesInner.sourceType) &&
|
|
Objects.equals(this.sourceId, sourceAttributionSourcesInner.sourceId) &&
|
|
Objects.equals(this.sourceName, sourceAttributionSourcesInner.sourceName) &&
|
|
Objects.equals(this.contributionType, sourceAttributionSourcesInner.contributionType) &&
|
|
Objects.equals(this.authorizationSnapshotId, sourceAttributionSourcesInner.authorizationSnapshotId) &&
|
|
Objects.equals(this.sourceVersion, sourceAttributionSourcesInner.sourceVersion) &&
|
|
Objects.equals(this.licenseRestrictions, sourceAttributionSourcesInner.licenseRestrictions);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(sourceType, sourceId, sourceName, contributionType, authorizationSnapshotId, sourceVersion, licenseRestrictions);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class SourceAttributionSourcesInner {\n");
|
|
sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n");
|
|
sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n");
|
|
sb.append(" sourceName: ").append(toIndentedString(sourceName)).append("\n");
|
|
sb.append(" contributionType: ").append(toIndentedString(contributionType)).append("\n");
|
|
sb.append(" authorizationSnapshotId: ").append(toIndentedString(authorizationSnapshotId)).append("\n");
|
|
sb.append(" sourceVersion: ").append(toIndentedString(sourceVersion)).append("\n");
|
|
sb.append(" licenseRestrictions: ").append(toIndentedString(licenseRestrictions)).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 ");
|
|
}
|
|
}
|
|
|