Content 50 + AI 39 + Knowledge 59 + Market 32 + Account 33 + Meta 16 = 229 修复 Knowledge YAML 重复 key 重新生成 TypeScript 类型包(7 文件)+ Java DTO 骨架(626 类)
245 lines
7.1 KiB
Java
245 lines
7.1 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 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;
|
|
|
|
/**
|
|
* 许可信息
|
|
*/
|
|
|
|
@Schema(name = "LicenseInfo", 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 LicenseInfo implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String licenseType;
|
|
|
|
@Valid
|
|
private List<String> allowedUses = new ArrayList<>();
|
|
|
|
@Valid
|
|
private List<String> prohibitedUses = new ArrayList<>();
|
|
|
|
private @Nullable String validityPeriod;
|
|
|
|
private @Nullable String priceDisplay;
|
|
|
|
private @Nullable String externalOrderRef;
|
|
|
|
public LicenseInfo() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public LicenseInfo(String licenseType, List<String> allowedUses, List<String> prohibitedUses) {
|
|
this.licenseType = licenseType;
|
|
this.allowedUses = allowedUses;
|
|
this.prohibitedUses = prohibitedUses;
|
|
}
|
|
|
|
public LicenseInfo licenseType(String licenseType) {
|
|
this.licenseType = licenseType;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 许可类型
|
|
* @return licenseType
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "licenseType", description = "许可类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("licenseType")
|
|
public String getLicenseType() {
|
|
return licenseType;
|
|
}
|
|
|
|
@JsonProperty("licenseType")
|
|
public void setLicenseType(String licenseType) {
|
|
this.licenseType = licenseType;
|
|
}
|
|
|
|
public LicenseInfo allowedUses(List<String> allowedUses) {
|
|
this.allowedUses = allowedUses;
|
|
return this;
|
|
}
|
|
|
|
public LicenseInfo addAllowedUsesItem(String allowedUsesItem) {
|
|
if (this.allowedUses == null) {
|
|
this.allowedUses = new ArrayList<>();
|
|
}
|
|
this.allowedUses.add(allowedUsesItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 允许用途
|
|
* @return allowedUses
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "allowedUses", description = "允许用途", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("allowedUses")
|
|
public List<String> getAllowedUses() {
|
|
return allowedUses;
|
|
}
|
|
|
|
@JsonProperty("allowedUses")
|
|
public void setAllowedUses(List<String> allowedUses) {
|
|
this.allowedUses = allowedUses;
|
|
}
|
|
|
|
public LicenseInfo prohibitedUses(List<String> prohibitedUses) {
|
|
this.prohibitedUses = prohibitedUses;
|
|
return this;
|
|
}
|
|
|
|
public LicenseInfo addProhibitedUsesItem(String prohibitedUsesItem) {
|
|
if (this.prohibitedUses == null) {
|
|
this.prohibitedUses = new ArrayList<>();
|
|
}
|
|
this.prohibitedUses.add(prohibitedUsesItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 禁止用途(如禁止再分发、禁止训练复用)
|
|
* @return prohibitedUses
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "prohibitedUses", description = "禁止用途(如禁止再分发、禁止训练复用)", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("prohibitedUses")
|
|
public List<String> getProhibitedUses() {
|
|
return prohibitedUses;
|
|
}
|
|
|
|
@JsonProperty("prohibitedUses")
|
|
public void setProhibitedUses(List<String> prohibitedUses) {
|
|
this.prohibitedUses = prohibitedUses;
|
|
}
|
|
|
|
public LicenseInfo validityPeriod(@Nullable String validityPeriod) {
|
|
this.validityPeriod = validityPeriod;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 有效期说明
|
|
* @return validityPeriod
|
|
*/
|
|
|
|
@Schema(name = "validityPeriod", description = "有效期说明", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("validityPeriod")
|
|
public @Nullable String getValidityPeriod() {
|
|
return validityPeriod;
|
|
}
|
|
|
|
@JsonProperty("validityPeriod")
|
|
public void setValidityPeriod(@Nullable String validityPeriod) {
|
|
this.validityPeriod = validityPeriod;
|
|
}
|
|
|
|
public LicenseInfo priceDisplay(@Nullable String priceDisplay) {
|
|
this.priceDisplay = priceDisplay;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 价格或权益展示文案
|
|
* @return priceDisplay
|
|
*/
|
|
|
|
@Schema(name = "priceDisplay", description = "价格或权益展示文案", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("priceDisplay")
|
|
public @Nullable String getPriceDisplay() {
|
|
return priceDisplay;
|
|
}
|
|
|
|
@JsonProperty("priceDisplay")
|
|
public void setPriceDisplay(@Nullable String priceDisplay) {
|
|
this.priceDisplay = priceDisplay;
|
|
}
|
|
|
|
public LicenseInfo externalOrderRef(@Nullable String externalOrderRef) {
|
|
this.externalOrderRef = externalOrderRef;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 外部订单或授权引用
|
|
* @return externalOrderRef
|
|
*/
|
|
|
|
@Schema(name = "externalOrderRef", description = "外部订单或授权引用", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("externalOrderRef")
|
|
public @Nullable String getExternalOrderRef() {
|
|
return externalOrderRef;
|
|
}
|
|
|
|
@JsonProperty("externalOrderRef")
|
|
public void setExternalOrderRef(@Nullable String externalOrderRef) {
|
|
this.externalOrderRef = externalOrderRef;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
LicenseInfo licenseInfo = (LicenseInfo) o;
|
|
return Objects.equals(this.licenseType, licenseInfo.licenseType) &&
|
|
Objects.equals(this.allowedUses, licenseInfo.allowedUses) &&
|
|
Objects.equals(this.prohibitedUses, licenseInfo.prohibitedUses) &&
|
|
Objects.equals(this.validityPeriod, licenseInfo.validityPeriod) &&
|
|
Objects.equals(this.priceDisplay, licenseInfo.priceDisplay) &&
|
|
Objects.equals(this.externalOrderRef, licenseInfo.externalOrderRef);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(licenseType, allowedUses, prohibitedUses, validityPeriod, priceDisplay, externalOrderRef);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class LicenseInfo {\n");
|
|
sb.append(" licenseType: ").append(toIndentedString(licenseType)).append("\n");
|
|
sb.append(" allowedUses: ").append(toIndentedString(allowedUses)).append("\n");
|
|
sb.append(" prohibitedUses: ").append(toIndentedString(prohibitedUses)).append("\n");
|
|
sb.append(" validityPeriod: ").append(toIndentedString(validityPeriod)).append("\n");
|
|
sb.append(" priceDisplay: ").append(toIndentedString(priceDisplay)).append("\n");
|
|
sb.append(" externalOrderRef: ").append(toIndentedString(externalOrderRef)).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 ");
|
|
}
|
|
}
|
|
|