239 lines
6.8 KiB
Java
239 lines
6.8 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.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;
|
|
|
|
/**
|
|
* 安全事件确认结果
|
|
*/
|
|
|
|
@Schema(name = "SecurityEventAcknowledgeResult", 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 SecurityEventAcknowledgeResult implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String eventId;
|
|
|
|
private Boolean acknowledged;
|
|
|
|
private String action;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private @Nullable OffsetDateTime acknowledgedAt;
|
|
|
|
private @Nullable String riskSummary;
|
|
|
|
@Valid
|
|
private List<String> nextSteps = new ArrayList<>();
|
|
|
|
public SecurityEventAcknowledgeResult() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public SecurityEventAcknowledgeResult(String eventId, Boolean acknowledged, String action) {
|
|
this.eventId = eventId;
|
|
this.acknowledged = acknowledged;
|
|
this.action = action;
|
|
}
|
|
|
|
public SecurityEventAcknowledgeResult eventId(String eventId) {
|
|
this.eventId = eventId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 安全事件 ID
|
|
* @return eventId
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "eventId", description = "安全事件 ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("eventId")
|
|
public String getEventId() {
|
|
return eventId;
|
|
}
|
|
|
|
@JsonProperty("eventId")
|
|
public void setEventId(String eventId) {
|
|
this.eventId = eventId;
|
|
}
|
|
|
|
public SecurityEventAcknowledgeResult acknowledged(Boolean acknowledged) {
|
|
this.acknowledged = acknowledged;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 是否确认成功
|
|
* @return acknowledged
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "acknowledged", description = "是否确认成功", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("acknowledged")
|
|
public Boolean getAcknowledged() {
|
|
return acknowledged;
|
|
}
|
|
|
|
@JsonProperty("acknowledged")
|
|
public void setAcknowledged(Boolean acknowledged) {
|
|
this.acknowledged = acknowledged;
|
|
}
|
|
|
|
public SecurityEventAcknowledgeResult action(String action) {
|
|
this.action = action;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 确认动作
|
|
* @return action
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "action", description = "确认动作", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("action")
|
|
public String getAction() {
|
|
return action;
|
|
}
|
|
|
|
@JsonProperty("action")
|
|
public void setAction(String action) {
|
|
this.action = action;
|
|
}
|
|
|
|
public SecurityEventAcknowledgeResult acknowledgedAt(@Nullable OffsetDateTime acknowledgedAt) {
|
|
this.acknowledgedAt = acknowledgedAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 确认时间
|
|
* @return acknowledgedAt
|
|
*/
|
|
@Valid
|
|
@Schema(name = "acknowledgedAt", description = "确认时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("acknowledgedAt")
|
|
public @Nullable OffsetDateTime getAcknowledgedAt() {
|
|
return acknowledgedAt;
|
|
}
|
|
|
|
@JsonProperty("acknowledgedAt")
|
|
public void setAcknowledgedAt(@Nullable OffsetDateTime acknowledgedAt) {
|
|
this.acknowledgedAt = acknowledgedAt;
|
|
}
|
|
|
|
public SecurityEventAcknowledgeResult riskSummary(@Nullable String riskSummary) {
|
|
this.riskSummary = riskSummary;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 处理后风险摘要
|
|
* @return riskSummary
|
|
*/
|
|
|
|
@Schema(name = "riskSummary", description = "处理后风险摘要", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("riskSummary")
|
|
public @Nullable String getRiskSummary() {
|
|
return riskSummary;
|
|
}
|
|
|
|
@JsonProperty("riskSummary")
|
|
public void setRiskSummary(@Nullable String riskSummary) {
|
|
this.riskSummary = riskSummary;
|
|
}
|
|
|
|
public SecurityEventAcknowledgeResult nextSteps(List<String> nextSteps) {
|
|
this.nextSteps = nextSteps;
|
|
return this;
|
|
}
|
|
|
|
public SecurityEventAcknowledgeResult addNextStepsItem(String nextStepsItem) {
|
|
if (this.nextSteps == null) {
|
|
this.nextSteps = new ArrayList<>();
|
|
}
|
|
this.nextSteps.add(nextStepsItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 后续建议
|
|
* @return nextSteps
|
|
*/
|
|
|
|
@Schema(name = "nextSteps", description = "后续建议", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("nextSteps")
|
|
public List<String> getNextSteps() {
|
|
return nextSteps;
|
|
}
|
|
|
|
@JsonProperty("nextSteps")
|
|
public void setNextSteps(List<String> nextSteps) {
|
|
this.nextSteps = nextSteps;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
SecurityEventAcknowledgeResult securityEventAcknowledgeResult = (SecurityEventAcknowledgeResult) o;
|
|
return Objects.equals(this.eventId, securityEventAcknowledgeResult.eventId) &&
|
|
Objects.equals(this.acknowledged, securityEventAcknowledgeResult.acknowledged) &&
|
|
Objects.equals(this.action, securityEventAcknowledgeResult.action) &&
|
|
Objects.equals(this.acknowledgedAt, securityEventAcknowledgeResult.acknowledgedAt) &&
|
|
Objects.equals(this.riskSummary, securityEventAcknowledgeResult.riskSummary) &&
|
|
Objects.equals(this.nextSteps, securityEventAcknowledgeResult.nextSteps);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(eventId, acknowledged, action, acknowledgedAt, riskSummary, nextSteps);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class SecurityEventAcknowledgeResult {\n");
|
|
sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n");
|
|
sb.append(" acknowledged: ").append(toIndentedString(acknowledged)).append("\n");
|
|
sb.append(" action: ").append(toIndentedString(action)).append("\n");
|
|
sb.append(" acknowledgedAt: ").append(toIndentedString(acknowledgedAt)).append("\n");
|
|
sb.append(" riskSummary: ").append(toIndentedString(riskSummary)).append("\n");
|
|
sb.append(" nextSteps: ").append(toIndentedString(nextSteps)).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 ");
|
|
}
|
|
}
|
|
|