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.ProtectionNodeDetailObservabilityMetricsInner; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.springframework.format.annotation.DateTimeFormat; 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; /** * ProtectionNodeDetail */ @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 ProtectionNodeDetail implements Serializable { private static final long serialVersionUID = 1L; private String nodeKey; private String displayName; private @Nullable String description; /** * Gets or Sets nodeType */ public enum NodeTypeEnum { INPUT_OUTPUT_COMPLIANCE("input_output_compliance"), CHUNKING("chunking"), RAG_INDEXING("rag_indexing"), SEMANTIC_SAFETY("semantic_safety"), STATIC_CHECK("static_check"), QUALITY_GATE("quality_gate"); private final String value; NodeTypeEnum(String value) { this.value = value; } @JsonValue public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } @JsonCreator public static NodeTypeEnum fromValue(String value) { for (NodeTypeEnum b : NodeTypeEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } private NodeTypeEnum nodeType; private Boolean irreplaceable; private @Nullable String irreplaceableReason; private @Nullable String permissionRequirement; private @Nullable String auditRequirement; private @Nullable String shadowToCanonicalBoundary; private @Nullable String chainKey; private @Nullable String chainDisplayName; @Valid private List<@Valid ProtectionNodeDetailObservabilityMetricsInner> observabilityMetrics = new ArrayList<>(); @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime updatedAt; public ProtectionNodeDetail() { super(); } /** * Constructor with only required parameters */ public ProtectionNodeDetail(String nodeKey, String displayName, NodeTypeEnum nodeType, Boolean irreplaceable) { this.nodeKey = nodeKey; this.displayName = displayName; this.nodeType = nodeType; this.irreplaceable = irreplaceable; } public ProtectionNodeDetail nodeKey(String nodeKey) { this.nodeKey = nodeKey; return this; } /** * Get nodeKey * @return nodeKey */ @NotNull @Schema(name = "nodeKey", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("nodeKey") public String getNodeKey() { return nodeKey; } @JsonProperty("nodeKey") public void setNodeKey(String nodeKey) { this.nodeKey = nodeKey; } public ProtectionNodeDetail displayName(String displayName) { this.displayName = displayName; return this; } /** * Get displayName * @return displayName */ @NotNull @Schema(name = "displayName", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("displayName") public String getDisplayName() { return displayName; } @JsonProperty("displayName") public void setDisplayName(String displayName) { this.displayName = displayName; } public ProtectionNodeDetail description(@Nullable String description) { this.description = description; return this; } /** * Get description * @return description */ @Schema(name = "description", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("description") public @Nullable String getDescription() { return description; } @JsonProperty("description") public void setDescription(@Nullable String description) { this.description = description; } public ProtectionNodeDetail nodeType(NodeTypeEnum nodeType) { this.nodeType = nodeType; return this; } /** * Get nodeType * @return nodeType */ @NotNull @Schema(name = "nodeType", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("nodeType") public NodeTypeEnum getNodeType() { return nodeType; } @JsonProperty("nodeType") public void setNodeType(NodeTypeEnum nodeType) { this.nodeType = nodeType; } public ProtectionNodeDetail irreplaceable(Boolean irreplaceable) { this.irreplaceable = irreplaceable; return this; } /** * 是否不可替换。服务端必须拒绝把保护节点降级为用户可替换槽位的草稿、发布或激活命令。 * @return irreplaceable */ @NotNull @Schema(name = "irreplaceable", description = "是否不可替换。服务端必须拒绝把保护节点降级为用户可替换槽位的草稿、发布或激活命令。", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("irreplaceable") public Boolean getIrreplaceable() { return irreplaceable; } @JsonProperty("irreplaceable") public void setIrreplaceable(Boolean irreplaceable) { this.irreplaceable = irreplaceable; } public ProtectionNodeDetail irreplaceableReason(@Nullable String irreplaceableReason) { this.irreplaceableReason = irreplaceableReason; return this; } /** * Get irreplaceableReason * @return irreplaceableReason */ @Schema(name = "irreplaceableReason", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("irreplaceableReason") public @Nullable String getIrreplaceableReason() { return irreplaceableReason; } @JsonProperty("irreplaceableReason") public void setIrreplaceableReason(@Nullable String irreplaceableReason) { this.irreplaceableReason = irreplaceableReason; } public ProtectionNodeDetail permissionRequirement(@Nullable String permissionRequirement) { this.permissionRequirement = permissionRequirement; return this; } /** * 权限要求 * @return permissionRequirement */ @Schema(name = "permissionRequirement", description = "权限要求", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("permissionRequirement") public @Nullable String getPermissionRequirement() { return permissionRequirement; } @JsonProperty("permissionRequirement") public void setPermissionRequirement(@Nullable String permissionRequirement) { this.permissionRequirement = permissionRequirement; } public ProtectionNodeDetail auditRequirement(@Nullable String auditRequirement) { this.auditRequirement = auditRequirement; return this; } /** * 审计要求 * @return auditRequirement */ @Schema(name = "auditRequirement", description = "审计要求", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("auditRequirement") public @Nullable String getAuditRequirement() { return auditRequirement; } @JsonProperty("auditRequirement") public void setAuditRequirement(@Nullable String auditRequirement) { this.auditRequirement = auditRequirement; } public ProtectionNodeDetail shadowToCanonicalBoundary(@Nullable String shadowToCanonicalBoundary) { this.shadowToCanonicalBoundary = shadowToCanonicalBoundary; return this; } /** * Shadow→Canonical 边界说明 * @return shadowToCanonicalBoundary */ @Schema(name = "shadowToCanonicalBoundary", description = "Shadow→Canonical 边界说明", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("shadowToCanonicalBoundary") public @Nullable String getShadowToCanonicalBoundary() { return shadowToCanonicalBoundary; } @JsonProperty("shadowToCanonicalBoundary") public void setShadowToCanonicalBoundary(@Nullable String shadowToCanonicalBoundary) { this.shadowToCanonicalBoundary = shadowToCanonicalBoundary; } public ProtectionNodeDetail chainKey(@Nullable String chainKey) { this.chainKey = chainKey; return this; } /** * 所属功能链路标识 * @return chainKey */ @Schema(name = "chainKey", description = "所属功能链路标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("chainKey") public @Nullable String getChainKey() { return chainKey; } @JsonProperty("chainKey") public void setChainKey(@Nullable String chainKey) { this.chainKey = chainKey; } public ProtectionNodeDetail chainDisplayName(@Nullable String chainDisplayName) { this.chainDisplayName = chainDisplayName; return this; } /** * Get chainDisplayName * @return chainDisplayName */ @Schema(name = "chainDisplayName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("chainDisplayName") public @Nullable String getChainDisplayName() { return chainDisplayName; } @JsonProperty("chainDisplayName") public void setChainDisplayName(@Nullable String chainDisplayName) { this.chainDisplayName = chainDisplayName; } public ProtectionNodeDetail observabilityMetrics(List<@Valid ProtectionNodeDetailObservabilityMetricsInner> observabilityMetrics) { this.observabilityMetrics = observabilityMetrics; return this; } public ProtectionNodeDetail addObservabilityMetricsItem(ProtectionNodeDetailObservabilityMetricsInner observabilityMetricsItem) { if (this.observabilityMetrics == null) { this.observabilityMetrics = new ArrayList<>(); } this.observabilityMetrics.add(observabilityMetricsItem); return this; } /** * 可观测指标 * @return observabilityMetrics */ @Valid @Schema(name = "observabilityMetrics", description = "可观测指标", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("observabilityMetrics") public List<@Valid ProtectionNodeDetailObservabilityMetricsInner> getObservabilityMetrics() { return observabilityMetrics; } @JsonProperty("observabilityMetrics") public void setObservabilityMetrics(List<@Valid ProtectionNodeDetailObservabilityMetricsInner> observabilityMetrics) { this.observabilityMetrics = observabilityMetrics; } public ProtectionNodeDetail updatedAt(@Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } /** * Get updatedAt * @return updatedAt */ @Valid @Schema(name = "updatedAt", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("updatedAt") public @Nullable OffsetDateTime getUpdatedAt() { return updatedAt; } @JsonProperty("updatedAt") public void setUpdatedAt(@Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ProtectionNodeDetail protectionNodeDetail = (ProtectionNodeDetail) o; return Objects.equals(this.nodeKey, protectionNodeDetail.nodeKey) && Objects.equals(this.displayName, protectionNodeDetail.displayName) && Objects.equals(this.description, protectionNodeDetail.description) && Objects.equals(this.nodeType, protectionNodeDetail.nodeType) && Objects.equals(this.irreplaceable, protectionNodeDetail.irreplaceable) && Objects.equals(this.irreplaceableReason, protectionNodeDetail.irreplaceableReason) && Objects.equals(this.permissionRequirement, protectionNodeDetail.permissionRequirement) && Objects.equals(this.auditRequirement, protectionNodeDetail.auditRequirement) && Objects.equals(this.shadowToCanonicalBoundary, protectionNodeDetail.shadowToCanonicalBoundary) && Objects.equals(this.chainKey, protectionNodeDetail.chainKey) && Objects.equals(this.chainDisplayName, protectionNodeDetail.chainDisplayName) && Objects.equals(this.observabilityMetrics, protectionNodeDetail.observabilityMetrics) && Objects.equals(this.updatedAt, protectionNodeDetail.updatedAt); } @Override public int hashCode() { return Objects.hash(nodeKey, displayName, description, nodeType, irreplaceable, irreplaceableReason, permissionRequirement, auditRequirement, shadowToCanonicalBoundary, chainKey, chainDisplayName, observabilityMetrics, updatedAt); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ProtectionNodeDetail {\n"); sb.append(" nodeKey: ").append(toIndentedString(nodeKey)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" nodeType: ").append(toIndentedString(nodeType)).append("\n"); sb.append(" irreplaceable: ").append(toIndentedString(irreplaceable)).append("\n"); sb.append(" irreplaceableReason: ").append(toIndentedString(irreplaceableReason)).append("\n"); sb.append(" permissionRequirement: ").append(toIndentedString(permissionRequirement)).append("\n"); sb.append(" auditRequirement: ").append(toIndentedString(auditRequirement)).append("\n"); sb.append(" shadowToCanonicalBoundary: ").append(toIndentedString(shadowToCanonicalBoundary)).append("\n"); sb.append(" chainKey: ").append(toIndentedString(chainKey)).append("\n"); sb.append(" chainDisplayName: ").append(toIndentedString(chainDisplayName)).append("\n"); sb.append(" observabilityMetrics: ").append(toIndentedString(observabilityMetrics)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 "); } }