235 lines
5.4 KiB
Java
235 lines
5.4 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 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 = "PublishCheckItem", description = "发布检查条目")
|
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-05-24T16:47:40.290595+08:00[Asia/Shanghai]", comments = "Generator version: 7.22.0")
|
|
public class PublishCheckItem implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* 检查类别
|
|
*/
|
|
public enum CategoryEnum {
|
|
RIGHTS("rights"),
|
|
|
|
PRIVACY("privacy"),
|
|
|
|
KEY_EXPOSURE("key_exposure"),
|
|
|
|
COPYRIGHT("copyright"),
|
|
|
|
LICENSE_COMPLETENESS("license_completeness"),
|
|
|
|
SENSITIVE_CONTENT("sensitive_content"),
|
|
|
|
OWNER_PRECHECK_LINEAGE("owner_precheck_lineage"),
|
|
|
|
PROCESSING_STATUS("processing_status"),
|
|
|
|
OUTBOUND_SCOPE("outbound_scope"),
|
|
|
|
REDISTRIBUTION_RESTRICTION("redistribution_restriction");
|
|
|
|
private final String value;
|
|
|
|
CategoryEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static CategoryEnum fromValue(String value) {
|
|
for (CategoryEnum b : CategoryEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private CategoryEnum category;
|
|
|
|
private String message;
|
|
|
|
/**
|
|
* 严重性
|
|
*/
|
|
public enum SeverityEnum {
|
|
BLOCKER("blocker"),
|
|
|
|
WARNING("warning");
|
|
|
|
private final String value;
|
|
|
|
SeverityEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static SeverityEnum fromValue(String value) {
|
|
for (SeverityEnum b : SeverityEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private @Nullable SeverityEnum severity;
|
|
|
|
public PublishCheckItem() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public PublishCheckItem(CategoryEnum category, String message) {
|
|
this.category = category;
|
|
this.message = message;
|
|
}
|
|
|
|
public PublishCheckItem category(CategoryEnum category) {
|
|
this.category = category;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 检查类别
|
|
* @return category
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "category", description = "检查类别", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("category")
|
|
public CategoryEnum getCategory() {
|
|
return category;
|
|
}
|
|
|
|
@JsonProperty("category")
|
|
public void setCategory(CategoryEnum category) {
|
|
this.category = category;
|
|
}
|
|
|
|
public PublishCheckItem message(String message) {
|
|
this.message = message;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 检查信息
|
|
* @return message
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "message", description = "检查信息", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("message")
|
|
public String getMessage() {
|
|
return message;
|
|
}
|
|
|
|
@JsonProperty("message")
|
|
public void setMessage(String message) {
|
|
this.message = message;
|
|
}
|
|
|
|
public PublishCheckItem severity(@Nullable SeverityEnum severity) {
|
|
this.severity = severity;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 严重性
|
|
* @return severity
|
|
*/
|
|
|
|
@Schema(name = "severity", description = "严重性", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("severity")
|
|
public @Nullable SeverityEnum getSeverity() {
|
|
return severity;
|
|
}
|
|
|
|
@JsonProperty("severity")
|
|
public void setSeverity(@Nullable SeverityEnum severity) {
|
|
this.severity = severity;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
PublishCheckItem publishCheckItem = (PublishCheckItem) o;
|
|
return Objects.equals(this.category, publishCheckItem.category) &&
|
|
Objects.equals(this.message, publishCheckItem.message) &&
|
|
Objects.equals(this.severity, publishCheckItem.severity);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(category, message, severity);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class PublishCheckItem {\n");
|
|
sb.append(" category: ").append(toIndentedString(category)).append("\n");
|
|
sb.append(" message: ").append(toIndentedString(message)).append("\n");
|
|
sb.append(" severity: ").append(toIndentedString(severity)).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 ");
|
|
}
|
|
}
|
|
|