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 com.muse.dto.AffectedCounts; import java.util.ArrayList; import java.util.Arrays; import java.util.List; 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; /** * 管理端治理影响预览 */ @Schema(name = "AdminGovernanceImpactPreview", 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 AdminGovernanceImpactPreview implements Serializable { private static final long serialVersionUID = 1L; private UUID previewId; /** * Gets or Sets actionType */ public enum ActionTypeEnum { DELIST("delist"), RECALL("recall"), REVOKE_LICENSE("revoke_license"), STOP_GENERATION("stop_generation"); private final String value; ActionTypeEnum(String value) { this.value = value; } @JsonValue public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } @JsonCreator public static ActionTypeEnum fromValue(String value) { for (ActionTypeEnum b : ActionTypeEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } private ActionTypeEnum actionType; private String scope; private AffectedCounts affectedCounts; private @Nullable String sourceReferenceSummary; private @Nullable String notificationScope; @Valid private List alternativeAssets = new ArrayList<>(); public AdminGovernanceImpactPreview() { super(); } /** * Constructor with only required parameters */ public AdminGovernanceImpactPreview(UUID previewId, ActionTypeEnum actionType, String scope, AffectedCounts affectedCounts) { this.previewId = previewId; this.actionType = actionType; this.scope = scope; this.affectedCounts = affectedCounts; } public AdminGovernanceImpactPreview previewId(UUID previewId) { this.previewId = previewId; return this; } /** * 预览 ID(关联到后续下架/召回操作) * @return previewId */ @NotNull @Valid @Schema(name = "previewId", description = "预览 ID(关联到后续下架/召回操作)", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("previewId") public UUID getPreviewId() { return previewId; } @JsonProperty("previewId") public void setPreviewId(UUID previewId) { this.previewId = previewId; } public AdminGovernanceImpactPreview actionType(ActionTypeEnum actionType) { this.actionType = actionType; return this; } /** * Get actionType * @return actionType */ @NotNull @Schema(name = "actionType", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("actionType") public ActionTypeEnum getActionType() { return actionType; } @JsonProperty("actionType") public void setActionType(ActionTypeEnum actionType) { this.actionType = actionType; } public AdminGovernanceImpactPreview scope(String scope) { this.scope = scope; return this; } /** * Get scope * @return scope */ @NotNull @Schema(name = "scope", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("scope") public String getScope() { return scope; } @JsonProperty("scope") public void setScope(String scope) { this.scope = scope; } public AdminGovernanceImpactPreview affectedCounts(AffectedCounts affectedCounts) { this.affectedCounts = affectedCounts; return this; } /** * Get affectedCounts * @return affectedCounts */ @NotNull @Valid @Schema(name = "affectedCounts", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("affectedCounts") public AffectedCounts getAffectedCounts() { return affectedCounts; } @JsonProperty("affectedCounts") public void setAffectedCounts(AffectedCounts affectedCounts) { this.affectedCounts = affectedCounts; } public AdminGovernanceImpactPreview sourceReferenceSummary(@Nullable String sourceReferenceSummary) { this.sourceReferenceSummary = sourceReferenceSummary; return this; } /** * 来源引用摘要 * @return sourceReferenceSummary */ @Schema(name = "sourceReferenceSummary", description = "来源引用摘要", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("sourceReferenceSummary") public @Nullable String getSourceReferenceSummary() { return sourceReferenceSummary; } @JsonProperty("sourceReferenceSummary") public void setSourceReferenceSummary(@Nullable String sourceReferenceSummary) { this.sourceReferenceSummary = sourceReferenceSummary; } public AdminGovernanceImpactPreview notificationScope(@Nullable String notificationScope) { this.notificationScope = notificationScope; return this; } /** * 通知范围说明 * @return notificationScope */ @Schema(name = "notificationScope", description = "通知范围说明", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("notificationScope") public @Nullable String getNotificationScope() { return notificationScope; } @JsonProperty("notificationScope") public void setNotificationScope(@Nullable String notificationScope) { this.notificationScope = notificationScope; } public AdminGovernanceImpactPreview alternativeAssets(List alternativeAssets) { this.alternativeAssets = alternativeAssets; return this; } public AdminGovernanceImpactPreview addAlternativeAssetsItem(String alternativeAssetsItem) { if (this.alternativeAssets == null) { this.alternativeAssets = new ArrayList<>(); } this.alternativeAssets.add(alternativeAssetsItem); return this; } /** * 可替代资产建议 * @return alternativeAssets */ @Schema(name = "alternativeAssets", description = "可替代资产建议", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("alternativeAssets") public List getAlternativeAssets() { return alternativeAssets; } @JsonProperty("alternativeAssets") public void setAlternativeAssets(List alternativeAssets) { this.alternativeAssets = alternativeAssets; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } AdminGovernanceImpactPreview adminGovernanceImpactPreview = (AdminGovernanceImpactPreview) o; return Objects.equals(this.previewId, adminGovernanceImpactPreview.previewId) && Objects.equals(this.actionType, adminGovernanceImpactPreview.actionType) && Objects.equals(this.scope, adminGovernanceImpactPreview.scope) && Objects.equals(this.affectedCounts, adminGovernanceImpactPreview.affectedCounts) && Objects.equals(this.sourceReferenceSummary, adminGovernanceImpactPreview.sourceReferenceSummary) && Objects.equals(this.notificationScope, adminGovernanceImpactPreview.notificationScope) && Objects.equals(this.alternativeAssets, adminGovernanceImpactPreview.alternativeAssets); } @Override public int hashCode() { return Objects.hash(previewId, actionType, scope, affectedCounts, sourceReferenceSummary, notificationScope, alternativeAssets); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdminGovernanceImpactPreview {\n"); sb.append(" previewId: ").append(toIndentedString(previewId)).append("\n"); sb.append(" actionType: ").append(toIndentedString(actionType)).append("\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" affectedCounts: ").append(toIndentedString(affectedCounts)).append("\n"); sb.append(" sourceReferenceSummary: ").append(toIndentedString(sourceReferenceSummary)).append("\n"); sb.append(" notificationScope: ").append(toIndentedString(notificationScope)).append("\n"); sb.append(" alternativeAssets: ").append(toIndentedString(alternativeAssets)).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 "); } }