oh-my-muse/docs/api-contracts/generated/java/com/muse/dto/AdminRecallAssetRequest.java

325 lines
8.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.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;
/**
* AdminRecallAssetRequest
*/
@JsonTypeName("adminRecallAsset_request")
@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 AdminRecallAssetRequest implements Serializable {
private static final long serialVersionUID = 1L;
private UUID commandId;
/**
* 期望当前治理状态,避免盲召回
*/
public enum ExpectedStatusEnum {
LISTED("listed"),
DELISTED("delisted");
private final String value;
ExpectedStatusEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ExpectedStatusEnum fromValue(String value) {
for (ExpectedStatusEnum b : ExpectedStatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private ExpectedStatusEnum expectedStatus;
private UUID impactPreviewId;
private String reason;
private String basis;
/**
* 召回范围
*/
public enum ScopeEnum {
STOP_GENERATION("stop_generation"),
FULL_RECALL("full_recall");
private final String value;
ScopeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ScopeEnum fromValue(String value) {
for (ScopeEnum b : ScopeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private ScopeEnum scope;
private Boolean exportPreservation = false;
public AdminRecallAssetRequest() {
super();
}
/**
* Constructor with only required parameters
*/
public AdminRecallAssetRequest(UUID commandId, ExpectedStatusEnum expectedStatus, UUID impactPreviewId, String reason, String basis, ScopeEnum scope) {
this.commandId = commandId;
this.expectedStatus = expectedStatus;
this.impactPreviewId = impactPreviewId;
this.reason = reason;
this.basis = basis;
this.scope = scope;
}
public AdminRecallAssetRequest commandId(UUID commandId) {
this.commandId = commandId;
return this;
}
/**
* 幂等键
* @return commandId
*/
@NotNull @Valid
@Schema(name = "commandId", description = "幂等键", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("commandId")
public UUID getCommandId() {
return commandId;
}
@JsonProperty("commandId")
public void setCommandId(UUID commandId) {
this.commandId = commandId;
}
public AdminRecallAssetRequest expectedStatus(ExpectedStatusEnum expectedStatus) {
this.expectedStatus = expectedStatus;
return this;
}
/**
* 期望当前治理状态,避免盲召回
* @return expectedStatus
*/
@NotNull
@Schema(name = "expectedStatus", description = "期望当前治理状态,避免盲召回", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("expectedStatus")
public ExpectedStatusEnum getExpectedStatus() {
return expectedStatus;
}
@JsonProperty("expectedStatus")
public void setExpectedStatus(ExpectedStatusEnum expectedStatus) {
this.expectedStatus = expectedStatus;
}
public AdminRecallAssetRequest impactPreviewId(UUID impactPreviewId) {
this.impactPreviewId = impactPreviewId;
return this;
}
/**
* 关联的治理影响预览 ID
* @return impactPreviewId
*/
@NotNull @Valid
@Schema(name = "impactPreviewId", description = "关联的治理影响预览 ID", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("impactPreviewId")
public UUID getImpactPreviewId() {
return impactPreviewId;
}
@JsonProperty("impactPreviewId")
public void setImpactPreviewId(UUID impactPreviewId) {
this.impactPreviewId = impactPreviewId;
}
public AdminRecallAssetRequest reason(String reason) {
this.reason = reason;
return this;
}
/**
* 召回原因
* @return reason
*/
@NotNull @Size(max = 5000)
@Schema(name = "reason", description = "召回原因", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("reason")
public String getReason() {
return reason;
}
@JsonProperty("reason")
public void setReason(String reason) {
this.reason = reason;
}
public AdminRecallAssetRequest basis(String basis) {
this.basis = basis;
return this;
}
/**
* 召回依据(法律/合规/安全)
* @return basis
*/
@NotNull @Size(max = 5000)
@Schema(name = "basis", description = "召回依据(法律/合规/安全)", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("basis")
public String getBasis() {
return basis;
}
@JsonProperty("basis")
public void setBasis(String basis) {
this.basis = basis;
}
public AdminRecallAssetRequest scope(ScopeEnum scope) {
this.scope = scope;
return this;
}
/**
* 召回范围
* @return scope
*/
@NotNull
@Schema(name = "scope", description = "召回范围", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("scope")
public ScopeEnum getScope() {
return scope;
}
@JsonProperty("scope")
public void setScope(ScopeEnum scope) {
this.scope = scope;
}
public AdminRecallAssetRequest exportPreservation(Boolean exportPreservation) {
this.exportPreservation = exportPreservation;
return this;
}
/**
* 是否启动法务保全限制(限制导出和复制)
* @return exportPreservation
*/
@Schema(name = "exportPreservation", description = "是否启动法务保全限制(限制导出和复制)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("exportPreservation")
public Boolean getExportPreservation() {
return exportPreservation;
}
@JsonProperty("exportPreservation")
public void setExportPreservation(Boolean exportPreservation) {
this.exportPreservation = exportPreservation;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdminRecallAssetRequest adminRecallAssetRequest = (AdminRecallAssetRequest) o;
return Objects.equals(this.commandId, adminRecallAssetRequest.commandId) &&
Objects.equals(this.expectedStatus, adminRecallAssetRequest.expectedStatus) &&
Objects.equals(this.impactPreviewId, adminRecallAssetRequest.impactPreviewId) &&
Objects.equals(this.reason, adminRecallAssetRequest.reason) &&
Objects.equals(this.basis, adminRecallAssetRequest.basis) &&
Objects.equals(this.scope, adminRecallAssetRequest.scope) &&
Objects.equals(this.exportPreservation, adminRecallAssetRequest.exportPreservation);
}
@Override
public int hashCode() {
return Objects.hash(commandId, expectedStatus, impactPreviewId, reason, basis, scope, exportPreservation);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdminRecallAssetRequest {\n");
sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n");
sb.append(" expectedStatus: ").append(toIndentedString(expectedStatus)).append("\n");
sb.append(" impactPreviewId: ").append(toIndentedString(impactPreviewId)).append("\n");
sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
sb.append(" basis: ").append(toIndentedString(basis)).append("\n");
sb.append(" scope: ").append(toIndentedString(scope)).append("\n");
sb.append(" exportPreservation: ").append(toIndentedString(exportPreservation)).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 ");
}
}